OMAPI request history
Overview#
In Platform version 4.5, a new feature has been introduced for the Object Model API (OMAPI). Script execution logs can now be retrieved using the OMAPI request ID. A new set of API calls have been introduced which allow you to retrieve the details of each request.
Request history#
Upon receiving a script execution request, the details of the request are recorded in the request table so there is a history of every request made. The job ID data for each request is updated once the script manager acknowledges that the script execution request has been received.
The request status and any error data are updated according to the outcome of the script execution.
Request history cleanup#
Script execution requests older than thirty days are checked daily and removed from the database.
Sorting script execution logs#
You now have the ability to sort script execution logs based on their timestamp values.
To sort script execution logs, include the <SORT_VALUE> query parameter as shown below.
sort={"timestamp": <SORT_VALUE>}
Where <SORT_VALUE> should have one of the following values:
- 1 for sorting in ascending order (oldest to newest)
- -1 for sorting in descending (newest to oldest)
Notes on sorting#
Note the following when sorting script execution logs:
- Sorting is only supported when
format=jsonis specified in the request. - For sorting to work properly, all logs must be in a valid JSON format.
New API calls for retrieving request history#
To support the request history feature, three new REST API calls have been introduced to the Object Model API:
- GET Requests
- GET Requests by ID
- GET Request logs
For more information about these API calls, see the REST API page: Object Model API Service Request history.