Get Business Object by Order
Fetches business object records by the defined order. For example, you can define to display the business object records in ascending order.
Base URL:
https://{tenant url}/api/odata/businessobject/{business object name}?$orderby={order parameter}
Ensure the business object name is suffixed with an "s".
Here is an example to fetch incidents by its incident number in ascending order.
URL |
https://{tenant url}/api/odata/businessobject/incidents?$orderby=IncidentNumber asc |
Method |
GET |
Header Name | Authorization: JTW Token/Session Key/REST API Key |
Status Code |
200 |
|
Click to view response payload
{ "@odata.context": "{tenant url}/api/odata/$metadata#incidents", "@odata.count": 44, "value": [ { "ActualCategory_Valid": "641C539C94A449FDBEC1FCCE462E8C89", "ActualCategory": "Application Error", "CreatedBy": "JClerk", "Email": "[email protected]", "IncidentNumber": 10001, "IsNotification": true, "IsVIP": false, }, { "ActualCategory_Valid": "601387668EAE4F09BB6D8DE4E922B2C7", "ActualCategory": "Connectivity", "CreatedBy": "Email Listener", "Email": "[email protected]", "IncidentNumber": 10002, "IsNotification": true, "IsVIP": false, }, { "ActualCategory_Valid": "B30A0BC3F3174B22B328D742C24B59C4", "ActualCategory": "Account Lockout", "CreatedBy": "Admin", "Email": "[email protected]", "IncidentNumber": 10003, "IsNotification": true, "IsVIP": false, }, |
The data displayed in the Response Payload is only a sample data, it does not contain the full list of responses but only a few are shown for sample.
Unsuccessful Responses
Scenario: Trying to fetch incidents when orderby is blank.
https://{tenant url}/api/odata/businessobject/incidents?$orderby=
Header Name:
Authorization: Sessionkey
Code | ISM_5000 |
Description | Invalid Request |
Message |
[ "The parameter 'orderby' cannot be empty. Please provide a valid orderby parameter and try again" ] |
HTTP STATUS CODE |
500 |
Scenario: Trying to fetch incidents when orderby is invalid.
https://{tenant url}/api/odata/businessobject/incidents?$orderby=IncidentNumber ascending
Header Name:
Authorization: Sessionkey
Code | ISM_2004 |
Description | No Content |
HTTP STATUS CODE |
204 |
If the Orderby argument is missing, then the application returns the results by ordering in ascending order which the default. For example, https://{tenant url}/api/odata/businessobject/incidents?$orderby=IncidentNumber, in this url the orderby argument 'asc' or 'desc' is missing, in such scenario, the application returns the results in ascending order.