{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amigo/main/json-schema/amigo-paginated-response-api-key-response-schema.json",
  "title": "PaginatedResponse[ApiKeyResponse]",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amigo-api-keys-api-openapi.yml#/components/schemas/PaginatedResponse_ApiKeyResponse_",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/ApiKeyResponse"
      },
      "type": "array",
      "title": "Items"
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More"
    },
    "continuation_token": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Continuation Token"
    },
    "total": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Total"
    }
  },
  "type": "object",
  "required": [
    "items",
    "has_more"
  ],
  "$defs": {
    "ApiKeyResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "workspace_id": {
          "type": "string",
          "format": "uuid",
          "title": "Workspace Id"
        },
        "created_by_entity_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created By Entity Id"
        },
        "created_by_credential_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created By Credential Id"
        },
        "key_id": {
          "type": "string",
          "title": "Key Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "role": {
          "type": "string",
          "title": "Role"
        },
        "permissions": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Permissions"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time",
          "title": "Expires At"
        },
        "last_used_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Used At"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "title": "Updated At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "workspace_id",
        "created_by_entity_id",
        "created_by_credential_id",
        "key_id",
        "name",
        "role",
        "permissions",
        "expires_at",
        "last_used_at",
        "created_at",
        "updated_at"
      ],
      "title": "ApiKeyResponse"
    }
  }
}