Hello,
How can I make a proper API Call with python ?
I get a open session s with https://account.uipath.com/oauth/token so I can make API call with my acount and s.get(URL, [data]) or s.post(URL, data).
All Get requests are working fine but Post are not working because I don’t understand how it is build. Swagger doesn’t provide any clue of what parameters are needed or not. And there is not good documentation with many examples.
Even the official doc (Building API Requests) doesn’t help. I want to build a AddQueueItem :
According to Swagger and Doc here’s parameters format :
{
"itemData": {
"Priority": "High",
"DeferDate": "2018-03-21T13:42:27.654Z",
"DueDate": "2018-03-25T13:42:27.654Z",
"Name": "DocQueue",
"SpecificContent": {
"Email@odata.type": "#String",
"Email": "obrian@uipath.com",
"Name@odata.type": "#String",
"Name": "O'Brian"
}
}
}
Here’s mine
{
"itemData": {
"Priority": "High",
"DeferDate": "2020-04-08T06:52:37.648Z",
"DueDate": "2020-04-08T06:52:37.648Z",
"Name": "PowerShell_Queue",
"SpecificContent": {
"Test@odata.type" : "#String",
"Test" : "test"}
}
}
All I get is this message :
{"message":"Une erreur sʹest produite.","errorCode":0,"resourceIds":null}
I can’t figure how we could make a post api call.