GetIds API
Description
This web service takes an ‘SObject’ name and an optional ‘whereClause’ and returns a list of IDs.
There can be certain filter criteria based on which the user can retrieve records. This filter criterion needs to be provided in the ‘whereClause’.
For example, fetch all the applications whose last created date is greater than a specified date or get all the applications whose status is approved.
Definition
POST https://<domain>/services/apexrest/intframework/q2-dataApi/ids
Authentication Type
Basic Salesforce Auth 2.0
See this link for SFDC Documentation: https://help.salesforce.com/articleView?id=remoteaccess_oauth_web_server_flow.htm&type=5
Parameters
Request Header Parameters
The following table provides the details of the request header parameters used by this web service:
Key | Value |
---|---|
Content-Type | application/JSON |
charset | UTF-8 |
Accept | application/JSON |
Request Body Parameters
The following table provides the details of the request body parameters used by this web service:
Field Name | Type |
---|---|
SObject | string |
whereClause (Optional) | string |
Error Messages
When you use this web service you can receive the possible error messages as shown in the following table:
Status Code | Error Message |
---|---|
400 | Request JSON is invalid. |
400 | Missing header in request - Content-Type : application/JSON. |
400 | Invalid or missing SObject name in the request. |
400 | Invalid value provided for 'whereClause' in the request. |
404 | Not Found |
Sample Request
The sample request to be sent is as shown in the following block:
{ "SObject" : "genesis__Applications__c", "whereClause" : "genesis__Status__c='APPROVED'" }
Sample Response
The sample response that you receive is as shown in the following block:
{ "genesis__Applications__c": [ "a6h5f000000Ck6cAAC", "a6h5f000000CjyHAAS", "a6h5f000000ChEHAA0", "a6h5f000000ChyJAAS" ] }