Work With Query Parameters
REST endpoints support static and dynamic query parameters that you can add to the endpoint URL to control what data is returned in endpoint responses. For example, you can use the q
parameter to build a filter expression that restricts results based on specified criteria, or use limit
to restrict the number of records returned.
Here's a list of common query parameters that you can use with a GET method:
For detailed examples of query parameters and use cases, see Retrieving Business Objects in Accessing Business Objects Using REST APIs. See also the Endpoints reference.
Query Parameter | Type | Description |
---|---|---|
expand |
string | Returns additional information from nested objects in expanded form, for example, ?expand=Employee.JobHistory .
|
fields |
string | Filters data returned based on specified attributes, for example, ?fields=Name,Location;Employee:FirstName,LastName .
|
onlyData |
boolean | Filters data to only return field values and exclude links when onlyData=true .
|
links |
string | Returns links for a specified object, for example, ?links=linkType1,linkType2 .
|
limit |
integer | Restricts the number of records returned, for example, ?limit=200 .
To prevent the response from becoming too large, make sure you set the number of records to be fetched appropriately. If the number is too high, you're likely to run into timeout as well as internal server errors caused by a combination of factors. |
offset |
integer | Allows you to page through results by specifying the starting position from which records must be retrieved, for example, ?offset=4 .
|
totalResults |
boolean | Returns the total number of records available when totalResults=true .
|
q |
string | Specifies a filter expression that restricts the items returned based on criteria such as numeric comparisons or string matching with the values of the items’ properties, for example, ?q=(Deptno>=10 and <= 30) and (Loc!=NY) .
|
orderBy |
string | Sorts a field’s data in either ascending or descending order, for example, orderBy=salary or ?orderBy=salary:asc,DepartmentName:desc .
|