{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "items": {
            "type": "array",
            "items": {
                "title": "API Token",
                "description": "Schema for a single API Token",
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^[A-Fa-f\\d]{24}$"
                    },
                    "apiTokenId": {
                        "type": "string",
                        "pattern": "^[A-Fa-f\\d]{24}$"
                    },
                    "ownerId": {
                        "type": "string",
                        "pattern": "^[A-Fa-f\\d]{24}$"
                    },
                    "ownerType": {
                        "type": "string",
                        "enum": [
                            "application"
                        ]
                    },
                    "creatorId": {
                        "type": "string",
                        "pattern": "^[A-Fa-f\\d]{24}$"
                    },
                    "creatorType": {
                        "type": "string",
                        "enum": [
                            "apiToken",
                            "user",
                            "flow"
                        ]
                    },
                    "creatorName": {
                        "type": "string",
                        "maxLength": 1024
                    },
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                    },
                    "description": {
                        "type": "string",
                        "maxLength": 32767
                    },
                    "creationDate": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "lastUpdated": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "expirationDate": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "scope": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                        }
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "inactive"
                        ]
                    },
                    "token": {
                        "type": "string",
                        "minLength": 1
                    }
                }
            }
        },
        "count": {
            "type": "integer"
        },
        "totalCount": {
            "type": "integer"
        },
        "perPage": {
            "type": "integer"
        },
        "page": {
            "type": "integer"
        },
        "filter": {
            "type": "string"
        },
        "filterField": {
            "type": "string"
        },
        "sortField": {
            "type": "string"
        },
        "sortDirection": {
            "type": "string",
            "enum": [
                "asc",
                "desc",
                "ASC",
                "DESC",
                ""
            ]
        },
        "ownerId": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "ownerType": {
            "type": "string",
            "enum": [
                "application"
            ]
        }
    }
}