{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/APIKey",
  "title": "APIKey",
  "description": "The details of an API key, without the secret.",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique ID of the API key.",
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "description": "The name of the API key.",
      "type": "string"
    },
    "project_id": {
      "description": "The ID of the project containing the API key.",
      "type": "string",
      "format": "uuid"
    },
    "roles": {
      "description": "The roles assigned to the API key.",
      "type": "array",
      "items": {
        "example": "ProjectEditor",
        "description": "A role that can be assigned to an API key.\nPossible values: `ProjectEditor`, `ProjectViewer`, `ControlPlaneEditor`, `ControlPlaneViewer`, `DataPlaneEditor`, or `DataPlaneViewer`.",
        "x-enum": [
          "ProjectEditor",
          "ProjectViewer",
          "ControlPlaneEditor",
          "ControlPlaneViewer",
          "DataPlaneEditor",
          "DataPlaneViewer"
        ],
        "type": "string"
      }
    }
  },
  "required": [
    "id",
    "name",
    "project_id",
    "roles"
  ]
}