{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/x-road-global/json-schema/x-road-global-client-schema.json",
  "title": "Client",
  "description": "x-road client",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/x-road-global-security-server-admin-openapi.yml#/components/schemas/Client",
  "type": "object",
  "required": [
    "member_class",
    "member_code"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "text",
      "description": "<instance_id>:<member_class>:<member_code>:<subsystem>(optional). Cannot contain colons, semicolons, slashes, backslashes, percent signs or control characters",
      "minLength": 1,
      "maxLength": 1023,
      "readOnly": true
    },
    "instance_id": {
      "type": "string",
      "format": "text",
      "description": "Xroad instance id. Cannot contain colons, semicolons, slashes, backslashes, percent signs or control characters",
      "minLength": 1,
      "maxLength": 255,
      "readOnly": true
    },
    "member_name": {
      "type": "string",
      "format": "text",
      "description": "Member name. Cannot contain colons, semicolons, slashes, backslashes, percent signs or control characters",
      "readOnly": true,
      "minLength": 1,
      "maxLength": 255
    },
    "member_class": {
      "type": "string",
      "format": "text",
      "description": "Member class. Cannot contain colons, semicolons, slashes, backslashes, percent signs or control characters",
      "minLength": 1,
      "maxLength": 255
    },
    "member_code": {
      "type": "string",
      "format": "text",
      "description": "Member code. Cannot contain colons, semicolons, slashes, backslashes, percent signs or control characters",
      "minLength": 1,
      "maxLength": 255
    },
    "subsystem_code": {
      "type": "string",
      "format": "text",
      "description": "Subsystem code. Cannot contain colons, semicolons, slashes, backslashes, percent signs or control characters",
      "minLength": 1,
      "maxLength": 255
    },
    "subsystem_name": {
      "type": "string",
      "format": "text",
      "description": "Subsystem name. Cannot contain colons, semicolons, slashes, backslashes, percent signs or control characters",
      "readOnly": true,
      "minLength": 0,
      "maxLength": 255
    },
    "owner": {
      "type": "boolean",
      "description": "if this client is the owner member of this security server",
      "readOnly": true
    },
    "has_valid_local_sign_cert": {
      "type": "boolean",
      "description": "if this client has a valid (registered and with good OCSP response) sign cert stored on this security server",
      "readOnly": true
    },
    "is_management_services_provider": {
      "type": "boolean",
      "description": "if this client is management services provider",
      "readOnly": true
    },
    "rename_status": {
      "$ref": "#/$defs/RenameStatus"
    },
    "connection_type": {
      "$ref": "#/$defs/ConnectionType"
    },
    "status": {
      "$ref": "#/$defs/ClientStatus"
    }
  },
  "$defs": {
    "ClientStatus": {
      "type": "string",
      "description": "client status",
      "readOnly": true,
      "enum": [
        "REGISTERED",
        "SAVED",
        "GLOBAL_ERROR",
        "REGISTRATION_IN_PROGRESS",
        "DELETION_IN_PROGRESS",
        "DISABLED",
        "DISABLING_IN_PROGRESS",
        "ENABLING_IN_PROGRESS"
      ]
    },
    "ConnectionType": {
      "type": "string",
      "description": "connection type",
      "default": "HTTPS",
      "enum": [
        "HTTP",
        "HTTPS",
        "HTTPS_NO_AUTH"
      ]
    },
    "RenameStatus": {
      "type": "string",
      "description": "rename status",
      "readOnly": true,
      "enum": [
        "NAME_SET",
        "NAME_SUBMITTED"
      ]
    }
  }
}