Error obtained when start job Orchestrator API is executed

Hi All,

I am getting below error when start job orchestrator api is executed

{

"message": "Some of the robots provided don't exist.",

"errorCode": 1002,

"resourceIds": null

}

In Orchestrator UI , I can see robots are connected and licensed but in API response getting error 1002

You’ll need to provide more information about the request and payload you are sending for anyone to offer any insight.

Hi Team,

I am using orchestrator Robot get all API

Request - GET - {{url}}/odata/Robots

I am providing autorization token , X-UIPATH-TenantName which is my tenant name and X-UIPATH-OrganizationUnitId which is the folder-id

I am getting below response 200 -OK

{

"@odata.context": "https://cloud.uipath.com/idmwobrmrjqb/DefaultTenant/orchestrator_/odata/$metadata#Robots",

"@odata.count": 0,

"value": []

}

Here the robot count is 0 whereas in the orchestrator , i can see 2 attended robots

Hi All,

I am using UiPath community edition.
I have configured 2 attended robots and I can see them in orchestrator - Tenant - Robot tab as below

Using postman, I want to execute orchestrator API - Robots get all

API - details and payloads are as below -

GET - {{url}}/odata/Robots

I am giving Authorization token , my tenant-name [X-UIPATH-TenantName] and folderid [X-UIPATH-OrganizationUnitId]

Response is 200 ok , however API did not return any robot details

Got below response

{
“@odata.context”: “UiPath”,
“@odata.count”: 0,
“value”:
}

I have below questions -

  1. Why I am getting count 0 in api response when I can see robots in orchestrator tenant ?

  2. Is Robot API execution supported in community edition ?

Please suggest .

Looks like you are attempting to query the Configured Robots of a tenant and not the Provisioned Robots of a Folder (Such as an unattended Robot in a Classic Folder).

Please have a look at a few of the other endpoints under Robots in swagger.

  • /odata/Robots/UiPath.Server.Configuration.OData.FindAllAcrossFolders
  • /odata/Robots/UiPath.Server.Configuration.OData.GetConfiguredRobots
  • /odata/Robots/UiPath.Server.Configuration.OData.GetFolderRobots
  • ​/odata​/Robots​/UiPath.Server.Configuration.OData.GetRobotsForProcess
  • ​/odata​/Robots​/UiPath.Server.Configuration.OData.GetRobotsFromFolder

Some helpful references

Another helpful tool, when you are not sure which endpoint to use is to inspect your Network Traffic in your browser while you perform the actions in the Orchestrator Web UI.

As a side note, there are other Headers you can pass along instead of the Ids for Organization or Folder such as

  • X-UIPATH-OrganizationUnitId
  • X-UIPATH-FolderPath-Encoded
  • X-UIPATH-FolderPath
  • X-UIPATH-FolderId

https://docs.uipath.com/orchestrator/reference/building-api-requests

1 Like

Are the robots added to the environment the process is in?

Using endpoint - /odata/Robots/UiPath.Server.Configuration.OData.GetConfiguredRobots, I got 2 robots in response .

I used robotID got from above response as input in another API -

{{url}}/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs
in body provided below details

{ “startInfo”:

{ “ReleaseKey”: “f689e02d-f968-494f-8b37-409a1bd85534”,

 "Strategy": "Specific",

 "RobotIds": [ 9826 ],

 "JobsCount": 0,

 "Source": "Manual" 

}

}

But it failed with 400 error code and got below response

{

"message": "Some of the robots provided don't exist.",

"errorCode": 1002,

"resourceIds": null

}

I have some questions -

  1. I am using attended robot id and Uipath community edition . am I allowed to execute start jobs api on this setup ?
  1. I am currently using Uipath community edition.
  2. In orchestrator , robot are part of Automation Developer group .

Am I missing any configuration step here ?

These are Modern Folders / Robots and not Classic so Environment would not apply.

So one thing to note is that you cannot trigger / schedule a Job from Orchestrator for an Attended Type robot, this was restricted a few versions ago. This was for security and user experience so arbitrary jobs could not be invoked on a user who was unaware.

So in order to trigger or schedule a job for the users/robots you are describing you would first need to update their User profile to include an Unattended Robot. Tenent > Manage Access > Edit desired User > Tab 2 Robot Setup > Enable Unattended Robot with desired setting.

From there you should be able to assign the Robot when you initiate a Job. If you are unfamilar with the different robots and capabilities and the APIs. I would recommend first going through the motions in the Orchestrator Web UI, and watching the Network requests using the Browser’s development Tools.

This is a good way to see how curtain properties are fetched and which ones are included in various requests.

The other thing to check while using Modern Folders is that you have assigned the appropriate User/Robot to the Folder as well as machine. Tenant > Folders

When you create a process you have to put the process into an Environment. You also have to put the Robots into that same Environment to be able to run it.

Thanks for the help Tim. I changed the robot type to unattended and it worked.

I am able to execute job using api.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.