200 |
- Required fields are
- surveyDate
- path
- name
- state
- Optional field is
|
|
application/json
model |
example
{
"title": "schedule with delivery date (volatile part)",
"id": "schemas/schedule/schedule200_v",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sos.joc.model.schedule.ScheduleV200",
"type": "object",
"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"
},
"schedule": {
"id": "schemas/schedule/schedule_v",
"javaType": "com.sos.joc.model.schedule.ScheduleV",
"type": "object",
"required": [
"surveyDate",
"path",
"name",
"state"
],
"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"
},
"state": {
"id": "schemas/plan/scheduleState",
"javaType": "com.sos.joc.model.schedule.ScheduleState",
"type": "object",
"required": [
"severity",
"_text"
],
"properties": {
"severity": {
"description": "0=active; 1=inactive",
"type": "integer"
},
"_text": {
"id": "schemas/plan/scheduleStateText",
"javaType": "com.sos.joc.model.schedule.ScheduleStateText",
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"UNKNOWN"
]
}
}
},
"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-09-14T00:44:13Z", "schedule": { "path": "/examples/20_SchedulingJobChains/WeeklySchedule", "state": { "_text": "ACTIVE", "severity": 0 }, "name": "WeeklySchedule" } }
{
"deliveryDate": "2016-09-14T00:44:13Z",
"schedule": {
"path": "/examples/20_SchedulingJobChains/WeeklySchedule",
"state": {
"_text": "ACTIVE",
"severity": 0
},
"name": "WeeklySchedule"
}
}
|
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 'schedule' |
|
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 |
'schedule' 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": "schedule failed!" } }
{
"deliveryDate": "2016-05-05T21:13:35Z",
"surveyDate": "2016-05-05T21:13:33Z",
"error": {
"code": "JOC-420",
"message": "schedule 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
}
|