{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/acronis/main/json-schema/acronis-client-batch-schema.json",
  "title": "clientBatch",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acronis-clients-api-openapi.yml#/components/schemas/clientBatch",
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/client"
      }
    }
  },
  "$defs": {
    "client": {
      "title": "Basic client schema",
      "type": "object",
      "required": [
        "client_id",
        "tenant_id",
        "client_secret_expires_at",
        "type",
        "token_endpoint_auth_method",
        "created_at",
        "created_by",
        "last_access_at",
        "last_access_from_ip",
        "status"
      ],
      "properties": {
        "client_id": {
          "$ref": "#/$defs/uuid"
        },
        "tenant_id": {
          "$ref": "#/$defs/uuid"
        },
        "client_secret_expires_at": {
          "description": "Time at which the client_secret will expire or 0 if it will not expire, according to the configured client secret lifetime. Its value is represented as number of seconds since the Unix epoch.",
          "type": "integer"
        },
        "type": {
          "description": "Client type.",
          "enum": [
            "api_client",
            "managed_client"
          ],
          "type": "string"
        },
        "data": {
          "description": "Additional metadata, like agentType, hostname, etc...",
          "type": "object"
        },
        "token_endpoint_auth_method": {
          "description": "Explicit specified auth method.",
          "enum": [
            "client_secret_basic",
            "client_secret_post",
            "none"
          ],
          "type": "string"
        },
        "created_at": {
          "description": "Date and time when the client was created. This field can have a null value.",
          "allOf": [
            {
              "$ref": "#/$defs/item1"
            }
          ]
        },
        "created_by": {
          "description": "ID of the user who registered the client.",
          "type": "string"
        },
        "last_access_at": {
          "description": "Date and time when client was used to issue token last time. This field can have a null value.",
          "allOf": [
            {
              "$ref": "#/$defs/item1"
            }
          ]
        },
        "last_access_from_ip": {
          "description": "IP address from witch client was used to issue token last time. This field can have a null value.",
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "description": "Client status - either enabled or disabled. Disabled clients can no longer be used to receive Access Tokens.",
          "enum": [
            "enabled",
            "disabled"
          ],
          "type": "string"
        },
        "redirect_uris": {
          "description": "List of possible redirect uris.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "origin_id": {
          "description": "Client origin ID.",
          "type": "string"
        }
      }
    },
    "item1": {
      "description": "RFC3339 Formatted date.",
      "type": "string",
      "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?([\\+\\-]\\d{2}\\:\\d{2})?",
      "minLength": 19,
      "maxLength": 32
    },
    "uuid": {
      "type": "string",
      "pattern": "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}",
      "minLength": 36,
      "maxLength": 36
    }
  }
}