Start the job via API

Team,

I have got the release key from the processes… And Robot ID from robots api… But I am unable to start the job via API

Status code - 400
Body - No Content

What I am missing here?

{
“startInfo”: {
“ReleaseKey”: “7b1ebed4-8b84-485e-a598-79f86e4bb0c1”,
“Strategy”: “Specific”,
“RobotIds”: [247988],
“NoOfRobots”: 1
}
}

ROBOT ID fetched from here:

[{“LicenseKey”:null,“MachineName”:“abc-PC”,“MachineId”:231462,“Name”:“abc”,“Username”:“admin-PC\admin”,“ExternalName”:null,“Description”:null,“Version”:“19.10.0.200”,“Type”:“Development”,“HostingType”:“Standard”,“ProvisionType”:“Manual”,“Password”:null,“CredentialStoreId”:null,“UserId”:486589,“CredentialType”:null,“RobotEnvironments”:“DEV”,“IsExternalLicensed”:false,“Id”:247988,“ExecutionSettings”:null}]

Release Key fetched from here:

[{“Key”:“7b1ebed4-8b84-485e-a598-79f86e4bb0c1”,“ProcessKey”:“BlankProcess”,“ProcessVersion”:“1.0.1”,“IsLatestVersion”:false,“IsProcessDeleted”:false,“Description”:"",“Name”:“BlankProcess_DEV”,“EnvironmentId”:12387,“EnvironmentName”:“DEV”,“InputArguments”:null,“Id”:287745,“Arguments”:{“Input”:null,“Output”:null},“ProcessSettings”:null}]

@loginerror Could you please help me here?

1 2

Please get the Robot ID from performing Get Robots API and confirm if the Robot ID is correct or not

I tried with id such I got from get robots api and sessions api. Result is same.

Thanks

Can you please try including the Source parameter in the body.

{
“startInfo”: {
“ReleaseKey”: “86c35aee-ef1d-4fa8-a30c-984b91bc6cb1”,
“Strategy”: “Specific”,
“RobotIds”: [
168906
],
“Source”: “Manual”,
“InputArguments”: ‘{“in_inputBox”: “some value”}’
}
}

Same :slightly_frowning_face:

Hi @theerthaks,
Have you tried in Swagger API manual page? Was that works fine?

It’s not worked in Swagger API as well :frowning:

I can see that, you didn’t escape the input parameters. Try with escape characters.

"Arguments":"{\"input\":\"hello\"}"

Change:

"InputArguments":"{\"input\":\"hello\"}"

{
“startInfo”: {
“ReleaseKey”: “7b1ebed4-8b84-485e-a598-79f86e4bb0c1”,
“Strategy”: “Specific”,
“RobotIds”: [
247407
],
“NoOfRobots”: 0,
“JobsCount”: 0,
“Source”: “Manual”
}
}

and

{
“startInfo”: {
“ReleaseKey”: “7b1ebed4-8b84-485e-a598-79f86e4bb0c1”,
“Strategy”: “Specific”,
“RobotIds”: [
247407
],
“NoOfRobots”: 0,
“JobsCount”: 0,
“Source”: “Manual”,
“InputArguments”:"{“input”:“some value”}"
}
}

With or without Input Arguments, result is same :frowning:

It should be like
“InputArguments”:"{\“input\”:\“some value\”}"

is it mandatory?

If you published the process with arguments, it is mandatory otherwise you don’t give it

Correct. I have not used any arguments… With or without arguments, results is same :frowning:


Thank you

Okay, try giving the JSON data without spaces and new line characters. Make the JSON as single line.

@theerthaks is that works?

Sorry. No, it’s not working.

Thanks

Theertha K S

It was working for me. Which version are you using?

I discussed this issue directly with @theerthaks
Regards to this issue, I confirmed the same issue happens with me.
I was able to fix the issue by removing the quotation mark from the JSON key like below.

{
startInfo: {
ReleaseKey: “xxxxxxxxxxxxxxxxxxxxxxx”,
Strategy: “Specific”,
RobotIds: [xxxxx]
}
}

@theerthaks confirmed this fixes the issue for him as well.
I have raised this issue to documentation team.

3 Likes