200 |
Returns collection of Agent information like
- running or not
- number of running tasks
|
|
application/json
model |
example
{
"title": "agents with delivery date (volatile part)",
"id": "schemas/jobscheduler/agents_v",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sos.joc.model.jobscheduler.AgentsV",
"type": "object",
"required": [
"deliveryDate",
"agents"
],
"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"
},
"agents": {
"type": "array",
"items": {
"id": "schemas/jobscheduler/agentOfCluster_p",
"javaType": "com.sos.joc.model.jobscheduler.AgentOfCluster",
"type": "object",
"required": [
"surveyDate",
"version",
"host",
"url",
"os",
"state",
"startedAt"
],
"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"
},
"version": {
"type": "string"
},
"host": {
"type": "string"
},
"url": {
"description": "url can be different against host/port if agent behind a proxy",
"type": "string",
"pattern": "https?://.+"
},
"os": {
"id": "schemas/jobscheduler/os",
"javaType": "com.sos.joc.model.jobscheduler.OperatingSystem",
"type": "object",
"required": [
"name",
"architecture",
"distribution"
],
"properties": {
"name": {
"description": "Windows, Linux, AIX, Solaris, other",
"type": "string"
},
"architecture": {
"type": "string"
},
"distribution": {
"description": "e.g. Windows 2012, CentOS Linux release 7.2.1511 (Core)",
"type": "string"
}
}
},
"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"
},
"runningTasks": {
"id": "schemas/common/nonNegativeInteger",
"type": "integer",
"minimum": 0
}
}
}
}
}
}
{ "deliveryDate": "2016-05-05T21:13:35Z", "agents": [{ "surveyDate": "2016-05-05T21:13:23Z", "url": "http://galadriel:4445", "startedAt": "2016-04-20T23:55:00Z", "state": { "severity": 0, "_text": "running" }, "runningTasks": 1 }, { "surveyDate": "2016-05-05T21:13:22Z", "url": "http://frodo.proxy", "startedAt": "2016-04-20T23:50:22Z", "state": { "severity": 0, "_text": "running" }, "runningTasks": 0 }, { "surveyDate": "2016-05-05T21:13:25Z", "url": "http://gandalf:4447", "state": { "severity": 2, "_text": "unreachable" } }] }
{
"deliveryDate": "2016-05-05T21:13:35Z",
"agents": [{
"surveyDate": "2016-05-05T21:13:23Z",
"url": "http://galadriel:4445",
"startedAt": "2016-04-20T23:55:00Z",
"state": {
"severity": 0,
"_text": "running"
},
"runningTasks": 1
}, {
"surveyDate": "2016-05-05T21:13:22Z",
"url": "http://frodo.proxy",
"startedAt": "2016-04-20T23:50:22Z",
"state": {
"severity": 0,
"_text": "running"
},
"runningTasks": 0
}, {
"surveyDate": "2016-05-05T21:13:25Z",
"url": "http://gandalf:4447",
"state": {
"severity": 2,
"_text": "unreachable"
}
}]
}
|
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 'agents' |
|
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 |
'agents' 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": "agents failed!" } }
{
"deliveryDate": "2016-05-05T21:13:35Z",
"surveyDate": "2016-05-05T21:13:33Z",
"error": {
"code": "JOC-420",
"message": "agents 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
}
|