| Type | Name | Required | Description |
|---|---|---|---|
| string | api_key | ✔ | The application key associated with the calling application. |
| string | session_key | ✔ | The session key of the logged in user. |
| float | call_id | ✔ | The request's sequence number. Each successive call for any session must use a sequence number greater than the last. We suggest using the current time in milliseconds, such as PHP's microtime(true) function. |
| string | sig | ✔ | An MD5 hash of the current request and your secret key, as described in the authentication guide. |
| string | v | ✔ | This must be set to 1.0 to use this version of the API. |
| string | format | Desired response format. Either XML (default) or JSON. | |
| string | callback | Name of a function to call. This is primarily to enable cross-domain JavaScript requests using the <script> tag, also known as JSONP, and works with both the XML and JSON formats. The function will be called with the response passed as the parameter. | |
| string | query | ✔ | The query to perform, as described in the rql documentation. |
Be warned that if using JSON as the output format, you may run into problems when selecting multiple fields with the same name or with selecting multiple "anonymous" fields (e.g. SELECT 1+2, 3+4 ...).
This method returns data that very closely resembles the returns of other API calls like users.getInfo; this is not a coincidence - in fact, many of the other API functions are simply wrappers for rql queries. Note that it preserves the order of the fields in your SELECT clause and that it can contain multiple elements with the same name depending on how you structure the query.
| Code | Description |
|---|---|
| 1 | An unknown error occurred. Please resubmit the request. |
| 2 | The service is not available at this time. |
| 4 | The application has reached the maximum number of requests allowed. More requests are allowed once the time window has completed. |
| 5 | The request came from a remote address not allowed by this application. |
| 100 | One of the parameters specified was missing or invalid. |
| 101 | The api key submitted is not associated with any known application. |
| 102 | The session key was improperly submitted or has reached its timeout. Direct the user to log in again to obtain another key. |
| 103 | The submitted call_id was not greater than the previous call_id for this session. |
| 104 | Incorrect signature. |
| 601 | Error while parsing rql statement. |
| 602 | The field you requested does not exist. |
| 603 | The table you requested does not exist. |
| 604 | Your statement is not indexable. |
| 605 | The function you called does not exist. |
| 606 | Wrong number of arguments passed into the function. |