{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mindcloud/json-schema/mindcloud-api-key-summary-schema.json",
  "title": "ApiKeySummary",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mindcloud-api-keys-api-openapi.yml#/components/schemas/ApiKeySummary",
  "type": "object",
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Unique id of the key."
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name the key was created with."
    },
    "accessLevel": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "read_only",
        "run_workflows",
        "full_access",
        "none",
        null
      ],
      "description": "A summary of the key permissions: full_access, run_workflows, read_only, or none. Derived from permissions; it is never set directly."
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The permissions the key holds. A request may use one only while the key's creator also holds it."
    },
    "usedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The last time the key was used. Old dates are rotation candidates."
    },
    "revokedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the key was revoked. Empty while it is active."
    },
    "createdOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the key was created."
    },
    "createdBy": {
      "type": [
        "string",
        "null"
      ],
      "description": "Who created it."
    },
    "updatedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When it was last changed."
    }
  },
  "required": [
    "id",
    "name",
    "accessLevel",
    "permissions",
    "usedOn",
    "revokedOn",
    "createdOn",
    "createdBy",
    "updatedOn"
  ]
}