{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "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
        }
    }
}