200 |
Returns particularly status such as
- starting
- running
- paused
- waiting for activation
- waiting for database
- terminating
- dead
- unreachable
|
|
application/json
model |
example
{
"title": "jobscheduler masters (volatile part)",
"id": "schemas/jobscheduler/masters_v",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sos.joc.model.jobscheduler.MastersV",
"type": "object",
"required": [
"deliveryDate",
"masters"
],
"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"
},
"masters": {
"type": "array",
"items": {
"id": "schemas/jobscheduler/jobscheduler_v",
"javaType": "com.sos.joc.model.jobscheduler.JobSchedulerV",
"type": "object",
"oneOf": [{
"description": "if state.text=unreachable",
"required": [
"jobschedulerId",
"host",
"port",
"state"
]
}, {
"required": [
"surveyDate",
"jobschedulerId",
"host",
"port",
"state",
"startedAt"
]
}],
"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"
},
"jobschedulerId": {
"type": "string"
},
"host": {
"type": "string"
},
"port": {
"id": "schemas/common/port",
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"state": {
"id": "schemas/jobscheduler/state",
"javaType": "com.sos.joc.model.jobscheduler.JobSchedulerState",
"type": "object",
"required": [
"severity",
"_text"
],
"properties": {
"severity": {
"description": "0=running/starting, 1=paused, 3=waiting_for_activation/terminating, 2=waiting_for_database/dead/unreachable",
"type": "integer"
},
"_text": {
"id": "schemas/jobscheduler/stateText",
"javaType": "com.sos.joc.model.jobscheduler.JobSchedulerStateText",
"type": "string",
"enum": [
"STARTING",
"RUNNING",
"PAUSED",
"WAITING_FOR_ACTIVATION",
"TERMINATING",
"WAITING_FOR_DATABASE",
"DEAD",
"UNREACHABLE",
"UNKNOWN_AGENT"
]
}
}
},
"startedAt": {
"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"
},
"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:37Z", "masters": [{ "surveyDate": "2016-05-05T21:13:36Z", "jobschedulerId": "schedulerId", "host": "test.sos", "port": 4444, "startedAt": "2016-05-05T20:34:18Z", "state": { "severity": 0, "_text": "running" } }, { "surveyDate": "2016-05-05T21:13:36Z", "jobschedulerId": "schedulerId", "host": "test2.sos", "port": 4444, "startedAt": "2016-05-05T20:45:20Z", "state": { "severity": 1, "_text": "waiting_for_activation" } }] }
{
"deliveryDate": "2016-05-05T21:13:37Z",
"masters": [{
"surveyDate": "2016-05-05T21:13:36Z",
"jobschedulerId": "schedulerId",
"host": "test.sos",
"port": 4444,
"startedAt": "2016-05-05T20:34:18Z",
"state": {
"severity": 0,
"_text": "running"
}
}, {
"surveyDate": "2016-05-05T21:13:36Z",
"jobschedulerId": "schedulerId",
"host": "test2.sos",
"port": 4444,
"startedAt": "2016-05-05T20:45:20Z",
"state": {
"severity": 1,
"_text": "waiting_for_activation"
}
}]
}
|
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 'members' |
|
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 |
'members' 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": "members failed!" } }
{
"deliveryDate": "2016-05-05T21:13:35Z",
"surveyDate": "2016-05-05T21:13:33Z",
"error": {
"code": "JOC-420",
"message": "members 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
}
|