Kong JWTs API

The JWTs API from Kong — 6 operation(s) for jwts.

OpenAPI Specification

kong-jwts-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 JWTs 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:
- name: JWTs
paths:
  /{workspace}/consumers/{ConsumerIdForNestedEntities}/jwt:
    post:
      x-speakeasy-entity-operation:
        terraform-datasource: null
        terraform-resource: JWT#create
      operationId: create-jwt-with-consumer
      summary: Create a new JWT associated with a Consumer
      description: Create a new JWT associated with a Consumer
      parameters:
      - $ref: '#/components/parameters/ConsumerIdForNestedEntities'
      - $ref: '#/components/parameters/Workspace'
      requestBody:
        description: Description of new JWT for creation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JWTWithoutParents'
      responses:
        '201':
          description: Successfully created JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JWT'
      tags:
      - JWTs
  /{workspace}/consumers/{ConsumerIdForNestedEntities}/jwt/{JWTId}:
    delete:
      x-speakeasy-entity-operation:
        terraform-datasource: null
        terraform-resource: JWT#delete
      operationId: delete-jwt-with-consumer
      summary: Delete a a JWT associated with a Consumer
      description: Delete a a JWT associated with a Consumer using ID.
      parameters:
      - $ref: '#/components/parameters/ConsumerIdForNestedEntities'
      - $ref: '#/components/parameters/JWTId'
      - $ref: '#/components/parameters/Workspace'
      responses:
        '204':
          description: Successfully deleted JWT or the resource didn't exist
      tags:
      - JWTs
    get:
      x-speakeasy-entity-operation:
        terraform-datasource: null
        terraform-resource: JWT#read
      operationId: get-jwt-with-consumer
      summary: Get a JWT associated with a Consumer
      description: Get a JWT associated with a Consumer using ID.
      parameters:
      - $ref: '#/components/parameters/ConsumerIdForNestedEntities'
      - $ref: '#/components/parameters/JWTId'
      - $ref: '#/components/parameters/Workspace'
      responses:
        '200':
          description: Successfully fetched JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JWT'
        '404':
          description: Resource does not exist
      tags:
      - JWTs
  /v2/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/jwt:
    parameters:
    - $ref: '#/components/parameters/controlPlaneId'
    get:
      operationId: list-jwt-with-consumer
      summary: List all JWTs associated with a Consumer
      description: List all JWTs associated with a Consumer
      parameters:
      - $ref: '#/components/parameters/ConsumerIdForNestedEntities_2'
      - $ref: '#/components/parameters/PaginationSize'
      - $ref: '#/components/parameters/PaginationOffset'
      - $ref: '#/components/parameters/PaginationTagsFilter'
      responses:
        '200':
          description: A successful response listing JWTs
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/JWT_2'
                  next:
                    $ref: '#/components/schemas/PaginationNextResponse'
                  offset:
                    $ref: '#/components/schemas/PaginationOffsetResponse'
      tags:
      - JWTs
    post:
      operationId: create-jwt-with-consumer
      summary: Create a new JWT associated with a Consumer
      description: Create a new JWT associated with a Consumer
      parameters:
      - $ref: '#/components/parameters/ConsumerIdForNestedEntities_2'
      requestBody:
        description: Description of new JWT for creation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JWTWithoutParents_2'
      responses:
        '201':
          description: Successfully created JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JWT_2'
      tags:
      - JWTs
  /v2/control-planes/{controlPlaneId}/core-entities/consumers/{ConsumerIdForNestedEntities}/jwt/{JWTId}:
    parameters:
    - $ref: '#/components/parameters/controlPlaneId'
    delete:
      operationId: delete-jwt-with-consumer
      summary: Delete a a JWT associated with a Consumer
      description: Delete a a JWT associated with a Consumer using ID.
      parameters:
      - $ref: '#/components/parameters/ConsumerIdForNestedEntities_2'
      - $ref: '#/components/parameters/JWTId_2'
      responses:
        '204':
          description: Successfully deleted JWT or the resource didn't exist
      tags:
      - JWTs
    get:
      operationId: get-jwt-with-consumer
      summary: Get a JWT associated with a Consumer
      description: Get a JWT associated with a Consumer using ID.
      parameters:
      - $ref: '#/components/parameters/ConsumerIdForNestedEntities_2'
      - $ref: '#/components/parameters/JWTId_2'
      responses:
        '200':
          description: Successfully fetched JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JWT_2'
        '404':
          description: Resource does not exist
      tags:
      - JWTs
    put:
      operationId: upsert-jwt-with-consumer
      summary: Upsert a JWT associated with a Consumer
      description: Create or Update a JWT associated with a Consumer using ID.
      parameters:
      - $ref: '#/components/parameters/ConsumerIdForNestedEntities_2'
      - $ref: '#/components/parameters/JWTId_2'
      requestBody:
        description: Description of the JWT
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JWTWithoutParents_2'
      responses:
        '200':
          description: Successfully upserted JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JWT_2'
      tags:
      - JWTs
  /v2/control-planes/{controlPlaneId}/core-entities/jwts:
    parameters:
    - $ref: '#/components/parameters/controlPlaneId'
    get:
      operationId: list-jwt
      summary: List all JWTs
      description: List all JWTs
      parameters:
      - $ref: '#/components/parameters/PaginationSize'
      - $ref: '#/components/parameters/PaginationOffset'
      - $ref: '#/components/parameters/PaginationTagsFilter'
      responses:
        '200':
          description: A successful response listing JWTs
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/JWT_2'
                  next:
                    $ref: '#/components/schemas/PaginationNextResponse'
                  offset:
                    $ref: '#/components/schemas/PaginationOffsetResponse'
        '401':
          $ref: '#/components/responses/HTTP401Error'
      tags:
      - JWTs
  /v2/control-planes/{controlPlaneId}/core-entities/jwts/{JWTId}:
    parameters:
    - $ref: '#/components/parameters/JWTId_2'
    - $ref: '#/components/parameters/controlPlaneId'
    get:
      operationId: get-jwt
      summary: Get a JWT
      description: Get a JWT using ID.
      responses:
        '200':
          description: Successfully fetched JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JWT_2'
        '401':
          $ref: '#/components/responses/HTTP401Error'
        '404':
          description: Resource does not exist
      tags:
      - JWTs
components:
  parameters:
    ConsumerIdForNestedEntities_2:
      description: Consumer ID for nested entities
      example: ''
      in: path
      name: ConsumerIdForNestedEntities
      required: true
      schema:
        type: string
    PaginationSize:
      description: Number of resources to be returned.
      in: query
      name: size
      schema:
        type: integer
        default: 100
        maximum: 1000
        minimum: 1
    JWTId:
      description: ID of the JWT to lookup
      example: 4a7f5faa-8c96-46d6-8214-c87573ef2ac4
      in: path
      name: JWTId
      required: true
      schema:
        type: string
      x-speakeasy-match: id
    Workspace:
      description: The name of the workspace
      in: path
      name: workspace
      required: true
      schema:
        type: string
        example: team-payments
        default: default
    JWTId_2:
      description: ID of the JWT to lookup
      example: 4a7f5faa-8c96-46d6-8214-c87573ef2ac4
      in: path
      name: JWTId
      required: true
      schema:
        type: string
    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
    ConsumerIdForNestedEntities:
      description: Consumer ID for nested entities
      example: ''
      in: path
      name: ConsumerIdForNestedEntities
      required: true
      schema:
        type: string
      x-speakeasy-name-override: consumer_id
    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
    JWTWithoutParents:
      x-speakeasy-entity: JWT
      type: object
      properties:
        algorithm:
          type: string
          default: HS256
          enum:
          - ES256
          - ES256K
          - ES384
          - ES512
          - ESB256
          - ESB320
          - ESB384
          - ESB512
          - ESP256
          - ESP384
          - ESP512
          - Ed25519
          - Ed448
          - EdDSA
          - HS256
          - HS384
          - HS512
          - PS256
          - PS384
          - PS512
          - RS256
          - RS384
          - RS512
          nullable: true
        consumer:
          type: object
          nullable: true
          properties:
            id:
              type: string
          x-foreign: true
          x-speakeasy-terraform-ignore: true
        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
        key:
          type: string
          nullable: true
        rsa_public_key:
          type: string
          nullable: true
        secret:
          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
      example:
        algorithm: HS256
        id: 75695322-e8a0-4109-aed4-5416b0308d85
        key: YJdmaDvVTJxtcWRCvkMikc8oELgAVNcz
        secret: C50k0bcahDhLNhLKSUBSR1OMiFGzNZ7X
      additionalProperties: false
    JWT_2:
      type: object
      properties:
        algorithm:
          type: string
          default: HS256
          enum:
          - ES256
          - ES256K
          - ES384
          - ES512
          - ESB256
          - ESB320
          - ESB384
          - ESB512
          - ESP256
          - ESP384
          - ESP512
          - Ed25519
          - Ed448
          - EdDSA
          - HS256
          - HS384
          - HS512
          - PS256
          - PS384
          - PS512
          - RS256
          - RS384
          - RS512
          nullable: true
          x-speakeasy-unknown-values: allow
        consumer:
          type: object
          nullable: true
          properties:
            id:
              type: string
          x-foreign: true
        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
        key:
          type: string
          nullable: true
        rsa_public_key:
          type: string
          nullable: true
        secret:
          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
      example:
        algorithm: HS256
        consumer:
          id: 84a73fb8-50fc-44a7-a4d5-aa17728ee83f
        id: 75695322-e8a0-4109-aed4-5416b0308d85
        key: YJdmaDvVTJxtcWRCvkMikc8oELgAVNcz
        secret: C50k0bcahDhLNhLKSUBSR1OMiFGzNZ7X
      additionalProperties: false
    JWTWithoutParents_2:
      type: object
      properties:
        algorithm:
          type: string
          default: HS256
          enum:
          - ES256
          - ES256K
          - ES384
          - ES512
          - ESB256
          - ESB320
          - ESB384
          - ESB512
          - ESP256
          - ESP384
          - ESP512
          - Ed25519
          - Ed448
          - EdDSA
          - HS256
          - HS384
          - HS512
          - PS256
          - PS384
          - PS512
          - RS256
          - RS384
          - RS512
          nullable: true
          x-speakeasy-unknown-values: allow
        consumer:
          type: object
          nullable: true
          properties:
            id:
              type: string
          x-foreign: true
        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
        key:
          type: string
          nullable: true
        rsa_public_key:
          type: string
          nullable: true
        secret:
          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
      example:
        algorithm: HS256
        id: 75695322-e8a0-4109-aed4-5416b0308d85
        key: YJdmaDvVTJxtcWRCvkMikc8oELgAVNcz
        secret: C50k0bcahDhLNhLKSUBSR1OMiFGzNZ7X
      additionalProperties: false
    JWT:
      x-speakeasy-entity: JWT
      type: object
      properties:
        algorithm:
          type: string
          default: HS256
          enum:
          - ES256
          - ES256K
          - ES384
          - ES512
          - ESB256
          - ESB320
          - ESB384
          - ESB512
          - ESP256
          - ESP384
          - ESP512
          - Ed25519
          - Ed448
          - EdDSA
          - HS256
          - HS384
          - HS512
          - PS256
          - PS384
          - PS512
          - RS256
          - RS384
          - RS512
          nullable: true
        consumer:
          type: object
          nullable: true
          properties:
            id:
              type: string
          x-foreign: true
          x-speakeasy-terraform-ignore: true
        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
        key:
          type: string
          nullable: true
        rsa_public_key:
          type: string
          nullable: true
        secret:
          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
      example:
        algorithm: HS256
        consumer:
          id: 84a73fb8-50fc-44a7-a4d5-aa17728ee83f
        id: 75695322-e8a0-4109-aed4-5416b0308d85
        key: YJdmaDvVTJxtcWRCvkMikc8oELgAVNcz
        secret: C50k0bcahDhLNhLKSUBSR1OMiFGzNZ7X
      additionalProperties: false
    PaginationNextResponse:
      description: URI to the next page (may be null)
      type: string
  responses:
    HTTP401Error:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayUnauthorizedError'
  securitySchemes:
    adminToken:
      in: header
      name: Kong-Admin-Token
      type: apiKey
externalDocs:
  description: Documentation for Kong Gateway and its APIs
  url: https://developer.konghq.com