# Cloud Orchestrator Swagger API throwing OData query options error using /QueueItems/QueueItems\_Get

**URL:** <https://forum.uipath.com/t/cloud-orchestrator-swagger-api-throwing-odata-query-options-error-using-queueitems-queueitems-get/717705>\
**Category:** Orchestrator\
**Tags:** question, orchestrator\
**Created:** [February 6, 2024, 3:22pm UTC](https://forum.uipath.com/t/cloud-orchestrator-swagger-api-throwing-odata-query-options-error-using-queueitems-queueitems-get/717705 "2024-02-06T15:22:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![riverrat437](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/riverrat437/32/193080_2.png) [@riverrat437](https://forum.uipath.com/u/riverrat437)\
**Post date:** [February 6, 2024, 3:22pm UTC](https://forum.uipath.com/t/cloud-orchestrator-swagger-api-throwing-odata-query-options-error-using-queueitems-queueitems-get/717705/1 "2024-02-06T15:22:04Z")

</div>

Having an odd issue with the Cloud Orchestrator Swagger interface (v17 according to the web page). This is an enterprise license cloud instance not community.

After setting up Authentication, using the /odata/QueueItems swagger GET call using the default Paramters settings, the call works just fine returning a 200 with a resulting Response Body of all queue items found.

But, changing the $orderby parameters to include CreationTime, it returns a HTTP 400 with this error:

{  
“message”: “Invalid OData query options.”,  
“errorCode”: 1000,  
“traceId”: “00-48f0c31ceb314cb64311c85fd0a814e1-b9cfd813159abfe2-00”  
}

Interestingly, clearing CreationTime from $orderby and putting CreationTime in $select, it works just fine again. It returns with a HTTP 200 with a list of the queue items found each its respective CreationTime attribute only like it should.

This /odata/QueueItems API works in an v2022.10 onpremise Orchestrator just fine using $sortby with CreationTime just fine.

Anyone seen anything like this ?

---

<div class="post-metadata">

**Author:** ![Parvathy](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/parvathy/32/484539_2.png) [@Parvathy](https://forum.uipath.com/u/Parvathy)\
**Post date:** [February 6, 2024, 3:27pm UTC](https://forum.uipath.com/t/cloud-orchestrator-swagger-api-throwing-odata-query-options-error-using-queueitems-queueitems-get/717705/2 "2024-02-06T15:27:04Z")

</div>

Hi @riverrat437

Check out this thread

> [@Orchestrator API query functions](https://forum.uipath.com/t/orchestrator-api-query-functions/185719/3):
>
> @zweerk01, Try this: $filter = Timestamp gt 2019-12-01T00:00:00.00Z and Timestamp lt 2019-12-31T00:00:00.00Z You can use the following function operators (with examples): Source:

Regards

---

<div class="post-metadata">

**Author:** ![rikulsilva](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rikulsilva/32/462189_2.png) [@rikulsilva](https://forum.uipath.com/u/rikulsilva)\
**Post date:** [February 6, 2024, 3:32pm UTC](https://forum.uipath.com/t/cloud-orchestrator-swagger-api-throwing-odata-query-options-error-using-queueitems-queueitems-get/717705/3 "2024-02-06T15:32:04Z")

</div>

Hi @riverrat437

I’m not sure if it related, but check out this thread

[Get queue items returns error “Invalid odata query options code 1000” - Help / Activities - UiPath Community Forum](https://forum.uipath.com/t/get-queue-items-returns-error-invalid-odata-query-options-code-1000/711827)

Cheers

---

<div class="post-metadata">

**Author:** ![riverrat437](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/riverrat437/32/193080_2.png) [@riverrat437](https://forum.uipath.com/u/riverrat437)\
**Post date:** [February 6, 2024, 4:16pm UTC](https://forum.uipath.com/t/cloud-orchestrator-swagger-api-throwing-odata-query-options-error-using-queueitems-queueitems-get/717705/4 "2024-02-06T16:16:41Z")

</div>

Thanks for both replies. While the replies are interesting, looking to find out why its not working as stated. Not for alternatives at this point. The API in question is currently used within a custom built application against an onpremise Orchestrator v2022.10.4 (I think) and it works just fine using $orderby = CreationTime.

I just tried it with my personal community licensed Cloud Orchestrator tenant in Swagger. In that tenant’s swagger interface the /odata/GetItems GET API works like it should using $orderby = CreationTime.

For some reason in this enterprise license Cloud Orchestrator tenant’s swagger interface, that API call using $orderby = CreationTime fails with a HTTP 400. Using CreationTime in the $select parameter it returns a HTTP 200 - not sure if this test is helpful but clearly shows the CreationTime attribute is functional in other input parameters to that API call.

---

<div class="post-metadata">

**Author:** ![Jon\_Smith](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jon_smith/32/523286_2.png) [@Jon\_Smith](https://forum.uipath.com/u/Jon_Smith)\
**Post date:** [February 6, 2024, 5:27pm UTC](https://forum.uipath.com/t/cloud-orchestrator-swagger-api-throwing-odata-query-options-error-using-queueitems-queueitems-get/717705/5 "2024-02-06T17:27:18Z")

</div>

You sure you didnt turn strict API on? (Its under Tenant Settings)  
This is exactly the error I would expect if its on.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/9/c/4/9c478885673066f55755e731ba39a7f2fc16f53e.png)

---

<div class="post-metadata">

**Author:** ![riverrat437](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/riverrat437/32/193080_2.png) [@riverrat437](https://forum.uipath.com/u/riverrat437)\
**Post date:** [February 6, 2024, 6:26pm UTC](https://forum.uipath.com/t/cloud-orchestrator-swagger-api-throwing-odata-query-options-error-using-queueitems-queueitems-get/717705/6 "2024-02-06T18:26:49Z")

</div>

Thank you so much !! 🙂

That was it. Works fine now. For anyone else, look here:

> **[Orchestrator - Managing Logical Resources](https://docs.uipath.com/orchestrator/automation-cloud/latest/api-guide/managing-logical-resources#strict-api)**
>
> The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [February 9, 2024, 6:27pm UTC](https://forum.uipath.com/t/cloud-orchestrator-swagger-api-throwing-odata-query-options-error-using-queueitems-queueitems-get/717705/7 "2024-02-09T18:27:46Z")

</div>

Closed on February 9, 2024, 6:27pm UTC

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