openapi: 3.2.0 info: title: Konnect API - Go SDK Custom Plugins API version: 3.14.0 description: The Konnect platform API contact: name: Kong Inc url: https://konghq.com email: support@konghq.com x-extensions-note: "This API uses the `x-expression` vendor extension to indicate that a string property is a DSL expression.\nSupported types:\n\n\n - `boolean`: An expression evaluates to boolean. For example, `context.topic.name == 'my-topic'`\n - `string`: A template string expression that evaluates to a string or a literal string value. For example,\n `${context.topic.name.substring(0, context.topic.name.length-4)}` or `my-literal-value`\n\nAdditionally, `x-sensitive` flag indicates that a field contains sensitive information. When the value\nof the field is provided in plain text, it's encrypted at rest and it's never returned in API responses.\nWhen the value is an expression, the expression itself is stored and returned in API responses.\n\n`x-min-runtime-version` indicates the minimum Event Gateway runtime version required to use a certain policy or\npolicy feature. The runtime version can be configured at the Event Gateway entity level. It must be a string\ncontaining a semantic version in the `MAJOR.MINOR` format, e.g., `\"1.1\"`.\n" license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html x-oas-source: kong/platform-api@ x-oas-source-link: https://github.com/Kong/platform-api/commit/ servers: - url: https://global.api.konghq.com - url: https://us.api.konghq.com - url: https://eu.api.konghq.com - url: https://au.api.konghq.com security: - personalAccessToken: [] - systemAccountAccessToken: [] - konnectAccessToken: [] - serviceAccessToken: [] tags: - name: Custom Plugins paths: /v2/control-planes/{controlPlaneId}/core-entities/custom-plugins: parameters: - $ref: '#/components/parameters/controlPlaneId' get: operationId: list-custom-plugin summary: List all CustomPlugins description: '**Pre-release Endpoint** This endpoint is currently in beta and is subject to change. List all CustomPlugins' parameters: - $ref: '#/components/parameters/PaginationSize' - $ref: '#/components/parameters/PaginationOffset' - $ref: '#/components/parameters/PaginationTagsFilter' responses: '200': description: A successful response listing CustomPlugins content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CustomPlugin' next: $ref: '#/components/schemas/PaginationNextResponse' offset: $ref: '#/components/schemas/PaginationOffsetResponse' '401': $ref: '#/components/responses/HTTP401Error' tags: - Custom Plugins post: operationId: create-custom-plugin summary: Create a new CustomPlugin description: '**Pre-release Endpoint** This endpoint is currently in beta and is subject to change. Create a new CustomPlugin' requestBody: description: Description of the new CustomPlugin for creation required: true content: application/json: schema: $ref: '#/components/schemas/CustomPlugin' responses: '201': description: Successfully created CustomPlugin content: application/json: schema: $ref: '#/components/schemas/CustomPlugin' '401': $ref: '#/components/responses/HTTP401Error' tags: - Custom Plugins /v2/control-planes/{controlPlaneId}/core-entities/custom-plugins/{CustomPluginId}: parameters: - $ref: '#/components/parameters/CustomPluginId' - $ref: '#/components/parameters/controlPlaneId' delete: operationId: delete-custom-plugin summary: Delete a CustomPlugin description: '**Pre-release Endpoint** This endpoint is currently in beta and is subject to change. Delete a CustomPlugin' parameters: - $ref: '#/components/parameters/CustomPluginId' responses: '204': description: Successfully deleted CustomPlugin or the resource didn't exist '401': $ref: '#/components/responses/HTTP401Error' tags: - Custom Plugins get: operationId: get-custom-plugin summary: Get a CustomPlugin description: '**Pre-release Endpoint** This endpoint is currently in beta and is subject to change. Get a CustomPlugin using ID or name.' responses: '200': description: Successfully fetched CustomPlugin content: application/json: schema: $ref: '#/components/schemas/CustomPlugin' '401': $ref: '#/components/responses/HTTP401Error' '404': description: Resource does not exist tags: - Custom Plugins put: operationId: upsert-custom-plugin summary: Upsert a CustomPlugin description: '**Pre-release Endpoint** This endpoint is currently in beta and is subject to change. Create or Update CustomPlugin using ID or name.' requestBody: description: Description of the CustomPlugin required: true content: application/json: schema: $ref: '#/components/schemas/CustomPlugin' responses: '200': description: Successfully upserted CustomPlugin content: application/json: schema: $ref: '#/components/schemas/CustomPlugin' '401': $ref: '#/components/responses/HTTP401Error' tags: - Custom Plugins components: schemas: GatewayUnauthorizedError: type: object properties: message: type: string status: type: integer required: - message - status CustomPlugin: type: object properties: created_at: description: Unix epoch when the resource was created. type: integer nullable: true handler: description: The handler for the given custom plugin. type: string id: description: A string representing a UUID (universally unique identifier). type: string nullable: true name: description: The name to associate with the given custom plugin. type: string schema: description: The schema for the given custom plugin. type: string 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: handler: return { VERSION = '1.0,0', PRIORITY = 500, access = function(self, config) kong.service.request.set_header(config.name, config.value) end } id: 868346aa-1105-4b77-8346-aa1105fb77c4 name: set-header schema: return { name = 'set-header', fields = { { protocols = require('kong.db.schema.typedefs').protocols_http }, { config = { type = 'record', fields = { { name = { description = 'The name of the header to set.', type = 'string', required = true } }, { value = { description = 'The value for the header.', type = 'string', required = true } } } } } } } additionalProperties: false required: - handler - name - schema 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 PaginationNextResponse: description: URI to the next page (may be null) type: string responses: HTTP401Error: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/GatewayUnauthorizedError' parameters: CustomPluginId: description: ID of the CustomPlugin to lookup example: '' in: path name: CustomPluginId 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 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 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 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 securitySchemes: personalAccessToken: type: http scheme: bearer bearerFormat: Token description: The personal access token is meant to be used as an alternative to basic-auth when accessing Konnect via APIs. You can generate a Personal Access Token (PAT) from the personal access token page in the Konnect dashboard. systemAccountAccessToken: type: http scheme: bearer bearerFormat: Token description: 'The system account access token is meant for automations and integrations that are not directly associated with a human identity. You can generate a system account Access Token by creating a system account and then obtaining a system account access token for that account. The access token must be passed in the header of a request, for example: `curl -X GET ''https://global.api.konghq.com/v2/users/'' --header ''Authorization: Bearer spat_i2Ej...''` ' konnectAccessToken: type: http scheme: bearer bearerFormat: JWT description: The Konnect access token is meant to be used by the Konnect dashboard and the decK CLI to authenticate with. serviceAccessToken: type: http scheme: bearer bearerFormat: JWT description: 'The Service access token is meant to be used between internal services. ' externalDocs: description: Documentation for Kong Gateway and its APIs url: https://developer.konghq.com