components:
  headers:
    RequestID:
      description: Server-generated request identifier.
      required: true
      schema:
        maxLength: 12
        minLength: 12
        pattern: ^[A-Za-z0-9_-]{12}$
        type: string
    WWWAuthenticate:
      description: Authentication challenge returned with unauthorized responses.
      required: true
      schema:
        enum:
        - Bearer
        type: string
  schemas:
    enzoModelV1APIKey:
      description: APIKey is an API-key resource. It never contains the generated
        plaintext key.
      properties:
        app:
          $ref: '#/components/schemas/v1ResourceReference'
        created_at:
          format: date-time
          readOnly: true
          type: string
        description:
          maxLength: 128
          readOnly: true
          type: string
        id:
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          readOnly: true
          type: string
        key_prefix:
          readOnly: true
          type: string
        updated_at:
          format: date-time
          readOnly: true
          type: string
      required:
      - id
      - key_prefix
      - app
      - created_at
      - updated_at
      type: object
    enzoModelV1App:
      properties:
        created_at:
          description: Timestamp when the app was created.
          format: date-time
          readOnly: true
          type: string
        id:
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          readOnly: true
          title: ID of the App
          type: string
        name:
          maxLength: 128
          minLength: 2
          pattern: ^[A-Za-z][A-Za-z0-9_-]+$
          readOnly: true
          title: Name of the App
          type: string
        realm:
          $ref: '#/components/schemas/v1ResourceReference'
        tags:
          items:
            maxLength: 128
            minLength: 2
            pattern: ^[A-Za-z][A-Za-z0-9_-]+$
            type: string
          maxItems: 8
          readOnly: true
          type: array
        updated_at:
          description: Timestamp when the app was updated.
          format: date-time
          readOnly: true
          type: string
      required:
      - id
      - name
      - created_at
      - updated_at
      - tags
      - realm
      title: App represents the App resource
      type: object
    enzoModelV1Realm:
      description: Realm is a logical configuration namespace.
      properties:
        created_at:
          description: Timestamp when the realm was created.
          format: date-time
          readOnly: true
          type: string
        id:
          description: ID of the Realm.
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          readOnly: true
          type: string
        name:
          description: Name of the Realm - always unique within an Enzo cluster.
          maxLength: 128
          minLength: 2
          pattern: ^[A-Za-z][A-Za-z0-9_-]+$
          readOnly: true
          type: string
        updated_at:
          description: Timestamp when the realm was updated.
          format: date-time
          readOnly: true
          type: string
      required:
      - id
      - name
      - created_at
      - updated_at
      type: object
    protobufNullValue:
      default: NULL_VALUE
      description: |-
        `NullValue` is a singleton enumeration to represent the null value for the
        `Value` type union.

        The JSON representation for `NullValue` is JSON `null`.

         - NULL_VALUE: Null value.
      enum:
      - NULL_VALUE
      type: string
    v1CreateAPIKeyInput:
      properties:
        description:
          maxLength: 128
          type: string
      type: object
    v1CreateAPIKeyResponse:
      properties:
        item:
          $ref: '#/components/schemas/v1CreatedAPIKey'
      required:
      - item
      type: object
    v1CreateAppInput:
      properties:
        id:
          description: Optional caller-supplied ID. The server generates one when
            omitted.
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          type: string
        name:
          maxLength: 128
          minLength: 2
          pattern: ^[A-Za-z][A-Za-z0-9_-]+$
          type: string
        tags:
          items:
            maxLength: 128
            minLength: 2
            pattern: ^[A-Za-z][A-Za-z0-9_-]+$
            type: string
          maxItems: 8
          type: array
      required:
      - name
      type: object
    v1CreateAppResponse:
      properties:
        item:
          $ref: '#/components/schemas/enzoModelV1App'
      required:
      - item
      type: object
    v1CreateRealmInput:
      properties:
        id:
          description: Optional caller-supplied ID. The server generates one when
            omitted.
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          type: string
        name:
          maxLength: 128
          minLength: 2
          pattern: ^[A-Za-z][A-Za-z0-9_-]+$
          type: string
      required:
      - name
      type: object
    v1CreateRealmResponse:
      properties:
        item:
          $ref: '#/components/schemas/enzoModelV1Realm'
      required:
      - item
      type: object
    v1CreatedAPIKey:
      description: CreatedAPIKey is returned once, when an API key is created.
      properties:
        app:
          $ref: '#/components/schemas/v1ResourceReference'
        created_at:
          format: date-time
          readOnly: true
          type: string
        description:
          maxLength: 128
          readOnly: true
          type: string
        id:
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          readOnly: true
          type: string
        key:
          readOnly: true
          type: string
        key_prefix:
          readOnly: true
          type: string
        updated_at:
          format: date-time
          readOnly: true
          type: string
      required:
      - id
      - key_prefix
      - app
      - key
      - created_at
      - updated_at
      type: object
    v1DeleteAPIKeyResponse:
      type: object
    v1DeleteAppResponse:
      type: object
    v1DeleteRealmResponse:
      type: object
    v1Error:
      description: Error is the public error envelope returned by every HTTP API endpoint.
      properties:
        code:
          description: Stable machine-readable error code.
          enum:
          - aborted
          - already_exists
          - canceled
          - deadline_exceeded
          - failed_precondition
          - internal
          - invalid_argument
          - not_found
          - unauthenticated
          - unimplemented
          - unsupported_media_type
          - unavailable
          readOnly: true
          type: string
        message:
          description: Human-readable error description.
          readOnly: true
          type: string
        request_id:
          description: Identifier that can be used to correlate the response with
            server logs.
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          readOnly: true
          type: string
      required:
      - code
      - message
      - request_id
      type: object
    v1GetOpenAPIResponse:
      properties:
        openapi:
          readOnly: true
          type: object
      required:
      - openapi
      type: object
    v1GetVersionResponse:
      properties:
        version:
          readOnly: true
          type: string
      required:
      - version
      type: object
    v1ListAPIKeyResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/enzoModelV1APIKey'
          type: array
        next_page_token:
          readOnly: true
          type: string
      required:
      - items
      - next_page_token
      type: object
    v1ListAppResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/enzoModelV1App'
          type: array
        next_page_token:
          readOnly: true
          type: string
      required:
      - items
      - next_page_token
      type: object
    v1ListRealmResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/enzoModelV1Realm'
          type: array
        next_page_token:
          readOnly: true
          type: string
      required:
      - items
      - next_page_token
      type: object
    v1ReadAPIKeyResponse:
      properties:
        item:
          $ref: '#/components/schemas/enzoModelV1APIKey'
      required:
      - item
      type: object
    v1ReadAppResponse:
      properties:
        item:
          $ref: '#/components/schemas/enzoModelV1App'
      required:
      - item
      type: object
    v1ReadRealmResponse:
      properties:
        item:
          $ref: '#/components/schemas/enzoModelV1Realm'
      required:
      - item
      type: object
    v1ResourceReference:
      description: ResourceReference identifies another API resource without embedding
        it.
      properties:
        id:
          description: Unique resource identifier.
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          readOnly: true
          type: string
      required:
      - id
      type: object
    v1VerifyKeyApp:
      description: VerifyKeyApp is the verified app resource without lifecycle timestamps.
      properties:
        id:
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          readOnly: true
          type: string
        name:
          maxLength: 128
          minLength: 2
          pattern: ^[A-Za-z][A-Za-z0-9_-]+$
          readOnly: true
          type: string
        realm:
          $ref: '#/components/schemas/v1ResourceReference'
        tags:
          items:
            maxLength: 128
            minLength: 2
            pattern: ^[A-Za-z][A-Za-z0-9_-]+$
            type: string
          maxItems: 8
          readOnly: true
          type: array
      required:
      - id
      - name
      - tags
      - realm
      type: object
    v1VerifyKeyRealm:
      description: VerifyKeyRealm is the verified realm resource without lifecycle
        timestamps.
      properties:
        id:
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          readOnly: true
          type: string
        name:
          maxLength: 128
          minLength: 2
          pattern: ^[A-Za-z][A-Za-z0-9_-]+$
          readOnly: true
          type: string
      required:
      - id
      - name
      type: object
    v1VerifyKeyRequest:
      properties:
        api_key:
          type: string
        realm_id:
          maxLength: 12
          minLength: 12
          pattern: ^[A-Za-z0-9_-]{12}$
          type: string
      required:
      - realm_id
      - api_key
      type: object
    v1VerifyKeyResponse:
      properties:
        api_key_id:
          readOnly: true
          type: string
        app:
          $ref: '#/components/schemas/v1VerifyKeyApp'
        realm:
          $ref: '#/components/schemas/v1VerifyKeyRealm'
        valid:
          type: boolean
      required:
      - valid
      type: object
  securitySchemes:
    systemKey:
      scheme: bearer
      type: http
info:
  contact:
    email: hello@enzoguard.com
    name: Enzoguard developers
    url: https://github.com/enzoguard/enzo
  description: Configuration and API-key verification interface for Enzo.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  title: Enzo Configuration API
  version: 0.0.0
openapi: 3.0.3
paths:
  /meta/openapi.json:
    get:
      operationId: Meta_GetOpenAPI
      responses:
        "200":
          content:
            application/json:
              schema:
                format: object
                type: object
          description: OpenAPI document.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: OpenAPI document unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      security: []
      summary: Get this OpenAPI document
      tags:
      - Meta
  /meta/version:
    get:
      operationId: Meta_GetVersion
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1GetVersionResponse'
          description: Version metadata.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      security: []
      summary: Get the Enzo version
      tags:
      - Meta
  /v1/realms:
    get:
      operationId: Realm_List
      parameters:
      - description: Maximum number of realms to return. Defaults to and is capped
          at 1000.
        in: query
        name: page_size
        schema:
          format: int32
          type: integer
      - in: query
        name: page_token
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1ListRealmResponse'
          description: Realm list.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid pagination input.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: List realms
      tags:
      - Realm
    post:
      operationId: Realm_Create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1CreateRealmInput'
        required: true
        x-originalParamName: item
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/enzoModelV1Realm'
          description: Realm created.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid input or constraint violation.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "415":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Request body is not JSON.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: Create a realm
      tags:
      - Realm
  /v1/realms/{id}:
    delete:
      operationId: Realm_Delete
      parameters:
      - description: Realm ID or name.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Realm deleted.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid realm ID, name, or constraint violation.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm not found.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: Delete a realm by ID or name
      tags:
      - Realm
    get:
      operationId: Realm_Read
      parameters:
      - description: Realm ID or name.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/enzoModelV1Realm'
          description: Realm retrieved.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid realm ID or name.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm not found.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: Get a realm by ID or name
      tags:
      - Realm
  /v1/realms/{realm_id}/apps:
    get:
      operationId: App_List
      parameters:
      - description: Realm ID or name.
        in: path
        name: realm_id
        required: true
        schema:
          type: string
      - description: Maximum number of apps to return. Defaults to and is capped at
          1000.
        in: query
        name: page_size
        schema:
          format: int32
          type: integer
      - in: query
        name: page_token
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1ListAppResponse'
          description: App list.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid realm or pagination input.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm not found.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: List apps in a realm
      tags:
      - App
    post:
      operationId: App_Create
      parameters:
      - description: Realm ID or name.
        in: path
        name: realm_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1CreateAppInput'
        required: true
        x-originalParamName: item
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/enzoModelV1App'
          description: App created.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid input or constraint violation.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm not found.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "415":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Request body is not JSON.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: Create an app
      tags:
      - App
  /v1/realms/{realm_id}/apps/{app_id}/api-keys:
    get:
      operationId: APIKey_List
      parameters:
      - description: Realm ID or name.
        in: path
        name: realm_id
        required: true
        schema:
          type: string
      - description: App ID or name.
        in: path
        name: app_id
        required: true
        schema:
          type: string
      - description: Maximum number of API keys to return. Defaults to and is capped
          at 1000.
        in: query
        name: page_size
        schema:
          format: int32
          type: integer
      - in: query
        name: page_token
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1ListAPIKeyResponse'
          description: API-key list.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid realm, app, or pagination input.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm or app not found.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: List API keys for an app
      tags:
      - APIKey
    post:
      description: The plaintext key is returned only once in this response.
      operationId: APIKey_Create
      parameters:
      - description: Realm ID or name.
        in: path
        name: realm_id
        required: true
        schema:
          type: string
      - description: App ID or name.
        in: path
        name: app_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1CreateAPIKeyInput'
        x-originalParamName: item
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1CreatedAPIKey'
          description: API key created.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid input or API-key limit reached.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm or app not found.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "415":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Request body is not JSON.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: Create an API key
      tags:
      - APIKey
  /v1/realms/{realm_id}/apps/{app_id}/api-keys/{api_key_id}:
    delete:
      operationId: APIKey_Delete
      parameters:
      - description: Realm ID or name.
        in: path
        name: realm_id
        required: true
        schema:
          type: string
      - description: App ID or name.
        in: path
        name: app_id
        required: true
        schema:
          type: string
      - description: API-key ID.
        in: path
        name: api_key_id
        required: true
        schema:
          type: string
      responses:
        "204":
          description: API key deleted.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid realm, app, or API-key identifier.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm, app, or API key not found.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: Delete an API key
      tags:
      - APIKey
    get:
      operationId: APIKey_Read
      parameters:
      - description: Realm ID or name.
        in: path
        name: realm_id
        required: true
        schema:
          type: string
      - description: App ID or name.
        in: path
        name: app_id
        required: true
        schema:
          type: string
      - description: API-key ID.
        in: path
        name: api_key_id
        required: true
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/enzoModelV1APIKey'
          description: API key retrieved.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid realm, app, or API-key identifier.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm, app, or API key not found.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: Get an API key
      tags:
      - APIKey
  /v1/realms/{realm_id}/apps/{id}:
    delete:
      operationId: App_Delete
      parameters:
      - description: Realm ID or name.
        in: path
        name: realm_id
        required: true
        schema:
          type: string
      - description: App ID or name.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        "204":
          description: App deleted.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid input or constraint violation.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm or app not found.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: Delete an app by ID or name
      tags:
      - App
    get:
      operationId: App_Read
      parameters:
      - description: Realm ID or name.
        in: path
        name: realm_id
        required: true
        schema:
          type: string
      - description: App ID or name.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/enzoModelV1App'
          description: App retrieved.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid realm or app ID or name.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm or app not found.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Internal server error.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication service unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: Get an app by ID or name
      tags:
      - App
  /v1/verify-key:
    post:
      description: Verifies a customer API key in a realm owned by the organization
        authenticated by the system key.
      operationId: Verification_VerifyKey
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1VerifyKeyRequest'
        required: true
        x-originalParamName: body
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1VerifyKeyResponse'
          description: Verification result.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Invalid request body.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Missing or invalid system key.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Realm not found in the authenticated organization.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "415":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Request body is not JSON.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "500":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Key verification failed.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
        "503":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
          description: Authentication configuration or system-key verification is
            unavailable.
          headers:
            Request-ID:
              $ref: '#/components/headers/RequestID'
      summary: Verify a customer API key
      tags:
      - Verification
security:
- systemKey: []
servers:
- url: https://api.enzoguard.com
tags:
- description: Realm management.
  name: Realm
- description: App management.
  name: App
- description: API-key management.
  name: APIKey
- description: Customer API-key verification.
  name: Verification
- name: Meta
