Get Business Objects by Number of Records
Fetches business object records based on the defined number of records to be displayed. For example, you can define to fetch 50 records.
By default, the application fetches 25 records and the maximum number of records you can define to fetch is 100.
Base URL:
https://{tenant url}/api/odata/businessobject/{business object name}?$top={number of records to display}
Ensure the business object name is suffixed with an "s".
Here is an example to fetch the defined number of incident records.
URL |
https://{tenant url}/api/odata/businessobject/Incidents?$top=40 |
Method |
GET |
Header Name | Authorization: JTW Token/Session Key/REST API Key |
Status Code |
200 |
Response Payload |
Click to view the response payload
The response displayed is only a sample, it does not have the exact number of records defined to fetch nor all the fields are displayed. { "@odata.context": "https://ism-mastertest-tenant2.ivanticlouddev.com/api/odata/$metadata#incidents", "@odata.count": 572, "value": [ { "ActualCategory_Valid": "14348C1FFA044D8AB1E93005B4A0A287", "ActualCategory": "Missing Item", "CreatedBy": "JClerk", "CreatedDateTime": "2011-07-24T23:42:48Z", "Email": "[email protected]", }, { "ActualCategory_Valid": null, "ActualCategory": null, "CreatedBy": "Email Listener", "CreatedDateTime": "2019-07-05T09:25:41Z", "Email": "[email protected]", }, { "ActualCategory_Valid": "B30A0BC3F3174B22B328D742C24B59C4", "ActualCategory": "Account Lockout", "CreatedBy": "Admin", "CreatedDateTime": "2011-09-20T08:42:00Z", "Email": "[email protected]", }, { "ActualCategory_Valid": "4A550AD1778746FCBA65A19A630AC2C9", "ActualCategory": "Printer Failure", "CreatedBy": "Admin", "CreatedDateTime": "2011-03-25T20:42:37Z", "Email": "[email protected]", }, { "ActualCategory_Valid": "B30A0BC3F3174B22B328D742C24B59C4", "ActualCategory": "Account Lockout", "CreatedBy": "Admin", "CreatedDateTime": "2011-05-10T04:42:00Z", "Email": "[email protected]", }, |
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 records without providing the Top value.
https://{tenant url}/api/odata/businessobject/Incidents?$top=
Header Name:
Authorization: Sessionkey
Code | ISM_5000 |
Description | Invalid Request |
Message |
{ "code": "ISM_5000", "description": "Internal server error", "message": "", "help": "" } |
HTTP STATUS CODE |
500 |
Scenario: Trying to fetch more than 100 records.
https://{tenant url}/api/odata/businessobject/Incidents?$top=120
Header Name:
Authorization: Sessionkey
Code | ISM_5000 |
Description | Invalid Request |
Message |
[ "You cannot query more than 100 records." ] |
HTTP STATUS CODE |
500 |