I have never worked with Rest Resource classes before and am trying to debug one from a previous developer.
I am looking at: @RestResource(urlMapping='/CompanyData/*')
and am unsure what CompanyData
is. I see from the documentation that they use standard objects in their examples so my assumption is that it would be a custom object, but it doesn't look like a typical standard object (with the __c). Could anyone enlighten me what this reference is to?
@RestResource(urlMapping='/CompanyData/*')
global without Sharing class PartnerOpportunityService{
@HttpPost
global static String createNewOpportunities() {...
- https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_rest_resource.htm
- https://trailhead.salesforce.com/en/modules/apex_integration_services/units/apex_integration_webservices
- https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_code_sample_basic.htm
Best Answer
That tells you the URL path. So when you want to hit your service you would use: