"startJobParameters must not be null" when calling UiPath.Server.Configuration.OData.StartJobs

Hi
I investigated forum and didn’t find any solution which helped me.
I want to create Job
I try to send POST request /odata/Jobs/UiPath.Server.Configuration.OData.StartJobs
with next body:

{
    "processName": "BVT_SGI_TestCases",
    "robotName": "rci\\NagaMahitha.Yalamanc",
    "jobsCount": 1,
    "jobPriority":"Normal",
    "strategy":"ModernJobsCount",
    "runtimeType":"Unattended"
}

and next headers:

"Content-Type", "application/json"
"x-uipath-organizationunitid", "2"
"Accept", "application/json"

and after that I get only this response: {"message":"startJobParameters must not be null","errorCode":0,"resourceIds":null}

When I try to send this request via web and I look in the console web at networks
There are the same body and headers and everything is OK.
Can you help me please with this issue?

@Ivan_synyk

Welcome to forums

Check below post for your reference

Hope this will help you to solve your issue

Thanks

Yes
I also tried call it with input arguments and it doesn’t work for me

Hi @Ivan_synyk

Welcome to UiPath Forum.

Please have a look at the below

Make sure authentication headers, endpoint, body with release key are given properly.

Hope this will be helpful. Thank you

The response you are receiving is letting you know that what you provided in your payload BODY does not match the expected schema/model of the endpoint that you are calling for the startJobParameters model

HTTP 400 Bad Request

{
    "message": "startJobParameters must not be null",
    "errorCode": 0,
    "resourceIds": null
}

From the sample POST that you provided, it appears like you are attempting to start a job in a Modern Folder based on the indicated Strategy value you are passing.

My first question would be

  1. What version of Orchestrator are you running?

I am using 20.10 myself in a private installation and a quick inspection of Starting a Job in a Modern Folder looks like the following.

Machine & User passed in the request

{
  "startInfo": {
    "ReleaseKey": "3e987654-1ec9-4def-8197-123456987654",
    "RobotIds": [
      512
    ],
    "MachineSessionIds": [
      371
    ],
    "JobsCount": 1,
    "JobPriority": "Normal",
    "Strategy": "ModernJobsCount",
    "RuntimeType": "NonProduction",
    "InputArguments": "{}"
  }
}

Machine & User set to ‘ANY’

{
  "startInfo": {
    "ReleaseKey": "3e987654-1ec9-4def-8197-123456987654",
    "RobotIds": [],
    "JobsCount": 1,
    "JobPriority": "Normal",
    "Strategy": "ModernJobsCount",
    "RuntimeType": "NonProduction",
    "InputArguments": "{}"
  }
}

So the obvious difference for me is the inclusion of ReleaseKey, RobotIds, & MachineSessionIds.

Reviewing the Swagger documentation which can be view by browsing to https://ourchestrator/swagger/index.html#/Jobs/Jobs_StartJobs I can see the ReleaseKey is indeed required, at least with my current version and I don’t see a reference to processName, nor robotName.

Assuming you are running 21.10 or the active version in cloud, we can view swagger there as well. https://cloud.uipath.com/--org--/--tenant--/swagger/index.html#/Jobs/Jobs_StartJobs which has some additional keys for the newer features since 2020, but still largely looks the same.

I would take the time to inspect your network traffic again for comparison when performing the actions in the UI. If my assumptions above are not accurate please provide more details about your environment so that others may be able to provide better answers targeted to your issue.

Along with inspecting your requests, please take some time to review the available documentation which you may find these helpful.

2 Likes

Hello Ivan,
Here is a video on how to start a job inside Modern Folder:

Code:

Thanks,
Cristian

2 Likes

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