- URL:
« /RestApi/Query?authToken=<authToken>&selectQuery=<selectQuery> »
- Method: GET
- URL Params:
- authToken [string] [Required]=the authentication token
- selectQuery [string] [Required]=the select query. Example: “SELECT Name FROM Account WHERE Id=1329023730348722379”.
- Success Response:
- Status Code=200 (OK)
- Returned Data [in XML or JSON]=a list of the selected records
Example of returned data (in xml format):
<Data>
<Account>
<Name>
Account Test 1
</Name>
<Address>
Address Test 1
</Address>
</Account>
<Account>
<Name>
Account Test 2
</Name>
<Address>
Address Test 2
</Address>
</Account>
</Data>
- Error Response:
- Status Code=401 (Unauthorized) (in case of a wrong authentication token)
- Or
- Status Code=400 (BadRequest) (in case the “querying data” operation was unsuccessful)
- Keywords :
Supported Keywords | Description | Example |
---|---|---|
LIMIT | Returns only first n rows (n < 2000), n being the value specified after the keyword “LIMIT” (First 10 rows in this example). | “SELECT Id, Name FROM Lead LIMIT 10” |
OFFSET | Returns a max of 2000 records starting the nth row (10th row in this example). | “SELECT Id, Name From Contact WHERE OwnerId=UserId OFFSET 10” |