Skip to content

Job Json

Chris Churas edited this page Apr 28, 2015 · 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,
  "detailedError": null,
  "downloadURL" : "http://foo.com/asdflkj",
  "error" : null,
  "estimatedCpuInSeconds" : 5345,
  "estimatedDiskInBytes" : 234234234,
  "estimatedRunTimeInSeconds" : 334343,
  "hasJobBeenSubmittedToScheduler" : false,
  "schedulerJobId" : "12322",
  "parameters" : [ {
    "name" : "param1",
    "value" : "some value",
    "workflowParameter" : null,
    "isWorkspaceId" : false
  } ],
  "parametersWithErrors" : null,
  "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

detailedError

Contains a more technical description of error encountered when Job is run.

downloadURL

Set via get a job REST call, this field contains a URL that can be used to retreive the output of the Job after it has completed.

NOTE: Due to high cost of storing data in Google App Engine, a Job does NOT have this value set.

error

Contains error encountered during the job creation ie create a job REST call or when the job is running.

estimatedCpuInSeconds

If set, denotes an estimate in seconds of compute time to complete the Job.

estimatedDiskInBytes

If set, denotes an estimate of the disk that will be used by the output of the Job.

estimatedRunTime

If set, denotes an estimate of the wall run time of this Job in seconds.

hasJobBeenSubmittedToScheduler

true means the job has been submitted to the scheduler, false otherwise. This is an internal parameter used to quickly find what jobs have been submitted.

schedulerJobId

Contains id for Job from scheduler. This is an internal parameter.

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.

If omitted during create a job REST call the value is assumed to be false