Add Queue Item using API

Hi Everyone,

In our process, we are building a bot to push queue items using API. The structure of the JSON body:

""{""itemData"": {""Name"": ""Value1"",""Priority"": ""Value2"",""SpecificContent"": {""Data"": [{""Key3"": ""Test"",""Key4"": ""TES8"",""Key5"": ""Test"",""Key6"": ""1234 Street""}] }}}""

The error message logged:
{
“message”: “queueItemParameters must not be null”,
“errorCode”: 0,
“resourceIds”: null
}

Inside the Specific Content, we need to add a key with an array value. Can anyone help me on this one?

Thanks,

2 Likes

Hi @john.mari

Please check below link

https://www.postman.com/uipath/workspace/uipath-s-public-workspace/request/3707132-727e0f44-7d6e-460a-b015-fd2ceb444dd8

1 Like

We are using On-Prem Orchestrator, we can’t able to establish the connection to the orchestrator.

1 Like

Hey @john.mari

I guess you are missing few mandatory parameters like Name and Priority !

Adding Reference may also be useful

Thanks
#nK

No, we added those parameters in the body.

1 Like

Hey @john.mari

Then it should work, could you please show the full request body please.

Thanks
#nK

Hello @john.mari ,

Check the below post. I think it should help.

image

The queue data need to add like the above image.

We were able to add a queue like the one mentioned in the above thread. But, we can’t able to add a queue item with a “Key”: “Object Value”.

1 Like

Hey @john.mari

What do you mean by key object value ?

Thanks
#nK

Hi @john.mari,

Here is a sample of what you should send in the Request Body of the Add Queue Item API End Point. This should generate Key Value Pairs under Specific Data.

{
  "itemData": {
    "Name": "Test",
    "Priority": "High",
    "SpecificContent": {
      "Key1": "ObjectValue1",
      "Key2": "ObjectValue2",
      "Key3": "ObjectValue3"
    },
    "DeferDate": "2022-05-10T09:49:37.758Z",
    "DueDate": "2022-05-12T09:49:37.758Z",
    "RiskSlaDate": "2022-05-11T09:49:37.758Z",
    "Reference": "SomeUniqueReference",
    "Progress": "New"
  }
}

Hope that helps !

Regards,
Nithin

1 Like

The Object is JSON Array. We are passing value as JSON array for the Data key.

1 Like

Hey @john.mari

I guess I tried once but unable to succeed in previous versions.

Thanks
#nK

(post deleted by author)

(post deleted by author)

Hi @john.mari,

Please verify the below mentioned format.

"{""itemData"": {""Name"": ""Value1"",""Priority"": ""Value2"",""SpecificContent"": {""Data"": ""[{\""Key3\"":\""Test\"",\""Key4\"":\""TES8\"",\""Key5\"":\""Test\"",\""Key6\"":\""1234Street\""}]""}}}"

Try this in the “Body” parameter of “HttpRequest” activity.

Thanks

2 Likes

I tried it. It works well. Thank you

The reason is that SpecificContent is looking for a Dictionary(Of String, Object) and does not support more complex JSON Object. You are better off leveraging your library of choice to craft your JSON and serializing the parts that require it when needed in order to keep your JSON String building simple.

Please see the following post using JSON.stringify in Postman to prepare the data

1 Like

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