Skip to content

Example Job Json

coleslaw481 edited this page Oct 13, 2014 · 6 revisions

Minimal Example Job Json

This JSON is the absolute minimum parameters that can be submitted. It assumes the caller is running a Workflow that has no parameters

{
  "name":"blah",
  "owner":"smith",
  "workflow":{
    "id":12345
  }
}

At a minimum the following parameters above must be set

  • name
  • Needs to be a non null string. All Jobs must have a name.
  • owner
  • All jobs need an owner and that owner when set via create a job REST call must match runasuser
  • workflow and id
  • id under workflow field must be set to an existing workflow.

Example Job Json with some parameters

Below is example JSON for a job with a few parameters.

{
  "name":"blah",
  "owner":"smith",
  "parameters" : [ {
    "name" :"exampletext",
    "value" : "blah"  
  }, {
    "name":"examplecheckbox",
    "value":"false"
  }, {
    "name":"examplefile",
    "value":"1234213",
    "isWorkspaceId":"true"
  } ],
  "workflow":{
    "id":12345
  }
}

NOTE: isWorkspaceId has a default value of false so it can be omitted unless it needs to be set to true as in the case with the examplefile parameter above.