Orchestrator API Start Job not working

Hello,
I’m trying to Start a Job using API call; however an error is showing while running it:
{‘message’: “Parameter ‘name’ is missing.”, ‘errorCode’: 1014, ‘resourceIds’: None}
I made exactly like what was written in the documentation
Kindly check it and tell me what i did wrong:

res = orch.request(‘post’, ‘odata/Jobs/UiPath.Server.Configuration.OData.StartJobs’, {
“startInfo”: {
“ReleaseKey”: “XXXXXX”,
“Strategy”: “Specific”,
“RobotIds”: [
******
],
“NoOfRobots”: 0
}
})

Thank You,

Did you try testing it in swagger and see if it works there with the same body?

Thanks,
Rammohan B.

Hi @johnny123

See this post for a working body of your call:

Obviously, InputArguments is not required either.

I am trying to start a job via Orchestrator API but it throws 400 bad request error.

I am using postman to test APIs. My access_token and X-UIPATH-TenantName is correct because I am able to call GET method successfully.

Method:Post
Url: UiPath
Body: {“startInfo”: {
“ReleaseKey”: “[release key]”,
“Strategy”: “All”,
“RobotIds”: ,
“NoOfRobots”: 0
}
}
headers: Content-Type: application/json
X-UIPATH-TenantName: [service_instance_logical_name]
Authorization: Bearer [access_token]

UI studio version: 2019.10.0.beta.90 (Community Edition)

Release key getting by UiPath

Please help me to solve this issue.

Hi all,

I am facing the same issue after trying the same syntax as above. the error which I am getting is:

{
“message”: “An unexpected ‘PrimitiveValue’ node was found when reading from the JSON reader. A ‘StartArray’ node was expected.”,
“errorCode”: 0,
“resourceIds”: null
}

Hi @Akhilesh_Thakur

Could you try like that?

{
  "startInfo": {
    "ReleaseKey": "[release key]",
    "Strategy": "Specific",
    "RobotIds": [
      [robotID]
    ],
    "Source": "Manual"
  }
}

I tested it and it works like that.

1 Like

Hi - I am using powershell to invoke start job by passing the parameters like below:
$json_body = ‘{“startInfo": {“ReleaseKey": “XXXXXXX”,“RobotIds": [XX],“NoOfRobots": 0,“Strategy": “Specific”,“InputArguments”:{“Num1”:2,“Num”:2}}}’
It is working fine when there is no InputArguments. But once I added it, I am getting the below error.
Invoke-WebRequest : {“message”:“An unexpected ‘StartObject’ node was found for property named ‘InputArguments’ when reading from the JSON reader. A ‘PrimitiveValue’ node was
expected.”,“errorCode”:0,“resourceIds”:null}
At line:4 char:9

Could you please help? It must something to do with InputArguments formatting

It could be. I would suggest you to do the sample run from Orchestrator with the Network tab open. I think you can still pass arguments while starting the job from the UI, which will result in an XHR request recorded by the browser :slight_smile:
You can then pull the correct syntax from there right away.

To this problem I change https://cloud.uipath.com/ to https://platform.uipath.com/ and it found…

I tried with below
{
“startInfo”: {
“ReleaseKey”: “[ReleseKey]”,
“Strategy”: “All”,
“RobotIds”: [1244461],a
“NoOfRobots”: 0
}
}

but I am getting errors like {
“message”: “Invalid properties for execution target!”,
“errorCode”: 0,
“traceId”: “00-480727ae4989714d96ab2090c23a0310-7970e40d779c78c0-00”
}