Let's say a have
@RestResource(urlMapping='/Test/v1')
global with sharing class MuleTest {
@HttpGet
global static Contact getAccountContacts() {
RestRequest request = RestContext.request;
String accId = request.requestURI.substring(request.requestURI.lastIndexOf('/')+1);
system.debug(accId);
return [select id,
firstName,
LastName
from Contact where Account.id= :accId];
}
}
Then I'm trying to revoke this from POSTMAN uri: https://mule-test-dev-ed.my.salesforce.com/services/apexrest/Test/v1/getAccountContacts
I've set up security token header and username/pass for basic auth. But I get an error
Could not get any response There was an error connecting to https://mule-test-dev-ed.my.salesforce.com/services/apexrest/Test/v1/getAccountContacts.
What am I doing wrong ?