odata/QueueItems is failing withInvalid OData query options and errorCode 999

Hi All,

I am trying to get the failed queue items from the Orchestrator queue using the below API. But it is failing with the response error code 999. Any insights will help on this.

Orchestrator API:

https://<Orchestrator>/Development/orchestrator_/odata/odata/QueueItems

Response:

{"message":"Invalid OData query options.","errorCode":999,"traceId":"00-d4c4228626277dff2007ca4f77211be5-f443becf43262f05-00"}

Payload:

{
      "Name": "Queue Name",
      "Priority": "Normal", 
      "SpecificContent": {},
      "DeferDate": null,
      "DueDate": null,
      "RiskSlaDate": null,
      "Reference": null,
      "Progress": null
}

Can you try to disable the Strict API setting in your Orchestrator → Tenant → Settings → General → API Settings?

Strict API → If enabled, certain API fields become non-filterable and/or non-sortable, thus helping prevent performance issues. You can see a list of these fields in the dedicated page.

This setting is enabled by default for new tenants, but existing tenants need to be opted in manually.

Keeping this option enabled at all times is a recommended best practice in API integrations.

Hi @marian.platonov,

Thank you for your reply, its a On-Prem Orchestrator 2024.10.0. There is no option in the Tenant → Settings → General tab to enable/disable the Strict API.

Provide more details on how you are running the query.
We need to see the Full URL, Parameters, Method, Headers, Payload.
In Swagger, are you able to run it?

@marian.platonov,

From Swagger I am not able to do that due to the authentication issue, I am trying it from Postman. With the below collection I am not able to get all items, but I want to get only the failed items based on today’s end processing date.

Method: GET

url: https://<orchestrator>/Development/orchestrator_/odata/odata/QueueItems

Body:
{
      "Name": "QueueName",
      "Priority": "Normal", 
      "SpecificContent": {},
      "DeferDate": null,
      "DueDate": null,
      "RiskSlaDate": null,
      "Reference": null,
      "Progress": null
}

Headers:
Authorization - Bearer <tokenid>
X-UIPATH-OrganizationUnitId - 31
Content-Type - application/json;odata.metadata=minimal;odata.streaming=true

Additionally I have tried with this, But I am getting all items without any filtering

From what I see the URL is incorrect (you added one extra odata in it).
Correct it, to be like https://ORCHESTRATOR_ADDRESS/odata/QueueItems
Then, you can add gradually extra filtering or expand if it is allowed.

Also, for GET requests, you don’t need a body in Orchestrator API calls.

Example:
image

@marian.platonov ,

I am using this, but getting all items instead of the failed one

https://<Orchestrator>/Development/orchestrator_/odata/QueueItems?filter=QueueDefinitionId%20eq%203528%20%20and%20(Status%20eq%20%272%27))&$expand=Robot,ReviewerUser&$orderby=Id%20desc

Raise a new topic for the new behavior if you cannot find the answer in another topics.

The filter will look like $filter=((QueueDefinitionId eq 3528) and (Status eq '2'))

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.