200 |
Each job can have a compact or detailed response. It depends on the parameter compact .
- Required fields are
- surveyDate
- path
- name
- isOrderJob
- usedInJobChains
- estimatedDuration
- maxTasks (default:1)
- hasDescription (default:false)
- The compact view has the following optional fields
- The detailed view has the following required fields in addition to the compact view
- The detailed view has the following optional fields in addition to the compact view
- params
- locks
- jobChains (only for order jobs)
- A job object as child of a job chain node in the response have only the following required fields
- and doesn't have any optional fields
|
|
application/json
model |
example
{
"title": "job object with delivery date (permant part)",
"id": "schemas/job/job200_p",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sos.joc.model.job.JobP200",
"type": "object",
"properties": {
"deliveryDate": {
"id": "schemas/common/deliveryDate",
"description": "Current date of the JOC server/REST service. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
"type": "string",
"format": "date-time"
},
"job": {
"id": "schemas/job/job_p",
"javaType": "com.sos.joc.model.job.JobP",
"type": "object",
"oneOf": [{
"description": "as child of nodes only path is required and processClass is optional",
"required": [
"path"
]
}, {
"description": "compact=true then ONLY required fields are responded and title, processClass are optional",
"required": [
"surveyDate",
"path",
"name",
"isOrderJob",
"isShellJob",
"usedInJobChains",
"estimatedDuration",
"maxTasks",
"hasDescription"
]
}],
"properties": {
"surveyDate": {
"id": "schemas/common/surveyDate_p",
"description": "Date of the inventory data. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
"type": "string",
"format": "date-time"
},
"path": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
},
"isOrderJob": {
"type": "boolean"
},
"isShellJob": {
"type": "boolean"
},
"name": {
"type": "string"
},
"title": {
"type": "string"
},
"estimatedDuration": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
},
"processClass": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
},
"maxTasks": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
},
"locks": {
"id": "schemas/job/locks_p",
"type": "array",
"items": {
"javaType": "com.sos.joc.model.job.LockUseP",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
}
}
}
},
"usedInJobChains": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
},
"jobChains": {
"description": "Only relevant for order jobs when called /jobs/p/... or job/p/...",
"type": "array",
"items": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
}
},
"documentation": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
},
"configurationDate": {
"id": "schemas/common/timestamp",
"description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
"type": "string",
"format": "date-time"
}
}
}
}
}
{ "deliveryDate": "2016-09-23T11:13:05Z", "job": { "jobChains": [ "/examples/55_JobSchedulerLaunchQueue/01_JQLJobChain1/JobChain100" ], "name": "JobA", "isOrderJob": true, "maxTasks": 1, "configurationDate": "2016-09-23T11:13:14Z", "title": "Simple Shell Job", "usedInJobChains": 1, "path": "/examples/55_JobSchedulerLaunchQueue/01_JQLJobChain1/JobA", "surveyDate": "2016-09-23T11:13:14Z", "estimatedDuration": 2 } }
{
"deliveryDate": "2016-09-23T11:13:05Z",
"job": {
"jobChains": [
"/examples/55_JobSchedulerLaunchQueue/01_JQLJobChain1/JobChain100"
],
"name": "JobA",
"isOrderJob": true,
"maxTasks": 1,
"configurationDate": "2016-09-23T11:13:14Z",
"title": "Simple Shell Job",
"usedInJobChains": 1,
"path": "/examples/55_JobSchedulerLaunchQueue/01_JQLJobChain1/JobA",
"surveyDate": "2016-09-23T11:13:14Z",
"estimatedDuration": 2
}
}
|
401 |
Unauthorized! |
|
application/json
model |
example
{
"title": "security",
"id": "schemas/user/security",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": [
"isAuthenticated"
],
"properties": {
"user": {
"type": "string"
},
"accessToken": {
"type": "string"
},
"message": {
"type": "string"
},
"hasRole": {
"type": "boolean",
"default": false
},
"isAuthenticated": {
"type": "boolean"
},
"isPermitted": {
"type": "boolean",
"default": false
},
"sessionTimeout": {
"type": "integer",
"default": 1800
},
"enableTouch": {
"type": "boolean",
"default": true
}
}
}
{ "user": "root", "message": "Oops!", "hasRole": false, "isAuthenticated": false, "isPermitted": false }
{
"user": "root",
"message": "Oops!",
"hasRole": false,
"isAuthenticated": false,
"isPermitted": false
}
|
403 |
Forbidden! The user doesn't have sufficient permissions for 'p' |
|
application/json
model |
example
{
"title": "security",
"id": "schemas/user/security",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": [
"isAuthenticated"
],
"properties": {
"user": {
"type": "string"
},
"accessToken": {
"type": "string"
},
"message": {
"type": "string"
},
"hasRole": {
"type": "boolean",
"default": false
},
"isAuthenticated": {
"type": "boolean"
},
"isPermitted": {
"type": "boolean",
"default": false
},
"sessionTimeout": {
"type": "integer",
"default": 1800
},
"enableTouch": {
"type": "boolean",
"default": true
}
}
}
{ "user": "root", "message": "You don't have sufficient permissions for ...", "hasRole": false, "isAuthenticated": true, "isPermitted": false }
{
"user": "root",
"message": "You don't have sufficient permissions for ...",
"hasRole": false,
"isAuthenticated": true,
"isPermitted": false
}
|
420 |
'p' failed! |
|
application/json
model |
example
{
"title": "error object with delivery date",
"id": "schemas/common/error420",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sos.joc.model.common.Err420",
"type": "object",
"required": [
"deliveryDate",
"error"
],
"properties": {
"deliveryDate": {
"id": "schemas/common/deliveryDate",
"description": "Current date of the JOC server/REST service. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
"type": "string",
"format": "date-time"
},
"surveyDate": {
"description": "is also required for permanent or volatile requests",
"type": "string",
"format": "date-time"
},
"error": {
"id": "schemas/common/error",
"javaType": "com.sos.joc.model.common.Err",
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
{ "deliveryDate": "2016-05-05T21:13:35Z", "surveyDate": "2016-05-05T21:13:33Z", "error": { "code": "JOC-420", "message": "p failed!" } }
{
"deliveryDate": "2016-05-05T21:13:35Z",
"surveyDate": "2016-05-05T21:13:33Z",
"error": {
"code": "JOC-420",
"message": "p failed!"
}
}
|
440 |
Login Timeout! The client's session has expired and must log in again. |
|
application/json
model |
example
{
"title": "security",
"id": "schemas/user/security",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": [
"isAuthenticated"
],
"properties": {
"user": {
"type": "string"
},
"accessToken": {
"type": "string"
},
"message": {
"type": "string"
},
"hasRole": {
"type": "boolean",
"default": false
},
"isAuthenticated": {
"type": "boolean"
},
"isPermitted": {
"type": "boolean",
"default": false
},
"sessionTimeout": {
"type": "integer",
"default": 1800
},
"enableTouch": {
"type": "boolean",
"default": true
}
}
}
{ "user": "root", "message": "Session has expired. Please log in again", "hasRole": false, "isAuthenticated": false, "isPermitted": false }
{
"user": "root",
"message": "Session has expired. Please log in again",
"hasRole": false,
"isAuthenticated": false,
"isPermitted": false
}
|