{
    "title": "task history",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.job.TaskHistoryItem200",
    "type": "object",
    "required": [
        "deliveryDate",
        "task"
    ],
    "properties": {
        "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"
        },
        "task": {
            "javaType": "com.sos.joc.model.job.TaskHistoryItem",
            "type": "object",
            "required": [
                "surveyDate",
                "job",
                "startTime",
                "state",
                "taskId"
            ],
            "properties": {
                "surveyDate": {
                    "description": "Date of the inventory data. Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ",
                    "type": "string",
                    "format": "date-time"
                },
                "jobschedulerId": {
                    "type": "string"
                },
                "job": {
                    "type": "string"
                },
                "startTime": {
                    "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
                    "type": "string",
                    "format": "date-time"
                },
                "endTime": {
                    "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
                    "type": "string",
                    "format": "date-time"
                },
                "state": {
                    "javaType": "com.sos.joc.model.common.HistoryState",
                    "type": "object",
                    "required": [
                        "severity",
                        "_text"
                    ],
                    "properties": {
                        "severity": {
                            "description": "0=successful, 1=incomplete, 2=failed with a green/yellow/red representation",
                            "type": "integer"
                        },
                        "_text": {
                            "javaType": "com.sos.joc.model.common.HistoryStateText",
                            "type": "string",
                            "enum": [
                                "SUCCESSFUL",
                                "INCOMPLETE",
                                "FAILED"
                            ]
                        }
                    }
                },
                "taskId": {
                    "type": "string"
                },
                "criticality": {
                    "type": "string",
                    "default": "normal"
                },
                "clusterMember": {
                    "type": "string"
                },
                "steps": {
                    "type": "integer",
                    "minimum": 0
                },
                "exitCode": {
                    "type": "integer",
                    "minimum": 0
                },
                "error": {
                    "javaType": "com.sos.joc.model.common.Err",
                    "type": "object",
                    "required": [
                        "code",
                        "message"
                    ],
                    "properties": {
                        "code": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "message": {
                            "type": "string"
                        }
                    }
                },
                "agent": {
                    "description": "agent url",
                    "type": "string"
                }
            }
        }
    }
}