POST /api/v1/query
Use this API to query the Salesforce CDP data lake across data model, lake,
unified, and linked objects.
Syntax
- HTTP method
- POST
- Availability
- Salesforce CDP v1.0, Salesforce v51.0
- Formats
- REST
- URI
- /api/v1/query
Request Parameters
| Field Name | Field Type | Description |
|---|---|---|
| limit | int | The numbers of records to be returned. Example: 10 |
| offset | int | Number of rows to skip before starting to return. Example: 100 |
| orderby | string | Comma separated values to sort the result-set in ascending or descending order. Example: GenderId__c ASC,Occupation__c DESC |
Examples
- Request
-
1{ 2 "sql": "select BirthDate__c, DataSourceId__c, DataSourceObjectId__c, ExternalRecordId__c, FirstName__c, GenderId__c, Id__c, InternalOrganizationId__c, LastName__c from Individual__dlm where Id__c='100470169'” 3 } - Response
-
1{ 2 "data": [ 3 { 4 "Id__c": "100470169", 5 "GenderId__c": "M", 6 "FirstName__c": "Joshua", 7 "LastName__c": "Carrier", 8 "BirthDate__c": "1994-01-21T00:00:00", 9 "ExternalRecordId__c": "003f200002a3227163", 10 "DataSourceId__c": "SubscribedUsers", 11 "InternalOrganizationId__c": "", 12 "DataSourceObjectId__c": "Subscribers_for_CDP" 13 } 14 ], 15 "startTime": "2020-12-19T06:50:05.251Z", 16 "endTime": "2020-12-19T06:50:05.251Z", 17 "rowCount": 1, 18 "queryId": "3442db1a-ecef-42b3-b0d8-971ee459efa4" 19}
HTTP Responses
| Response | Reason |
|---|---|
| 200 OK | Callback successfully verified |
| 400 Bad Request | Invalid request |
| 403 Forbidden | Failed to pass authorization. |
| 404 Not Found | Incorrect callback ID, verification key, or both. |
| 422 Unprocessable Entity | Attribute name used in fields/filter parameter does not exist. |
| 500 Server Error | Internal error |