200 |
Returns collection of Agent information like
- version
- host
- port
- started at
- operation system
|
|
application/json
model |
example
{
"title": "agents with delivery date (permant part)",
"id": "schemas/jobscheduler/agents_p",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sos.joc.model.jobscheduler.AgentsP",
"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/agent_p",
"javaType": "com.sos.joc.model.jobscheduler.AgentP",
"type": "object",
"required": [
"surveyDate",
"version",
"host",
"url",
"os",
"state",
"startedAt",
"clusters"
],
"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"
},
"clusters": {
"description": "Collection of process class' paths",
"type": "array",
"items": {
"id": "schemas/common/path",
"description": "absolute path based on live folder of a JobScheduler object.",
"type": "string",
"pattern": "/([^/]+/)*[^/]+"
}
}
}
}
}
}
}
{ "deliveryDate": "2016-05-05T21:13:35Z", "agents": [{ "surveyDate": "2016-05-05T21:11:25Z", "version": "1.11.0", "host": "galadriel", "port": 4445, "url": "http://galadriel:4445", "os": { "name": "linux", "architecture": 64, "distribution": "CentOS Linux release 7.2.1511" }, "state": { "severity": 0, "_text": "running" }, "startedAt": "2016-04-20T23:55:00Z", "clusters": [ "/agents/galadriel", "/agents/galadriel-4445" ] }, { "surveyDate": "2016-05-05T21:11:25Z", "version": "1.11.0", "host": "frodo", "port": 4445, "url": "http://frodo.proxy", "os": { "name": "linux", "architecture": 64, "distribution": "CentOS Linux release 7.2.1511" }, "state": { "severity": 0, "_text": "running" }, "startedAt": "2016-04-20T23:50:22Z", "clusters": [ "/agents/frodo-4445" ] }, { "surveyDate": "2016-05-05T21:11:25Z", "version": "1.11.0", "host": "galadriel", "port": 4447, "url": "http://galadriel:4447", "os": { "name": "linux", "architecture": 64, "distribution": "CentOS Linux release 7.2.1511" }, "state": { "severity": 0, "_text": "running" }, "startedAt": "2016-04-18T14:21:11Z", "clusters": [ "/agents/galadriel" ] }] }
{
"deliveryDate": "2016-05-05T21:13:35Z",
"agents": [{
"surveyDate": "2016-05-05T21:11:25Z",
"version": "1.11.0",
"host": "galadriel",
"port": 4445,
"url": "http://galadriel:4445",
"os": {
"name": "linux",
"architecture": 64,
"distribution": "CentOS Linux release 7.2.1511"
},
"state": {
"severity": 0,
"_text": "running"
},
"startedAt": "2016-04-20T23:55:00Z",
"clusters": [
"/agents/galadriel",
"/agents/galadriel-4445"
]
}, {
"surveyDate": "2016-05-05T21:11:25Z",
"version": "1.11.0",
"host": "frodo",
"port": 4445,
"url": "http://frodo.proxy",
"os": {
"name": "linux",
"architecture": 64,
"distribution": "CentOS Linux release 7.2.1511"
},
"state": {
"severity": 0,
"_text": "running"
},
"startedAt": "2016-04-20T23:50:22Z",
"clusters": [
"/agents/frodo-4445"
]
}, {
"surveyDate": "2016-05-05T21:11:25Z",
"version": "1.11.0",
"host": "galadriel",
"port": 4447,
"url": "http://galadriel:4447",
"os": {
"name": "linux",
"architecture": 64,
"distribution": "CentOS Linux release 7.2.1511"
},
"state": {
"severity": 0,
"_text": "running"
},
"startedAt": "2016-04-18T14:21:11Z",
"clusters": [
"/agents/galadriel"
]
}]
}
|
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
}
|
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
}
|