Orchestrator Add Queue Item & Get Transaction status via API call

Hi Team , Is there any api call to add Queue item from studio
Scenario : I get one queue item & I need to add that transaction item as it is to a new Queue.
Scenario 2 : I need to get the status of the Queue item through http request

@Ana_Patricia

Is there any particular reason why you’d want an API call? There are built-in Activities in Studio that does exactly these:
image

Thanks

@Ana_Patricia

There are api calls as well apart from the activities…

And you can check for them using swagger file for the input needed and how to use

<OrchestratorURL>/swagger/index.html

Cheers

Thanks Anil , will check them out . My Question is mainly on how do we pass the specific content of existing Queue item(lets say it has 20) to new queue item without deserializing .
Is there any easy way to pass the content of transaction item as it is to new queue?
Or please do share if you have any sample xaml to add queue items via api

@Ana_Patricia

If you use add queue item activity then output of transaction item can be passed directly out_TransactionItem.SpecificContent

If you want to use api then it is necessary to deserialize and send the output as a json to the request

https://docs.uipath.com/orchestrator/automation-cloud/latest/api-guide/transactions-requests#adding-a-queue-item

cheers

Do we need to create external application scope or ORchestrator API access - client id,secret are enough?

@Ana_Patricia

Creating an external application is better

If orchestrator api access is there we can usethat also…but external application is preforred

Cheers

I tried with Orchestrator API access , How do we get this Queue item id if we are using Get transaction item activity
{{url}}/odata/QueueItems({{queueItemId}})

Question2:
This is the sample body to add queue item but my requirement is that I need to get Queue item from (Get transaction item activity) . Whatever specific content is there it has to be passed dynamically to this body. How can we achieve it.
{
“itemData”: {
“DeferDate”: “2021-03-11T14:19:56.4407392Z”,
“DueDate”: “2021-03-11T15:19:56.4407392Z”,
“Priority”: “Normal”,
“Name”: “UiDemo”,
“SpecificContent”: {
“Name@odata.type”: “#String”,
“Name”: “Testymonika2000”,
“Age”: 43,
“Status”: false

    },
    "Reference": "Petstore"
}

}

@Ana_Patricia

To convert dictionary to json …you can use this

strJson= JsonConvert.SerializeObject( Dictionary)

Which can then be added to the specificContent field…

And then be used in body of request

transactionitem.Id should be giving you the id of the queue item

Cheers

Hi , Im using External App to authenticate first & its working in postman but in UiPath its showing as Invalid Client.

Request URL : https://cloud.uipath.com/identity_/connect/token

Body - Im passing in text file & reading it
{
“grant_type” : “client_credentials”,
“client_id” : “xxxxxx”,
“client_secret” : “xxxxxxx”,
“scope” : “OR.Queues.Read OR.Queue.Write”
}

Why is it working in Postman with same creds but failing in UiPath?

@Ana_Patricia

If you are using UiPath then directly use orchestrator http request activity…that does not need authentication as well…ideally from UiPath that is the way to use orch api…

Cheers