Skip to main content
Version: v5.0

Async Request

Overview#

If a request takes longer than 100 seconds, a 524 timeout error may occur. To avoid this, include the parameter async=true in the request.

When this parameter is used, the API returns a URL for retrieving the result, along with an access token.

Notes on usage#

Obtaining final response#

To obtain the final response, call the returned URL and include the provided token in the request header.

See sanple request and response below.

Sample request#

/omapi/auto4244_QyfXtykr/assets/6716062088f9860c256d2af5?nsfilter=auto4244_QyfXtykr&asyncReq=true

Sample response#

{    "_requestid": "c1e2371b-143b-4c46-813f-ae469a6e67fc",    "_result": {        "url": "https://qa2-api.in.invicara.com/objectmodelsvc/api/v1/async/request/c1e2371b-143b-4c46-813f-ae469a6e67fc",        "authToken": "eyJraWQiOiI1NzU1NWRjZS0xY2IxLTQ4NzctYmM3Yy00OWM5NzAwM2M5ODQiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJLZXNhdmFuTmFyYXlhbmFuX1BsYXRBdXRvX2IxcHNrYmJqdEBtYWlsaW5hdG9yLmNvbSIsImF1ZCI6Im9iamVjdG1vZGVsU3ZjIiwibmJmIjoxNzYzNDUyNjk0LCJ1c2VyX25hbWUiOiJmYzc3YmQ2Ni1mODIyLTRjMDMtOTgzYy0wN2U5NWY1ZWI1N2YiLCJpc3MiOiJodHRwczovL3FhMS1hcGkuaW4uaW52aWNhcmEuY29tL3Bhc3Nwb3J0c3ZjL2FwaS92Mi9vYXV0aC90b2tlbiIsImV4cCI6MTc2NDA1NzQ5NCwiaWF0IjoxNzYzNDUyNjk0LCJhcHBfaWQiOiI0NTVlYTc3Ny02MGQ0LTQ1N2MtOThiZi0wNWI0YjVkOGMyMDciLCJqdGkiOiI5Yjk3ZDFmZS0yNmYxLTRjYTctODFiMy1lNmNiZjE3NThmZTciLCJjbGllbnRfaWQiOiI0NTVlYTc3Ny02MGQ0LTQ1N2MtOThiZi0wNWI0YjVkOGMyMDcifQ.Vguv798zVBsytHCR0Raold9fgpVK_WqokDcZxs2v9_L_fzvcpJM9zTVTfnMZIdaR5tQZ1pcWjPh9OeDFx0A1CCmHhx30t_ZzGa32A_9mrkhFDZaQ8sW5bOWAEnMVgQ0bn4QMWMXQCLLuAE5QK9xj9GJxsTV5m43cDUfcwgIm2Jlpj9CY6WIIE9uvv_rDBWuYU5ZTIymFbJHwhbYDOv7C_6xUkXuTKexXF8jQF0yV1v1MpP2lGoCR_aKz6JtiHYpVGJCBGXJBvtzsAFCp5DdITW6YN7k7rTx4bFd3jDHiaKlx9bnL379ThvS9OlHUiRJmZTaIAjyyKBxuP5xuQJAzWw"    }}

Retrieving the async request result#

To retrieve the result of an async OMAPI request, use the API call below, along with a valid authentication token.

/objectmodelsvc/api/v1/async/request/<REQUEST-ID>

This endpoint returns the final response generated for the async request.

Example API call#

This call returns the completed response for the specified request ID.

curl -X GET "https://qa2-api.in.invicara.com/objectmodelsvc/api/v1/async/request/c1e2371b-143b-4c46-813f-ae469a6e67fc" \  -H "Authorization: Bearer <AUTH_TOKEN>" \  -H "Content-Type: application/json"

Error responses#

ErrorDescription
Request still in progressIf the async OMAPI request has not finished processing, the response will be: "OMAPI request has not completed yet!!"
Invalid access tokenIf an invalid token is provided, the response will be: "Invalid access!!"
Response not foundIf no response is available for the given request ID and token, the API returns: "OMAPI response not found for the specified request ID and auth token."