SAP Knowledge Base Article - Public

2885326 - How to use Postman on performing ODATA API Requests - Recruiting Management

Symptom

This article describes the steps on how to perform ODATA API queries and upsert requests via Postman.

NOTE: SuccessFactors Product Support team does not support any issues related to Postman or any behavior happening only when using Postman.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

SAP SuccessFactors Recruiting Management

Resolution

How to Query in Postman

1. Create New Request.

2. Set the Option to GET and form your URL.

Format: URL (according to KBA 2215682)/odata/v2/entityName
Example: https://apisalesdemo8.successfactors.com/odata/v2/JobApplication
Note: In this case, I am just calling the JobApplication entity as a whole, and it should return all Job Applications that I have in my instance.

You can add attributes on your URL depending on what you need.
$select, $filter, $expand, and $format are the main attributes that can be used for any entity.

For example:
https://apisalesdemo8.successfactors.com/odata/v2/JobRequisition?$select=jobReqId,costOfHire,internalStatus,status&$expand=status&$filter=jobReqId eq 156&$format=json

URL Breakdown:

a. Enpoint URL: https://apisalesdemo8.successfactors.com/odata/v2/ - See KBA 2215682.

b. Entity: JobRequisition - The main entity that is being queried.

c. $select: jobReqId,costOfHire,internalStatus,status - The properties under the JobRequisition entity that are being queried. This means you are only querying these properties and would not like to show all the properties under the Job Requisition entity.

d. $filter: jobReqId eq 156 - This means the query will only get the information for Requisition 156 and not for all Requisitions.

e. $format: json - The format for the output to be returned will be in json.

3. Set Authorization to Basic Auth.

4. Populate the username and password fields.

Username follows the following format: Username@CompanyID
Note: The user should have ODATA permissions in Manage Permission Roles > [Role] > Recruiting Permissions.

5. Click on Send.

GET.png

How to Upsert in Postman

1. The setup for the Upsert request is similar to the Query, but you will change the URL and will have to populate the body.

2. Set the Option to POST and form your URL.

Format: URL (according to KBA 2215682)/odata/v2/upsert
Example: https://apisalesdemo4.successfactors.com/odata/v2/upsert

POST1.png

3. Go to the Body Tab and populate the body with the UPSERT request that you want to perform. Make sure the format is in JSON.

4. Click on Send.

POST2.png

See Also

Keywords

Integration, Recruiting Management, RCM, ODATA, API, Postman, Query, Upsert, Requests , KBA , LOD-SF-RCM-INT , Integration Center & Intelligent Services , LOD-SF-INT , Integrations , How To

Product

SAP SuccessFactors Recruiting all versions