Custom Job Name from Server REST API

Hi All,

I am wondering whether there is an option to specify a custom job name in the Server REST API (similar to the option that exists when executing a server job manually on the server from the desktop AP)?

Thanks

Steve

Hi Steve,

I don’t think there is a single rest endpoint for this. However, you can create, update, execute a job with three separate rest calls. In the update call you can set the job title.

I’ve built a workflow to set some other property, but it should be quite close to what you need:

I’ll see whether I can find you the exact property to set.

Kind regards
Marvin

1 Like

Hi Steve,

to no surprise, the field you’d want to set is called name. This could be the body of the PUT Request node:

{
  "name": "hello"
}

I tried passing this as the request body of the first POST Request (i.e. during job creation), but that does not seem to work. Hence, create, update, execute would indeed be the three REST calls.

Kind regards
Marvin

1 Like

Thanks Marvin - that’s great!

Even better, I can use the same JSON Path node to extract the existing name, as what I want to do is add an identifiable suffix onto it

(We have a number of workflows which create in the region of 50 jobs for a second workflow each time they execute - when all is working fine, the anonymity of those jobs isn’t really an issue, but as soon as something goes wrong…!)

Many thanks!

Steve

1 Like

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