Request history
Retrieve request history information#
To support the request history feature, three new API calls have been introduced:
Get Requests#
This API call retrieves all of the request details that the user has access to. Specifically, it will list all the requests in the namespaces that the user can access.
Note: A request may return over 200 records. To manage this output, see the pagination options described below.
Endpoints#
GET /objectmodelsvc/api/v1/requests?nsfilter=<nsfilter>Request#
Example request#
GET /objectmodelsvc/api/v1/requests?nsfilter=PTUsageMetrice4820_JtwJKL9G
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | The namespace of the requests which should be returned. | Required |
Pagination and query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
page | String | Specify pagination options. | Optional |
query | String | The query criteria string. | Optional |
Pagination support#
If your request retrieves all available requests then you can select different options for pagination and querying support. Refer to the endpoints below.
Endpoint with pagination support#
GET /objectmodelsvc/api/v1/requests?nsfilter=<nsfilter>&page={"_offset":0,"_pageSize":5}
Example request with pagination#
GET /objectmodelsvc/api/v1/requests?nsfilter=PTUsageMetrice4820_JtwJKL9G&page={"_offset":0 , "_pageSize":5}
Querying support#
Querying support is available for the following fields:
_requestid_status_namespace_jobid_apiconfigid_scriptid
Example request with querying#
GET /objectmodelsvc/api/v1/requests?nsfilter=PTUsageMetrice4820_JtwJKL9G&query={%22_requestid%22:%20%2276d96938-da17-407b-b6a7-e08af3741328%22}
Response codes#
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
Response#
Response data example#
{ "_offset": 0, "_pageSize": 5, "_total": 5, "_list": [ { "_requestid": "ae34d171-d965-cd95-9b85-f4ce67b80e6c", "_namespace": "omapione_qOOVZtcw", "_apiconfigid": null, "_scriptid": "67c9501b4351806f8c0dfe6d", "_url": "/omapione_qOOVZtcw/assets/67c9560702551e3ac67cf012", "_httpmethod": "PUT", "_status": 3, "_jobid": null, "_error": null, "_createdby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_createdat": "1741248717153", "_updatedby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_updatedat": "1741248717153" }, { "_requestid": "b2c60618-d2f5-4128-8da8-710f861d42cf", "_namespace": "omapione_qOOVZtcw", "_apiconfigid": "70c74da5-7d67-4426-a765-7c01bbeb5e6f", "_scriptid": "67c9501b4351806f8c0dfe6d", "_url": "/omapione_qOOVZtcw/assets/65aa6dbca29a44754bae172f", "_httpmethod": "GET", "_status": 3, "_jobid": "0dbb1cc5-5009-4d8c-855d-97d17a85c9a2", "_error": null, "_createdby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_createdat": "1742539979208", "_updatedby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_updatedat": "1742539979208" }, { "_requestid": "eb95b4bd-aef9-48ab-acc0-2e155d8f14e1", "_namespace": "omapione_qOOVZtcw", "_apiconfigid": "70c74da5-7d67-4426-a765-7c01bbeb5e6f", "_scriptid": "67c9501b4351806f8c0dfe6d", "_url": "/omapione_qOOVZtcw/assets/65aa6dbca29a44754bae172f", "_httpmethod": "GET", "_status": 0, "_jobid": null, "_error": null, "_createdby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_createdat": "1742540014348", "_updatedby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_updatedat": "1742540014348" }, { "_requestid": "8f65f34e-fd4c-3f52-e87f-1ac0638fc992", "_namespace": "omapione_qOOVZtcw", "_apiconfigid": null, "_scriptid": "67c9501b4351806f8c0dfe6d", "_url": "/omapione_qOOVZtcw/assets/67c9560702551e3ac67cf012", "_httpmethod": "PUT", "_status": 3, "_jobid": "b9def9f1-8f87-46f8-bb92-66e8d3913b64", "_error": null, "_createdby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_createdat": "1741248284657", "_updatedby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_updatedat": "1741248284657" }, { "_requestid": "bf511b17-1010-42d9-b2b0-726dc6501512", "_namespace": "omapione_qOOVZtcw", "_apiconfigid": "70c74da5-7d67-4426-a765-7c01bbeb5e6f", "_scriptid": "67c9501b4351806f8c0dfe6d", "_url": "/omapione_qOOVZtcw/assets/65aa6dbca29a44754bae172f", "_httpmethod": "GET", "_status": 3, "_jobid": "938f0214-d1e8-48eb-82f9-391bb229e0f2", "_error": null, "_createdby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_createdat": "1742540005487", "_updatedby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_updatedat": "1742540005487" } ]}Get Requests by ID#
The API call retrieves all the request details with a given request ID. Specifically, it will list the request details for the given ID, in the namespaces that the user can access.
Endpoints#
GET /objectmodelsvc/api/v1/requests/<request ID>?nsfilter=<nsfilter>Request#
Example request#
GET /objectmodelsvc/api/v1/requests/67401b89-3838-4e02-8645-01bcb0a3390f?nsfilter=PTUsageMetrice4820_JtwJKL9G
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
request ID | String | Pass the ID of the required request. | Required |
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | The namespace of the requests which should be returned. | Required |
Response codes#
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
Response#
{ "_timetaken": 0.898, "_result": [ { "_requestid": "b2c60618-d2f5-4128-8da8-710f861d42cf", "_namespace": "omapione_qOOVZtcw", "_apiconfigid": "70c74da5-7d67-4426-a765-7c01bbeb5e6f", "_scriptid": "67c9501b4351806f8c0dfe6d", "_url": "/omapione_qOOVZtcw/assets/65aa6dbca29a44754bae172f", "_httpmethod": "GET", "_status": 3, "_jobid": "0dbb1cc5-5009-4d8c-855d-97d17a85c9a2", "_error": null, "_createdby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_createdat": "1742539979208", "_updatedby": "c720f730-aabe-46ec-81c7-fd42c93a976c", "_updatedat": "1742539979208" } ]}
Get Request Logs#
This API call will return the script execution logs for the given OMAPI request ID. The user should have access to both the namespace and the script being executed, otherwise it will return an error message of 403.
Endpoints#
GET /objectmodelsvc/api/v1/requests/<REQUEST-ID>/logs?nsfilter=<nsfilter>Request#
Example request#
GET /objectmodelsvc/api/v1/requests/67401b89-3838-4e02-8645-01bcb0a3390f/logs?nsfilter=PTUsageMetrice4820_JtwJKL9G
Parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | The namespace of the requests which should be returned. | Required |
Response codes#
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
Response#
"{\"ScriptExecutionId\":\"0dbb1cc5-5009-4d8c-855d-97d17a85c9a2\",\"level\":\"info\",\"message\":\"assetId 65aa6dbca29a44754bae172f\\n\",\"timestamp\":\"2025-03-21T06:52:59.830Z\"}\n{\"ScriptExecutionId\":\"0dbb1cc5-5009-4d8c-855d-97d17a85c9a2\",\"level\":\"info\",\"message\":\"iaf_asset_collection {\\n _uri: '/nameduseritems/67c95603a1e852074517cdd5',\\n _name: 'Asset Collection',\\n _userType: 'iaf_ext_asset_coll',\\n _tipId: '67c95603a1e852074517cdd6',\\n _versions: [\\n {\\n _userItemDbId: '67c95603a1e852074517cdd5',\\n _id: '67c95603a1e852074517cdd6',\\n _isTip: true,\\n _metadata: [Object],\\n _version: 1\\n }\\n ],\\n _irn: 'itemsvc:nameduseritem:67c95603a1e852074517cdd5',\\n _namespaces: [ 'omapione_qOOVZtcw' ],\\n _nextVersion: 2,\\n _shortName: 'asset_coll',\\n _tipVersion: 1,\\n _versionsCount: 1,\\n _itemClass: 'NamedUserCollection',\\n _userItemId: 'asset_coll_BgoDWMTVZ0',\\n _id: '67c95603a1e852074517cdd5',\\n _description: 'Physical Asset Collection',\\n _metadata: {\\n _updatedById: 'c720f730-aabe-46ec-81c7-fd42c93a976c',\\n _createdAt: 1741248003973,\\n _createdById: 'c720f730-aabe-46ec-81c7-fd42c93a976c',\\n _updatedAt: 1741248003973\\n },\\n _kind: 'collection'\\n}\\n\",\"timestamp\":\"2025-03-21T06:53:00.626Z\"}\n{\"ScriptExecutionId\":\"0dbb1cc5-5009-4d8c-855d-97d17a85c9a2\",\"level\":\"info\",\"message\":\"iaf_asset_res { _pageSize: 0, _list: [], _offset: 0, _total: 0 }\\n\",\"timestamp\":\"2025-03-21T06:53:01.537Z\"}\n{\"ScriptExecutionId\":\"0dbb1cc5-5009-4d8c-855d-97d17a85c9a2\",\"level\":\"info\",\"message\":\"iaf_asset_res_with_array []\\n\",\"timestamp\":\"2025-03-21T06:53:01.537Z\"}\n"