Skip to main content
Version: v5.0

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#

ParameterTypeDescriptionRequired
nsfilterStringThe namespace of the requests which should be returned.Required

Pagination and query parameters#

ParameterTypeDescriptionRequired
pageStringSpecify pagination optionsOptional
queryStringThe query criteria string. See parameters below.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
  • _url
  • _httpMethod
  • _createdAt
  • _updatedAt

Notes on interval based querying#

For the _createdAt and _updatedAt parameters, interval-based querying is now supported using the interval setting which is given in minutes. Users can also filter requests based on predefined time ranges such as 1 hour, 2 hours, 6 hours, 12 hours, or 1 day.

Example:

/objectmodelsvc/api/v1/requests?nsfilter=OMAPISample1100_5irRpmj2&query={"_createdat": {"interval": 60}}

Additionally, custom time ranges can be specified using fromTime and toTime (both in milliseconds).

Example:

/objectmodelsvc/api/v1/requests?nsfilter=OMAPISample1100_5irRpmj2&query={"_createdat": {"fromTime": "1752194760357", "toTime": "1752194767412"}}

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#

CodeDescription
200Success
400Bad Request
401Unauthorized
403Forbidden

Response codes for _status#

The _status field in the response will contain a value which indicates the current status. See table below for details.

CodeStatus description
0Queued
1Picked
2Running
3Success
4Failure

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#

ParameterTypeDescriptionRequired
request IDStringPass the ID of the required request.Required

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringThe namespace of the requests which should be returned.Required

Response codes#

CodeDescription
200Success
400Bad Request
401Unauthorized
403Forbidden

Response codes for _status parameter#

CodeStatus description
0Queued
1Picked
2Running
3Success
4Failure

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.

Script details parameter#

If the scriptDetails=true query parameter is included in the script execution logs request, the response will include scriptDetails information.

For more information, refer to the section Notes on Script Details below.

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#

ParameterTypeDescriptionRequired
nsfilterStringThe namespace of the requests which should be returned.Required
scriptDetailsBooleanIf set to true, the response will include scriptDetails information.Optional
formatStringSpecifies that the format of the script execution logs should be JSON. Only one value json.Optional

Response codes#

CodeDescription
200Success
400Bad Request
401Unauthorized
403Forbidden

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"

Notes on Script Details parameter#

If the scriptDetails=true query parameter is included in the script execution logs request, the response will include additional information about scriptDetails.

Example request:

GET /objectmodelsvc/api/v1/requests/1e815cac-1f14-40ea-a6aa-f36a60ec1539/logs?nsfilter=OMAPISample1100_5irRpmj2&scriptDetails=true

Response::

{    "scriptDetails": {        "_userType": "iaf_obj_model_api",        "_scriptid": "671603b6e1e19d54cbfa706e",        "_scriptname": "extractAssetById"    },    "scriptExecutionLogs": "...."}

Notes on JSON support in format parameter#

To retrieve script execution logs in JSON format, you must include the setting format=jsonin the query parameters.

Note: If a parsing error occurs, the affected log line will be returned as a plain string.

Examples:#

/objectmodelsvc/api/v1/requests/<REQUEST-ID>/logs?nsfilter=OMAPISample1100_5irRpmj2&format=json

/objectmodelsvc/api/v1/requests/f9c0f198-f63f-4ed1-8a43-b8540727ce39/logs?nsfilter=OMAPISample1100_5irRpmj2&format=json