Kong KeySets API

A JSON Web key set. Key sets are the preferred way to expose keys to plugins because they tell the plugin where to look for keys or have a scoping mechanism to restrict plugins to specific keys.

OpenAPI Specification

kong-keysets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  contact:
    email: support@konghq.com
    name: Kong Inc
    url: https://konghq.com
  description: 'OpenAPI 3.0 spec for Kong Gateway''s Admin API.


    You can learn more about Kong Gateway at [developer.konghq.com](https://developer.konghq.com).

    Give Kong a star at the [Kong/kong](https://github.com/kong/kong) repository.'
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  title: Kong Enterprise Admin ACLs KeySets API
  version: 3.14.0
servers:
- description: Default Admin API URL
  url: '{protocol}://{hostname}:{port}{path}'
  variables:
    hostname:
      default: localhost
      description: Hostname for Kong's Admin API
    path:
      default: /
      description: Base path for Kong's Admin API
    port:
      default: '8001'
      description: Port for Kong's Admin API
    protocol:
      default: http
      description: Protocol for requests to Kong's Admin API
      enum:
      - http
      - https
security:
- adminToken: []
tags:
- description: 'A JSON Web key set. Key sets are the preferred way to expose keys to plugins because they tell the plugin where to look for keys or have a scoping mechanism to restrict plugins to specific keys.

    '
  name: KeySets
paths:
  /{workspace}/key-sets:
    post:
      x-speakeasy-entity-operation:
        terraform-datasource: null
        terraform-resource: KeySet#create
      operationId: create-key-set
      summary: Create a new KeySet
      description: Create a new KeySet
      parameters:
      - $ref: '#/components/parameters/Workspace'
      requestBody:
        description: Description of the new KeySet for creation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeySet'
      responses:
        '201':
          description: Successfully created KeySet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeySet'
        '401':
          $ref: '#/components/responses/HTTP401Error'
      tags:
      - KeySets
  /{workspace}/key-sets/{KeySetIdOrName}:
    parameters:
    - $ref: '#/components/parameters/KeySetIdOrName'
    delete:
      x-speakeasy-entity-operation:
        terraform-datasource: null
        terraform-resource: KeySet#delete
      operationId: delete-key-set
      summary: Delete a KeySet
      description: Delete a KeySet
      parameters:
      - $ref: '#/components/parameters/KeySetIdOrName'
      - $ref: '#/components/parameters/Workspace'
      responses:
        '204':
          description: Successfully deleted KeySet or the resource didn't exist
        '401':
          $ref: '#/components/responses/HTTP401Error'
      tags:
      - KeySets
    get:
      x-speakeasy-entity-operation:
        terraform-datasource: null
        terraform-resource: KeySet#read
      operationId: get-key-set
      summary: Get a KeySet
      description: Get a KeySet using ID or name.
      parameters:
      - $ref: '#/components/parameters/Workspace'
      responses:
        '200':
          description: Successfully fetched KeySet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeySet'
        '401':
          $ref: '#/components/responses/HTTP401Error'
        '404':
          description: Resource does not exist
      tags:
      - KeySets
    put:
      x-speakeasy-entity-operation:
        terraform-datasource: null
        terraform-resource: KeySet#update
      operationId: upsert-key-set
      summary: Upsert a KeySet
      description: Create or Update KeySet using ID or name.
      parameters:
      - $ref: '#/components/parameters/Workspace'
      requestBody:
        description: Description of the KeySet
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeySet'
      responses:
        '200':
          description: Successfully upserted KeySet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeySet'
        '401':
          $ref: '#/components/responses/HTTP401Error'
      tags:
      - KeySets
  /v2/control-planes/{controlPlaneId}/core-entities/key-sets:
    parameters:
    - $ref: '#/components/parameters/controlPlaneId'
    get:
      operationId: list-key-set
      summary: List all KeySets
      description: List all KeySets
      parameters:
      - $ref: '#/components/parameters/PaginationSize'
      - $ref: '#/components/parameters/PaginationOffset'
      - $ref: '#/components/parameters/PaginationTagsFilter'
      responses:
        '200':
          description: A successful response listing KeySets
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/KeySet_2'
                  next:
                    $ref: '#/components/schemas/PaginationNextResponse'
                  offset:
                    $ref: '#/components/schemas/PaginationOffsetResponse'
        '401':
          $ref: '#/components/responses/HTTP401Error_2'
      tags:
      - KeySets
    post:
      operationId: create-key-set
      summary: Create a new KeySet
      description: Create a new KeySet
      requestBody:
        description: Description of the new KeySet for creation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeySet_2'
      responses:
        '201':
          description: Successfully created KeySet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeySet_2'
        '401':
          $ref: '#/components/responses/HTTP401Error_2'
      tags:
      - KeySets
  /v2/control-planes/{controlPlaneId}/core-entities/key-sets/{KeySetId}:
    parameters:
    - $ref: '#/components/parameters/KeySetId'
    - $ref: '#/components/parameters/controlPlaneId'
    delete:
      operationId: delete-key-set
      summary: Delete a KeySet
      description: Delete a KeySet
      parameters:
      - $ref: '#/components/parameters/KeySetId'
      responses:
        '204':
          description: Successfully deleted KeySet or the resource didn't exist
        '401':
          $ref: '#/components/responses/HTTP401Error_2'
      tags:
      - KeySets
    get:
      operationId: get-key-set
      summary: Get a KeySet
      description: Get a KeySet using ID or name.
      responses:
        '200':
          description: Successfully fetched KeySet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeySet_2'
        '401':
          $ref: '#/components/responses/HTTP401Error_2'
        '404':
          description: Resource does not exist
      tags:
      - KeySets
    put:
      operationId: upsert-key-set
      summary: Upsert a KeySet
      description: Create or Update KeySet using ID or name.
      requestBody:
        description: Description of the KeySet
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeySet_2'
      responses:
        '200':
          description: Successfully upserted KeySet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeySet_2'
        '401':
          $ref: '#/components/responses/HTTP401Error_2'
      tags:
      - KeySets
components:
  responses:
    HTTP401Error_2:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayUnauthorizedError'
    HTTP401Error:
      description: Unauthorized
      content:
        application/json:
          examples:
            DuplicateApiKey:
              summary: Duplicate API key found
              value:
                message: Duplicate API key found
                status: 401
            InvalidAuthCred:
              summary: Invalid authentication credentials
              value:
                message: Unauthorized
                status: 401
            NoAPIKey:
              summary: No API key found
              value:
                message: No API key found in request
                status: 401
          schema:
            $ref: '#/components/schemas/GatewayUnauthorizedError'
  parameters:
    PaginationSize:
      description: Number of resources to be returned.
      in: query
      name: size
      schema:
        type: integer
        default: 100
        maximum: 1000
        minimum: 1
    KeySetId:
      description: ID of the KeySet to lookup
      example: 6cc34248-50b4-4a81-9201-3bdf7a83f712
      in: path
      name: KeySetId
      required: true
      schema:
        type: string
    Workspace:
      description: The name of the workspace
      in: path
      name: workspace
      required: true
      schema:
        type: string
        example: team-payments
        default: default
    KeySetIdOrName:
      description: ID or name of the KeySet to lookup
      example: 6cc34248-50b4-4a81-9201-3bdf7a83f712
      in: path
      name: KeySetIdOrName
      required: true
      schema:
        type: string
      x-speakeasy-match: id
    PaginationOffset:
      allowEmptyValue: true
      description: Offset from which to return the next set of resources. Use the value of the 'offset' field from the response of a list operation as input here to paginate through all the resources
      in: query
      name: offset
      schema:
        type: string
    controlPlaneId:
      name: controlPlaneId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        example: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      description: The UUID of your control plane. This variable is available in the Konnect manager.
      x-speakeasy-param-force-new: true
    PaginationTagsFilter:
      allowEmptyValue: true
      description: A list of tags to filter the list of resources on. Multiple tags can be concatenated using ',' to mean AND or using '/' to mean OR.
      example: tag1,tag2
      in: query
      name: tags
      schema:
        type: string
  schemas:
    PaginationOffsetResponse:
      description: Offset is used to paginate through the API. Provide this value to the next list operation to fetch the next page
      type: string
    GatewayUnauthorizedError:
      type: object
      properties:
        message:
          type: string
        status:
          type: integer
      required:
      - message
      - status
    KeySet_2:
      type: object
      properties:
        created_at:
          description: Unix epoch when the resource was created.
          type: integer
          nullable: true
        id:
          description: A string representing a UUID (universally unique identifier).
          type: string
          nullable: true
        name:
          description: The name to associate with the given key-set.
          type: string
          nullable: true
        tags:
          description: A set of strings representing tags.
          type: array
          items:
            description: A string representing a tag.
            type: string
          nullable: true
        updated_at:
          description: Unix epoch when the resource was last updated.
          type: integer
          nullable: true
      example:
        id: b58c7d9d-e54f-444c-b24d-cdfc4159f61e
        name: example-key-set
        tags:
        - idp-keys
      additionalProperties: false
    KeySet:
      x-speakeasy-entity: KeySet
      type: object
      properties:
        created_at:
          description: Unix epoch when the resource was created.
          type: integer
          nullable: true
        id:
          description: A string representing a UUID (universally unique identifier).
          type: string
          nullable: true
        name:
          description: The name to associate with the given key-set.
          type: string
          nullable: true
        tags:
          description: A set of strings representing tags.
          type: array
          items:
            description: A string representing a tag.
            type: string
          nullable: true
        updated_at:
          description: Unix epoch when the resource was last updated.
          type: integer
          nullable: true
      example:
        id: b58c7d9d-e54f-444c-b24d-cdfc4159f61e
        name: example-key-set
        tags:
        - idp-keys
      additionalProperties: false
    PaginationNextResponse:
      description: URI to the next page (may be null)
      type: string
  securitySchemes:
    adminToken:
      in: header
      name: Kong-Admin-Token
      type: apiKey
externalDocs:
  description: Documentation for Kong Gateway and its APIs
  url: https://developer.konghq.com