Rest API test through postman salesforce

1) go To Create -> Apps ->  Connected App
2) give name  and contact email
3) Click on Enable oauth setting  and give call back url -  https://www.getpostman.com/oauth2/callback and "Selected OAuth Scopes" and Full access
4) Save


Open post man select ouath2 and generate new access token  :-

provide details as below

Tokenname
For authorization: https://ap1.salesforce.com/services/oauth2/authorize
For token requests: https://ap1.salesforce.com/services/oauth2/token
client key
client  secret
and click save it takes you to salesforce page provide your authentication details and and click accept


In Post Man :- click on "Tokenname" - > "Add token to"  give values as "Header" from dropdown and Click on Use Token you can check one header will be added with
name Authorization


Seelct GET request, paste below url :- Refer :- https://blog.mkorman.uk/using-postman-to-explore-salesforce-restful-web-services/

https://ap1.salesforce.com/services/data/v20.0/sobjects/Lead/00Q9000000zCWwb and click send








TEST DATA AND URL's :-
https://login.salesforce.com/services/data/v37/0/sobjects/Account
https://ap1.salesforce.com/services/data/v37/0/sobjects/Account

https://ap1.salesforce.com/services/data/v20.0/sobjects/Account/0019000001oLlBR?fields=AccountNumber,BillingPostalCode
https://ap1.salesforce.com/services/data/v20.0/sobjects/Lead/00Q9000000zCWwb

https://ap1.salesforce.com/services/data/v20.0/sobjects/Account
"Authorization:Bearertoken
"Content-Type:application/json"

https://ap1.salesforce.com/services/data/v20.0/sobjects/Account/0019000001pav75AAA --retrieve

Create :-

https://ap1.salesforce.com/services/data/v20.0/sobjects/Account/
{
"name" : "Fazurulla",
"Phone" : "9848012345"
}

https://ap1.salesforce.com/services/data/v20.0/sobjects/Lead/
{
"name" : "Fazurulla G"
"Phone" : "9848012345"
"Company" : "TESTCOMPANY"
"Email" : ""f.ganaganapalli@accenture.com"
}

No comments:

Featured

What is Cryptography in salesforce and what are all the algorithms provided by them ?

A). It is a security protocal between two systems. Lets say we are integration two systems without any encrytion mechanism then hackers wil...

Popular