> ## Documentation Index
> Fetch the complete documentation index at: https://developer.hellgate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get API keys

> Retrieves a list of all API keys.



## OpenAPI

````yaml /products/guardian/openapi.yaml get /api/admin/api-keys
openapi: 3.1.0
info:
  title: Guardian API
  version: '1.0'
  contact:
    name: Starfish GmbH & Co. KG
    email: support@hellgate.io
    url: https://hellgate.io/cpa/guardian
  license:
    name: Hellgate API Terms
    url: https://hellgate.io/terms-and-conditions
servers:
  - url: https://{instance}.{env}.on-hellgate.cloud
    description: Managed instance of Guardian
    variables:
      instance:
        default: my-instance
        description: Your unique instance slug, provided during onboarding.
      env:
        default: eu1
        description: Deployment environment (currently eu1).
security: []
tags:
  - name: pci
    description: Management of card payment credentials under the ruling of PCI DSS.
  - name: network
    description: Management of network tokens and cryptograms for secure transactions.
  - name: generic
    description: Management of generic tokens and their schemas for various use cases.
  - name: metadata
    description: Inquiries for card metadata based on PAN, PCI tokens, or network tokens.
  - name: wallet
    description: >-
      Management of wallet tokens ingested from device wallets such as Google
      Pay.
  - name: apikey
    description: Management of API keys for service access.
  - name: webhook
    description: Management of webhooks for event notifications.
  - name: types
    description: Management of types for generic token schemas.
paths:
  /api/admin/api-keys:
    get:
      tags:
        - apikey
      summary: Get API keys
      description: Retrieves a list of all API keys.
      operationId: admin_api_key_list
      parameters:
        - name: after
          in: query
          description: >-
            The ID of the API key after which to start listing. This is used for
            pagination.
          required: false
          schema:
            type: string
            format: uuid
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_key_list'
        '401':
          $ref: '#/components/responses/401_UnauthorizedError'
        '403':
          $ref: '#/components/responses/403_ForbiddenError'
      security:
        - bearerAuth: []
        - APIKey: []
components:
  schemas:
    api_key_list:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/api_key'
        links:
          type: object
          properties:
            next:
              type: string
              format: uri
          required:
            - next
      required:
        - data
        - links
      example:
        data:
          - id: 123e4567-e89b-12d3-a456-426614174000
            created_at: '2023-10-01T12:00:00Z'
            masked_key_value: key_123xxxx
            scopes:
              - admin:api-keys:create
              - admin:api-keys:update
        links:
          next: >-
            https://my-instance.eu1.on-hellgate.cloud/admin/api-keys?after=123e4567-e89b-12d3-a456-426614174000&limit=20
    api_key:
      type: object
      properties:
        id:
          example: 123e4567-e89b-12d3-a456-426614174000
          type: string
        created_at:
          example: '2023-10-01T12:00:00Z'
          type: string
          format: date-time
        expires_at:
          example: '2027-01-01T00:00:00Z'
          type: string
          format: date-time
        masked_key_value:
          example: key_123xxxx
          type: string
        scopes:
          $ref: '#/components/schemas/scopes'
      required:
        - id
        - created_at
        - masked_key_value
        - scopes
      example:
        id: 123e4567-e89b-12d3-a456-426614174000
        created_at: '2023-10-01T12:00:00Z'
        masked_key_value: key_123xxxx
        scopes:
          - admin:api-keys:create
          - admin:api-keys:update
    ErrorGeneric:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorStatusCode'
        classifier:
          $ref: '#/components/schemas/ErrorClassifier'
        message:
          $ref: '#/components/schemas/ErrorMessage'
    scopes:
      type: array
      description: A list of scopes that the API key will have access to.
      minItems: 1
      items:
        type: string
        enum:
          - pci:tokens:create
          - pci:tokens:read
          - pci:tokens:update
          - pci:tokens:delete
          - pci:tokens:forward
          - generic:tokens:create
          - generic:tokens:read
          - generic:tokens:delete
          - network:tokens:create
          - network:tokens:read
          - network:tokens:delete
          - network:tokens:use
          - network:tokens:forward
          - wallet:tokens:create
          - wallet:tokens:read
          - wallet:tokens:delete
          - wallet:tokens:forward
          - wallet:apple-pay:sessions:create
          - wallet:apple-pay:settings:read
          - wallet:apple-pay:settings:update
          - wallet:apple-pay:trust-anchors:read
          - wallet:apple-pay:trust-anchors:update
          - wallet:apple-pay:certificates:create
          - wallet:apple-pay:certificates:read
          - wallet:apple-pay:certificates:update
          - wallet:apple-pay:certificates:delete
          - wallet:apple-pay:domains:create
          - wallet:apple-pay:domains:read
          - wallet:apple-pay:domains:update
          - wallet:apple-pay:domains:delete
          - metadata:inquiries:create
          - admin:api-keys:create
          - admin:api-keys:read
          - admin:api-keys:update
          - admin:api-keys:delete
          - admin:webhooks:create
          - admin:webhooks:read
          - admin:webhooks:delete
          - admin:types:create
          - admin:types:read
          - admin:types:delete
          - admin:imports:create
          - admin:imports:read
          - admin:imports:cancel
    ErrorStatusCode:
      type: integer
      description: The corresponding HTTP status code for the error
    ErrorClassifier:
      type: string
      description: Technical code that helps to identify the error
    ErrorMessage:
      type: string
      description: Human readable representation of the error
  responses:
    401_UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorGeneric'
          example:
            code: 401
            message: No valid means of authentication was provided
            classifier: UNAUTHORIZED
    403_ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorGeneric'
          example:
            code: 403
            message: Not allowed to access this resource or feature
            classifier: FORBIDDEN
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT bearer token obtained via the OAuth2 client-credentials grant from
        the platform Authentication API. The token's scopes gate the endpoints
        it may call, and its audience names the Guardian instance. This is the
        standard way to authenticate to Guardian.
    APIKey:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        Deprecated. Long-lived instance API key, sent as `x-api-key`. Existing
        integrations continue to work, but new ones should use the OAuth2 bearer
        token instead.

````