You need to sign in to do that
Don't have an account?
om sai 10
Rest based web services
@RestResource(urlMapping='/Merchandise/*')
global with sharing class MerchandiseManager {
@HttpPost
global static String createMerchandise(String firstname)
{
Merchandise__c m = new Merchandise__c( Name=firstname);
insert m;
return m.Id;
}
)
I wants to know how this api be called by somebody from outside salesforce,i have tried workbench but that does not give me much idea.so if the json body is something like
{
"firstname":'james"
}
How will this information be passed by calling the above method from outside salesforce.How will i call above given method.please help
global with sharing class MerchandiseManager {
@HttpPost
global static String createMerchandise(String firstname)
{
Merchandise__c m = new Merchandise__c( Name=firstname);
insert m;
return m.Id;
}
)
I wants to know how this api be called by somebody from outside salesforce,i have tried workbench but that does not give me much idea.so if the json body is something like
{
"firstname":'james"
}
How will this information be passed by calling the above method from outside salesforce.How will i call above given method.please help
1) http://amitsalesforce.blogspot.com/2017/06/test-salesforce-api-by-postman-rest.html
NOTE:- In above post we are calling REST API from POSTMAN(outside of salesforce).
How to setup Postman you can check below recording
1) https://www.youtube.com/watch?v=WdAhD6p1nKM
Let us know if this will help you