Skip to content

Job Json

coleslaw481 edited this page Oct 13, 2014 · 32 revisions

Job Json

Below is an example of a Job with all fields. Under the example is a description of every field.

NOTE: Not all the fields below are required to submit a job to the REST service.

{
  "id" : null,
  "name" : "some job",
  "owner" : "someuser",
  "status" : "Running",
  "createDate" : 1406140514438,
  "submitDate" : 1406140514438,
  "startDate" : 1406140514438,
  "finishDate" : 1406140514438,
  "deleted" : false,
  "downloadURL" : "http://foo.com/asdflkj",
  "error" : null,
  "estimatedCpuInSeconds" : 5345,
  "estimatedDiskInBytes" : 234234234,
  "estimatedRunTime" : 334343,
  "hasJobBeenSubmittedToScheduler" : false,
  "parameters" : [ {
    "name" : "param1",
    "value" : "some value",
    "workflowParameter" : null,
    "isWorkspaceId" : false
  } ],
  "parametersWithErrors" : null,
  "schedulerJobId" : "12322",
  "workflow" : {
    "id" : 10,
    "name" : "workflowname",
    "createDate" : 1406140514439,
    "version" : 2,
    "description" : "Contains description of workflow displayable to the user",
    "releaseNotes" : "Contains release notes for this release of Workflow",
    "deleted" : false,
    "owner" : null,
    "parameters" : null,
    "parentWorkflow" : null,
    "workflowFileUploadURL" : null
  }
}

Description of fields

id

Numeric id for Job. This value is set when Job is created via create a job REST call.

name

The name the user wants to give the job. Examples: 'my chm train workflow'

owner

The user running the job.

status

The current status of the job can be null for unknown, or one of the following:

  • In Queue
  • Your job is in the queue, awaiting completion of your current running or pending job(s).
  • Pending
  • Your job is ready to run, pending availability of resources.
  • Workspace Sync
  • Your job is ready to run, pending synchronization of workspace files.
  • Running
  • Your job is running.
  • Completed
  • Your job has completed.
  • Error
  • Your job has failed due to a detected error.
  • Paused
  • Your job has been paused by the system and will automatically resume

createDate

Date when job is created via create a job REST call. Value is seconds since Epoch

submitDate

Date when job is submitted to scheduler. Value is seconds since Epoch

startDate

Date when job starts running. Value is seconds since Epoch

finishDate

Date when job stops running. Value is seconds since Epoch

deleted

true means Job has been deleted, false otherwise

downloadURL

error

estimatedCpuInSeconds

estimatedDiskInBytes

estimatedRunTime

hasJobBeenSubmittedToScheduler

Parameters

Within each Job is optionally a list of Parameters. This section describes the fields for each Parameter.

 "parameters" : [ {
    "name" : "param1",
    "value" : "some value",
    "workflowParameter" : null,
    "isWorkspaceId" : false
  } ],

name

Name of parameter in Workflow. This name should match the name in the WorkflowParameter which is used to map this parameter to the WorkflowParameter

value

Value for parameter

workflowParameter

More of an internal value, this is set on the service side to id of WorkflowParameter

isWorkspaceId

true means the value field above contains a workspacefile id The service checks this to decide whether to replace the value with a valid file system path