200 |
TODO |
|
application/json
model |
example
{
"title": "locks (volatile part)",
"id": "schemas/lock/locks_v",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sos.joc.model.lock.LocksV",
"type": "object",
"required": [
"deliveryDate",
"locks"
],
"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"
},
"locks": {
"type": "array",
"items": {
"id": "schemas/lock/lock_v",
"javaType": "com.sos.joc.model.lock.LockV",
"type": "object",
"description": "The lock is free iff no holders specified",
"required": [
"surveyDate",
"path",
"name"
],
"properties": {
"surveyDate": {
"id": "schemas/common/surveyDate_v",
"description": "Current date of the JobScheduler Master/Agent. 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": "/([^/]+/)*[^/]+"
},
"name": {
"type": "string"
},
"maxNonExclusive": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
},
"holders": {
"javaType": "com.sos.joc.model.lock.LockHolders",
"type": "object",
"required": [
"exclusive",
"tasks"
],
"properties": {
"exclusive": {
"type": "boolean"
},
"tasks": {
"description": "Collection of tasks which are now using the lock",
"type": "array",
"items": {
"javaType": "com.sos.joc.model.lock.LockHolder",
"type": "object",
"properties": {
"job": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
},
"taskId": {
"description": "id of the task",
"type": "string"
}
}
}
}
}
},
"queue": {
"type": "array",
"description": "Collection of jobs which have to wait until the lock is free",
"items": {
"type": "object",
"required": [
"exclusive",
"job"
],
"properties": {
"exclusive": {
"description": "Is true iff the job want to use the lock exclusive",
"type": "boolean"
},
"job": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
}
}
}
},
"configurationStatus": {
"id": "schemas/common/configurationStatus",
"javaType": "com.sos.joc.model.common.ConfigurationState",
"type": "object",
"required": [
"severity",
"_text"
],
"properties": {
"severity": {
"description": "4=ok; 5=replacement_is_standing_by,removing_delayed; 2=error_in_configuration_file,changed_file_not_loaded,resource_is_missing",
"type": "integer"
},
"_text": {
"id": "schemas/common/configurationStatusText",
"javaType": "com.sos.joc.model.common.ConfigurationStateText",
"type": "string",
"enum": [
"ERROR_IN_CONFIGURATION_FILE",
"CHANGED_FILE_NOT_LOADED",
"REMOVING_DELAYED",
"RESOURCE_IS_MISSING",
"REPLACEMENT_IS_STANDING_BY",
"OK"
]
},
"message": {
"description": "contains e.g. error message",
"type": "string"
}
}
}
}
}
}
}
}
{ "deliveryDate": "2016-05-05T21:13:35Z", "locks": [{ "path": "/sos/dailyschedule/JID" }, { "path": "/test1/testLock", "maxNonExclusive": "2", "holders": { "exclusive": true, "tasks": [{ "job": "/test1/sleep_excl", "taskId": 1075682 }] }, "queue": [{ "exclusive": false, "job": "/test1/sleep1" }, { "exclusive": false, "job": "/test1/sleep2" }, { "exclusive": false, "job": "/test1/sleep3" }] }, { "path": "/test2/testLock", "maxNonExclusive": "2", "holders": { "exclusive": false, "tasks": [{ "job": "/test2/sleep1", "taskId": 1075659 }, { "job": "/test2/sleep2", "taskId": 1075661 }] }, "queue": [{ "exclusive": true, "job": "/test2/sleep_excl" }, { "exclusive": false, "job": "/test2/sleep3" }] }, { "path": "/test3/testLock", "holders": { "exclusive": false, "tasks": [{ "job": "/test3/sleep1", "taskId": 1075697 }] } }] }
{
"deliveryDate": "2016-05-05T21:13:35Z",
"locks": [{
"path": "/sos/dailyschedule/JID"
}, {
"path": "/test1/testLock",
"maxNonExclusive": "2",
"holders": {
"exclusive": true,
"tasks": [{
"job": "/test1/sleep_excl",
"taskId": 1075682
}]
},
"queue": [{
"exclusive": false,
"job": "/test1/sleep1"
}, {
"exclusive": false,
"job": "/test1/sleep2"
}, {
"exclusive": false,
"job": "/test1/sleep3"
}]
}, {
"path": "/test2/testLock",
"maxNonExclusive": "2",
"holders": {
"exclusive": false,
"tasks": [{
"job": "/test2/sleep1",
"taskId": 1075659
}, {
"job": "/test2/sleep2",
"taskId": 1075661
}]
},
"queue": [{
"exclusive": true,
"job": "/test2/sleep_excl"
}, {
"exclusive": false,
"job": "/test2/sleep3"
}]
}, {
"path": "/test3/testLock",
"holders": {
"exclusive": false,
"tasks": [{
"job": "/test3/sleep1",
"taskId": 1075697
}]
}
}]
}
|
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 'locks' |
|
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 |
'locks' 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": "locks failed!" } }
{
"deliveryDate": "2016-05-05T21:13:35Z",
"surveyDate": "2016-05-05T21:13:33Z",
"error": {
"code": "JOC-420",
"message": "locks 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
}
|