{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/phala/json-schema/phala-kms-list-response-schema.json",
  "title": "KmsListResponse",
  "description": "Paginated KMS list response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/phala-kms-api-openapi.yml#/components/schemas/KmsListResponse",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/KMSInfo"
      },
      "type": "array",
      "title": "Items"
    },
    "total": {
      "type": "integer",
      "title": "Total"
    },
    "page": {
      "type": "integer",
      "title": "Page"
    },
    "page_size": {
      "type": "integer",
      "title": "Page Size"
    },
    "pages": {
      "type": "integer",
      "title": "Pages"
    }
  },
  "type": "object",
  "required": [
    "items",
    "total",
    "page",
    "page_size",
    "pages"
  ],
  "$defs": {
    "KMSInfo": {
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^kms_.+",
          "format": "hashid",
          "title": "HashedId[kms]",
          "description": "Hashed KMS identifier (kms_xxxxx)"
        },
        "slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Slug",
          "description": "Human-readable KMS name"
        },
        "url": {
          "type": "string",
          "title": "Url",
          "description": "KMS endpoint URL"
        },
        "version": {
          "type": "string",
          "title": "Version",
          "description": "KMS software version"
        },
        "chain_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Chain Id",
          "description": "Blockchain chain ID if onchain"
        },
        "kms_contract_address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Kms Contract Address",
          "description": "Smart contract address if onchain"
        },
        "gateway_app_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gateway App Id",
          "description": "Gateway application ID"
        }
      },
      "type": "object",
      "required": [
        "id",
        "url",
        "version"
      ],
      "title": "KMSInfo",
      "description": "KMS instance information."
    }
  }
}