# AddQueueItem API with SpecificCcontent schema

**URL:** <https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661>\
**Category:** Orchestrator\
**Tags:** question, orchestrator, webapi, activities\
**Created:** [March 9, 2023, 1:38pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661 "2023-03-09T13:38:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![TJ\_automates](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/tj_automates/32/263305_2.png) [@TJ\_automates](https://forum.uipath.com/u/TJ_automates)\
**Post date:** [March 9, 2023, 1:38pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/1 "2023-03-09T13:38:03Z")

</div>

Hi all,

I have a json schema for my queue, which matches up to a json file. I want to raise a queue item using the API and include this detail direct from the file. However, I am running into issues with the queue item parameters must not be null error (400). I am providing all the schema fields and other itemdata as I normally do for this call elsewhere.

I am reading my json into a text string using a read text file activity, and then creating my payload string using this assign:

```auto
"{""itemData"":{""Name"":""My Queue"",""Priority"":""High"",""Reference"":""test_ref_123"",""SpecificContent"":" + jsonText + "}}"

```

My json has quotes as per normal for a json.

Any help resolving this is appreciated!

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [March 9, 2023, 1:49pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/2 "2023-03-09T13:49:04Z")

</div>

@TJ_automates

Please check this

> [@Add Queue Item using API](https://forum.uipath.com/t/add-queue-item-using-api/421736/17):
>
> 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

Cheers

---

<div class="post-metadata">

**Author:** ![TJ\_automates](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/tj_automates/32/263305_2.png) [@TJ\_automates](https://forum.uipath.com/u/TJ_automates)\
**Post date:** [March 9, 2023, 2:28pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/3 "2023-03-09T14:28:09Z")

</div>

I keep getting json invalid using data:[.

`"{""itemData"":{""Name"":""My Queue"",""Priority"":""High"",""Reference"":""test_ref_123"",""SpecificContent"":{""Data"":""[" + response + "]""}}"`

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [March 9, 2023, 2:32pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/4 "2023-03-09T14:32:17Z")

</div>

@TJ_automates

If you are reading data from text then you dont need to escape the double quotes …if using the string directly then you need to

Can you please check

And dors your response variable contain any other special characters. Please check that as well

Cheers

---

<div class="post-metadata">

**Author:** ![TJ\_automates](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/tj_automates/32/263305_2.png) [@TJ\_automates](https://forum.uipath.com/u/TJ_automates)\
**Post date:** [March 9, 2023, 3:41pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/5 "2023-03-09T15:41:44Z")

</div>

Inside response I have a valid json, so strings are surrounded by " not “”.

I am reading repsonse into a string variable from the json file and incorporating it within an assign to create the variable payload to send in the call.

Using swagger I am able to create queue items where “data” is or [response], even though these do not match the schema, but cannot send the json inside the . The same is true even when I change the quotes inside the response json from " to “”.

---

<div class="post-metadata">

**Author:** ![TJ\_automates](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/tj_automates/32/263305_2.png) [@TJ\_automates](https://forum.uipath.com/u/TJ_automates)\
**Post date:** [March 9, 2023, 3:45pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/6 "2023-03-09T15:45:05Z")

</div>

And what is the point of the schema being defined if it isn’t used for validation anyway?

---

<div class="post-metadata">

**Author:** ![TJ\_automates](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/tj_automates/32/263305_2.png) [@TJ\_automates](https://forum.uipath.com/u/TJ_automates)\
**Post date:** [March 9, 2023, 3:48pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/7 "2023-03-09T15:48:00Z")

</div>

changing the json to " from " allowed it to pass.

However, it looks terrible in orchestrator! Can I get my json in without using the “data:” part, so it will format as individual items?

---

<div class="post-metadata">

**Author:** ![TJ\_automates](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/tj_automates/32/263305_2.png) [@TJ\_automates](https://forum.uipath.com/u/TJ_automates)\
**Post date:** [March 9, 2023, 3:55pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/8 "2023-03-09T15:55:53Z")

</div>

Or if we can’t actually format the specificcontent properly! I can’t use objects or arrays without it throwing an error, so we can only use strings, numbers and booleans? That’s very limiting.

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [March 9, 2023, 4:00pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/9 "2023-03-09T16:00:35Z")

</div>

@TJ_automates

Ideally in queue yes we are limited to use strings,numbers and booleans any other datatype are not supported.

But there are alternate ways to add them…for example if you want to add an array you can concatenate the values using any special character and then when retrieved can split on that can get the array back

same can be done with dictionary or a datatable as well…The idea is to convert or serialize them as strings and add them and later again split or deserialize them to the required object

Hope this gives some more information

cheers

---

<div class="post-metadata">

**Author:** ![TJ\_automates](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/tj_automates/32/263305_2.png) [@TJ\_automates](https://forum.uipath.com/u/TJ_automates)\
**Post date:** [March 9, 2023, 4:09pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/10 "2023-03-09T16:09:55Z")

</div>

Yeah, I hope I can deserialise the json and add each as a seperate field, combinging arrays into strings is managable and reasonably readable, but I have big dictionary objects as well which I’d sooner have srate than in a conbined string value. Is there any way to add headers to sections of specific data, or have multiple sets of data?

At the moment, my best idea is to rename the fields to “header/field”:“value” rather than “header”:“field/value/field/value/field/value”

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [March 9, 2023, 4:16pm UTC](https://forum.uipath.com/t/addqueueitem-api-with-specificccontent-schema/524661/11 "2023-03-09T16:16:18Z")

</div>

@TJ_automates

Unfortunately no…We can have only key value pairs directly…there is no sub division that we can add in queue specific content as of now

cheers
