200 |
Each order can have a compact or detailed response. It depends on the parameter compact . Note that no ad hoc or file order is permanent!
- Required fields are
- surveyDate
- path
- orderId
- jobChain
- estimatedDuration
- The compact view has the following optional fields
- The detailed view has the following optional fields in addition to the compact view
- initialState (name of the start node)
- endState (name of the end node)
- priority
- params
- configurationDate
|
|
application/json
model |
example
{
"title": "order with delivray date (permanent part)",
"id": "schemas/order/order200_p",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sos.joc.model.order.OrderP200",
"type": "object",
"required": [
"deliveryDate",
"order"
],
"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"
},
"order": {
"id": "schemas/order/order_p",
"javaType": "com.sos.joc.model.order.OrderP",
"type": "object",
"description": "compact=true then ONLY surveyDate, path, id, jobChain and _type are responded, title is optional",
"required": [
"surveyDate",
"path",
"orderId",
"jobChain",
"estimatedDuration"
],
"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": "/([^/]+/)*[^/]+"
},
"orderId": {
"type": "string"
},
"jobChain": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
},
"priority": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
},
"_type": {
"id": "schemas/order/orderType",
"javaType": "com.sos.joc.model.order.OrderType",
"type": "string",
"description": "the type of the order",
"enum": [
"PERMANENT",
"AD_HOC",
"FILE_ORDER"
]
},
"title": {
"type": "string"
},
"initialState": {
"description": "the name of the start node",
"type": "string"
},
"endState": {
"description": "the name of the end node",
"type": "string"
},
"estimatedDuration": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
},
"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"
},
"documentation": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
}
}
}
}
}
{ "deliveryDate": "2016-09-23T11:13:41Z", "order": { "estimatedDuration": 2, "params": [{ "value": "3", "name": "order_param_exit_code" }], "_type": "permanent", "configurationDate": "2016-09-23T11:13:44Z", "jobChain": "/examples/37_JobChainExitCodeHandling/01_JobChainA", "path": "/examples/37_JobChainExitCodeHandling/01_JobChainA,ExitCode_3", "title": "Exit Code 3 : Skip Node 400", "surveyDate": "2016-09-23T11:13:44Z", "orderId": "ExitCode_3" } }
{
"deliveryDate": "2016-09-23T11:13:41Z",
"order": {
"estimatedDuration": 2,
"params": [{
"value": "3",
"name": "order_param_exit_code"
}],
"_type": "permanent",
"configurationDate": "2016-09-23T11:13:44Z",
"jobChain": "/examples/37_JobChainExitCodeHandling/01_JobChainA",
"path": "/examples/37_JobChainExitCodeHandling/01_JobChainA,ExitCode_3",
"title": "Exit Code 3 : Skip Node 400",
"surveyDate": "2016-09-23T11:13:44Z",
"orderId": "ExitCode_3"
}
}
|
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
}
|