Add item to que via API

I am trying to find examples of adding an item to a que using API. Does anybody have an html/java example. I just need a simple example so I can research the components and truly understand it. I would love to be able to create a simple forum with a txt box and a button that submits that item to the que.

I found this information but not sure what to do with it at this point.

HEADERS

Content-Type
application/json
X-UIPATH-TenantName
{{tenantName}}
X-UIPATH-OrganizationUnitId
{{folderId}}

{
“itemData”: {
“Name”: “TestQueue”,
“Priority”: “Normal”,
“SpecificContent”: {
“First”: “Some String Value Here”,
“First@odata.type”: “#String”,
“Second”: 516,
“Fourth”: “Did I skip the Third value?”,
“AnotherKey”: true
}
}
}

================
I found this that might do the trick, but I do not know what needs to be modified to make it work.

indent preformatted text by 4 spaces

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $.post("https://server.company.com/odata/Queues/UiPathODataSvc.AddQueueItem",
    {
"itemData": {
	--data-raw '{
    "itemData": {
        "Name": "TestQueue",
        "Priority": "Normal",
        "SpecificContent": {
            "Type": "Customer",
    		"Name@odata.type": "#String",
            "Name": "Some Guy"
        }
	    }
    },
    function(data,status){
      alert("Data: " + data + "\nStatus: " + status);
    });
  });
});
</script>
</head>
<body>

<button>Send an HTTP POST request to a page and get the result back</button>

</body>
</html>

Hi @LeftBrainCo Were you able to find a solution for this. I have a similar requirement ?

I was not.

Check this out. It might be helpful.

Thanks

1 Like