{
    "title": "orders filter",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.order.OrdersFilter",
    "type": "object",
    "properties": {
        "controllerId": {
            "type": "string",
            "pattern": "^[^/\\<>?!&:;()\"|*^]*$",
            "maxLength": 100
        },
        "orders": {
            "type": "array",
            "uniqueItems": true,
            "items": {
                "javaType": "com.sos.joc.model.order.OrderPath",
                "type": "object",
                "required": [
                    "workflowPath"
                ],
                "properties": {
                    "workflowPath": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "orderId": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    }
                }
            }
        },
        "excludeWorkflows": {
            "type": "array",
            "uniqueItems": true,
            "items": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255,
                "minLength": 1
            }
        },
        "compact": {
            "description": "controls if the object's data is compact or detailed",
            "type": "boolean",
            "default": false
        },
        "orderId": {
            "description": "pattern with wildcards '*' and '?' where '*' match zero or more characters and '?' match any single character",
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "workflowPath": {
            "description": "pattern with wildcards '*' and '?' where '*' match zero or more characters and '?' match any single character",
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "workflowName": {
            "description": "pattern with wildcards '*' and '?' where '*' match zero or more characters and '?' match any single character",
            "type": "string",
            "pattern": "^[^<>]*$",
            "maxLength": 255
        },
        "dateFrom": {
            "description": "0 or [number][smhdwMy] (where smhdwMy unit for second, minute, etc) or ISO 8601 timestamp",
            "type": "string",
            "pattern": "^([+-]?0|([+-]?[0-9]+[smhdwMy])+|\\d{4}-\\d{2}-\\d{2}(?:T| )\\d{2}:\\d{2}:\\d{2}([,.]\\d{1,3})?)(Z|[+-]\\d{2}(:?\\d{2})?)?$"
        },
        "dateTo": {
            "description": "0 or [number][smhdwMy] (where smhdwMy unit for second, minute, etc) or ISO 8601 timestamp",
            "type": "string",
            "pattern": "^([+-]?0|([+-]?[0-9]+[smhdwMy])+|\\d{4}-\\d{2}-\\d{2}(?:T| )\\d{2}:\\d{2}:\\d{2}([,.]\\d{1,3})?)(Z|[+-]\\d{2}(:?\\d{2})?)?$"
        },
        "completedDateFrom": {
            "alias": "endDateFrom",
            "description": "0 or [number][smhdwMy] (where smhdwMy unit for second, minute, etc) or ISO 8601 timestamp",
            "type": "string",
            "pattern": "^([+-]?0|([+-]?[0-9]+[smhdwMy])+|\\d{4}-\\d{2}-\\d{2}(?:T| )\\d{2}:\\d{2}:\\d{2}([,.]\\d{1,3})?)(Z|[+-]\\d{2}(:?\\d{2})?)?$"
        },
        "completedDateTo": {
            "alias": "endDateTo",
            "description": "0 or [number][smhdwMy] (where smhdwMy unit for second, minute, etc) or ISO 8601 timestamp",
            "type": "string",
            "pattern": "^([+-]?0|([+-]?[0-9]+[smhdwMy])+|\\d{4}-\\d{2}-\\d{2}(?:T| )\\d{2}:\\d{2}:\\d{2}([,.]\\d{1,3})?)(Z|[+-]\\d{2}(:?\\d{2})?)?$"
        },
        "timeZone": {
            "description": "see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones",
            "type": "string"
        },
        "folders": {
            "type": "array",
            "items": {
                "type": "object",
                "javaType": "com.sos.joc.model.common.Folder",
                "required": [
                    "folder"
                ],
                "properties": {
                    "folder": {
                        "description": "absolute path of an object.",
                        "type": "string",
                        "pattern": "^(/|(/[^/\\\\<>?:\"|*]+)+)$",
                        "maxLength": 255,
                        "minLength": 1
                    },
                    "recursive": {
                        "type": "boolean",
                        "default": true
                    }
                },
                "additionalProperties": false
            }
        },
        "limit": {
            "description": "only for db history urls to restrict the number of responsed records; -1=unlimited",
            "type": "integer",
            "default": 10000
        },
        "historyStates": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.common.HistoryStateText",
                "type": "string",
                "enum": [
                    "SUCCESSFUL",
                    "INCOMPLETE",
                    "FAILED"
                ]
            }
        },
        "historyIds": {
            "type": "array",
            "items": {
                "type": "number",
                "format": "utc-millisec",
                "minimum": 0
            }
        }
    }
}