Konnect API Products (2.0.0)

Download OpenAPI specification:Download

The API for Kong Konnect API Products.

API Products

Create API Product

An API Product packages together associated APIs and their operations, backed by thorough documentation, with the objective of making API consumption straightforward for developers.

Authorizations:
personalAccessTokensystemAccountAccessToken
Request Body schema: application/json
name
required
string [ 1 .. 100 ] characters

The name of the API product.

description
string or null
Default: null

The description of the API product.

object (Labels) <= 50 properties

Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

object (PublicLabels) <= 50 properties

Public labels store information about an entity that can be used for filtering a list of objects.

Public labels are intended to store PUBLIC metadata.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

portal_ids
Array of strings <uuid> >= 0 items unique

The list of portal identifiers which this API product should be published to

Responses

Request samples

Content type
application/json
Example
{
  • "name": "API Product"
}

Response samples

Content type
application/json
{
  • "id": "e7a4f6c0-5777-4a37-bcb9-2d37d3b362ee",
  • "name": "API Product",
  • "description": "Text describing the API product",
  • "portal_ids": [ ],
  • "portals": [ ],
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z",
  • "version_count": 10,
  • "labels": {
    },
  • "public_labels": {
    }
}

List API Products

Returns a collection of API products.

Authorizations:
personalAccessTokensystemAccountAccessToken
query Parameters
page[size]
integer
Example: page[size]=10

The maximum number of items to include per page. The last page of a collection may include fewer items.

page[number]
integer
Example: page[number]=1

Determines which page of the entities to retrieve.

object (APIProductFilterParameters)

Filters API Products in the response.

sort
string (SortQuery)
Example: sort=name desc

Sorts a collection of API products. Supported sort attributes are:

  • name
labels
string
Example: labels=key:value,keyExists

Filters requested resource by associated labels.

public_labels
string
Example: public_labels=key:value,keyExists

Filters requested resource by associated public labels.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Fetch API product

Returns an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
id
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

API product identifier

Responses

Response samples

Content type
application/json
{
  • "id": "e7a4f6c0-5777-4a37-bcb9-2d37d3b362ee",
  • "name": "API Product",
  • "description": "Text describing the API product",
  • "portal_ids": [ ],
  • "portals": [ ],
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z",
  • "version_count": 10,
  • "labels": {
    },
  • "public_labels": {
    }
}

Update an individual API product

Updates an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
id
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

API product identifier

Request Body schema: application/json
name
string [ 1 .. 100 ] characters

The name for the API product.

description
string or null

The description of the API product.

object or null (LabelsUpdate) <= 50 properties

Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Labels are intended to store INTERNAL metadata.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

object (PublicLabelsUpdate) <= 50 properties

Public labels store information about an entity that can be used for filtering a list of objects.

Public labels are intended to store PUBLIC metadata.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

portal_ids
Array of strings <uuid> >= 0 items unique

The list of portal identifiers which this API product should be published to

Responses

Request samples

Content type
application/json
Example
{
  • "name": "API Product with Update Name",
  • "description": "Updated text describing the API product"
}

Response samples

Content type
application/json
{
  • "id": "e7a4f6c0-5777-4a37-bcb9-2d37d3b362ee",
  • "name": "API Product",
  • "description": "Text describing the API product",
  • "portal_ids": [ ],
  • "portals": [ ],
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z",
  • "version_count": 10,
  • "labels": {
    },
  • "public_labels": {
    }
}

Delete API Product

Removes an individual API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
id
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

API product identifier

Responses

Response samples

Content type
application/problem+json
{
  • "status": 401,
  • "title": "Unauthorized",
  • "instance": "kong:trace:8347343766220159418",
  • "detail": "Unauthorized"
}

API Product Documentation

Create API Product Document

Creates a document for an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

Request Body schema: application/json
parent_document_id
string or null <uuid>
Default: null

parent document id

slug
required
string <= 80 characters ^[\w-]+$

document slug. must be unique accross documents belonging to an api product

status
required
string (PublishStatus)
Enum: "published" "unpublished"
title
required
string non-empty

document title

content
string

Can be markdown string content or base64 encoded string

metadata
object
Default: {}

metadata of the document

Responses

Request samples

Content type
application/json
Example
{
  • "slug": "api-product-document",
  • "status": "published",
  • "title": "API Product Document",
  • "content": "IyBBUEkgUHJvZHVjdCBEb2N1bWVudCBIZWFkZXIKQVBJIHByb2R1Y3QgZG9jdW1lbnQgY29udGVudA=="
}

Response samples

Content type
application/json
{
  • "id": "de5c9818-be5c-42e6-b514-e3d4bc30ddeb",
  • "parent_document_id": null,
  • "title": "API Product Document",
  • "slug": "api-product-document",
  • "status": "published",
  • "content": "# API Product Document Header",
  • "ast": [
    ],
  • "metadata": { },
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z"
}

List API Product Documents

Returns a collection of all documents for an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

query Parameters
page[size]
integer
Example: page[size]=10

The maximum number of items to include per page. The last page of a collection may include fewer items.

page[number]
integer
Example: page[number]=1

Determines which page of the entities to retrieve.

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "meta": {
    }
}

Fetch API Product Document

Returns a document for the API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

id
required
string <uuid>
Example: de5c9818-be5c-42e6-b514-e3d4bc30ddeb

The document identifier related to the API product

Responses

Response samples

Content type
application/json
{
  • "id": "de5c9818-be5c-42e6-b514-e3d4bc30ddeb",
  • "parent_document_id": null,
  • "title": "API Product Document",
  • "slug": "api-product-document",
  • "status": "published",
  • "content": "# API Product Document Header",
  • "ast": [
    ],
  • "metadata": { },
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z"
}

Update an API Product Document

Updates a document for an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

id
required
string <uuid>
Example: de5c9818-be5c-42e6-b514-e3d4bc30ddeb

The document identifier related to the API product

Request Body schema: application/json
parent_document_id
string or null <uuid>

Parent document Id. If this value is explicitly set to null, the document will be put as a top level document at the bottom of the tree.

slug
string <= 80 characters ^[\w-]+$

document slug. must be unique accross documents belonging to an api product

status
string (PublishStatus)
Enum: "published" "unpublished"
title
string non-empty

document title

content
string

Can be markdown string content or base64 encoded string

metadata
object

Responses

Request samples

Content type
application/json
Example
{
  • "parent_document_id": "dd4e1b98-3629-4dd3-acc0-759a726ffee2",
  • "slug": "api-product-document",
  • "status": "published",
  • "title": "API Product Document",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": "de5c9818-be5c-42e6-b514-e3d4bc30ddeb",
  • "parent_document_id": null,
  • "title": "API Product Document",
  • "slug": "api-product-document",
  • "status": "published",
  • "content": "# API Product Document Header",
  • "ast": [
    ],
  • "metadata": { },
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z"
}

Delete API Product Documentation

Removes a document from an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

id
required
string <uuid>
Example: de5c9818-be5c-42e6-b514-e3d4bc30ddeb

The document identifier related to the API product

Responses

Response samples

Content type
application/problem+json
{
  • "status": 401,
  • "title": "Unauthorized",
  • "instance": "kong:trace:8347343766220159418",
  • "detail": "Unauthorized"
}

API Product Versions

Create API Product Version

Creates a version of an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API Product ID

Request Body schema: application/json
name
required
string non-empty

The version name of the API product version.

publish_status
string
Deprecated
Default: "unpublished"
Enum: "unpublished" "published"

The publish status of the API product version. Applies publish status to all related portal product versions. This field is deprecated: Use PortalProductVersion.publish_status instead.

deprecated
boolean
Deprecated
Default: false

Indicates if the version of the API product is deprecated. Applies deprecation or removes deprecation from all related portal product versions. This field is deprecated: Use PortalProductVersion.deprecated instead.

object (Labels) <= 50 properties

Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

(GatewayServicePayload (object or null)) or (LegacyGatewayServicePayload (object or null))

Responses

Request samples

Content type
application/json
Example
{
  • "name": "v1"
}

Response samples

Content type
application/json
{
  • "id": "9f5061ce-78f6-4452-9108-ad7c02821fd5",
  • "name": "v1",
  • "gateway_service": {
    },
  • "publish_status": "unpublished",
  • "deprecated": false,
  • "labels": {
    },
  • "portals": [
    ],
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z"
}

List API Product Versions

Returns a collection of all versions for an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API Product ID

query Parameters
page[size]
integer
Example: page[size]=10

The maximum number of items to include per page. The last page of a collection may include fewer items.

page[number]
integer
Example: page[number]=1

Determines which page of the entities to retrieve.

object (APIProductVersionFilterParameters)

Filters API Product Versions in the response.

sort
string (SortQuery)
Example: sort=name desc

Sorts a collection of API products versions. Supported sort attributes are:

  • name

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Fetch API Product Version

Returns a version of an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

id
required
string <uuid>
Example: 9f5061ce-78f6-4452-9108-ad7c02821fd5

The API product version identifier

Responses

Response samples

Content type
application/json
{
  • "id": "9f5061ce-78f6-4452-9108-ad7c02821fd5",
  • "name": "v1",
  • "gateway_service": {
    },
  • "publish_status": "unpublished",
  • "deprecated": false,
  • "labels": {
    },
  • "portals": [
    ],
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z"
}

Update an API Product Version

Updates an API product version.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

id
required
string <uuid>
Example: 9f5061ce-78f6-4452-9108-ad7c02821fd5

The API product version identifier

Request Body schema: application/json
name
string non-empty

The version name of the API product version.

publish_status
string
Deprecated
Enum: "unpublished" "published"

The publish status of the API product version. Applies publish status to all related portal product versions. This field is deprecated: Use PortalProductVersion.publish_status instead.

deprecated
boolean
Deprecated

Indicates if the version of the API product is deprecated. Applies deprecation or removes deprecation from all related portal product versions. This field is deprecated: Use PortalProductVersion.deprecated instead.

notify
boolean

When set to true, and all the following conditions are true:

  • version of the API product deprecation has changed from false -> true
  • version of the API product is published

then consumers of the now deprecated verion of the API product will be notified.

(GatewayServicePayload (object or null)) or (LegacyGatewayServicePayload (object or null))
object or null (LabelsUpdate) <= 50 properties

Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Labels are intended to store INTERNAL metadata.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

Responses

Request samples

Content type
application/json
Example
{
  • "gateway_service": {
    }
}

Response samples

Content type
application/json
{
  • "id": "9f5061ce-78f6-4452-9108-ad7c02821fd5",
  • "name": "v1",
  • "gateway_service": {
    },
  • "publish_status": "unpublished",
  • "deprecated": false,
  • "labels": {
    },
  • "portals": [
    ],
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z"
}

Delete API Product Version

Removes an API product version.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

id
required
string <uuid>
Example: 9f5061ce-78f6-4452-9108-ad7c02821fd5

The API product version identifier

Responses

Response samples

Content type
application/problem+json
{
  • "status": 401,
  • "title": "Unauthorized",
  • "instance": "kong:trace:8347343766220159418",
  • "detail": "Unauthorized"
}

API Product Version Specification

Create API Product Version Specification

Creates a specification for a version of an API product. Note: You can only have one specification for a product version.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

apiProductVersionId
required
string <uuid>
Example: 9f5061ce-78f6-4452-9108-ad7c02821fd5

The API product version identifier

Request Body schema: application/json
name
required
string [ 1 .. 255 ] characters ^.+(?:\.yaml|\.yml|\.json)$

The name of the API product version specification

content
required
string <byte> non-empty

The base64 encoded contents of the API product version specification

Responses

Request samples

Content type
application/json
{
  • "name": "oas.yaml",
  • "content": "TXkgWUFNTCBvciBKU09OIGZvcm1hdHRlZCBPQVMgY29udGVudA=="
}

Response samples

Content type
application/json
{
  • "id": "7710d5c4-d902-410b-992f-18b814155b53",
  • "name": "oas.yaml",
  • "content": "My YAML or JSON formatted OAS content",
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z"
}

Fetch API Product Version Specifications

Returns a list of specification for the version of an API product. Note: You can only have one specification for a product version.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

apiProductVersionId
required
string <uuid>
Example: 9f5061ce-78f6-4452-9108-ad7c02821fd5

The API product version identifier

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Fetch API Product Version Specification

Returns a specification for the version of an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

apiProductVersionId
required
string <uuid>
Example: 9f5061ce-78f6-4452-9108-ad7c02821fd5

The API product version identifier

specificationId
required
string <uuid>
Example: 742ff9f1-fb89-4aeb-a599-f0e278c7aeaa

The API product version specification identifier

Responses

Response samples

Content type
application/json
{
  • "id": "7710d5c4-d902-410b-992f-18b814155b53",
  • "name": "oas.yaml",
  • "content": "My YAML or JSON formatted OAS content",
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z"
}

Update an API Product Version Specification

Updates a specification from an API product version.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

apiProductVersionId
required
string <uuid>
Example: 9f5061ce-78f6-4452-9108-ad7c02821fd5

The API product version identifier

specificationId
required
string <uuid>
Example: 742ff9f1-fb89-4aeb-a599-f0e278c7aeaa

The API product version specification identifier

Request Body schema: application/json
name
string [ 1 .. 255 ] characters ^.+(?:\.yaml|\.yml|\.json)$

The name of the API product version specification

content
string <byte> non-empty

The base64 encoded contents of the API product version specification

Responses

Request samples

Content type
application/json
Example
{
  • "content": "TXkgWUFNTCBvciBKU09OIGZvcm1hdHRlZCBPQVMgY29udGVudA=="
}

Response samples

Content type
application/json
{
  • "id": "7710d5c4-d902-410b-992f-18b814155b53",
  • "name": "oas.yaml",
  • "content": "My YAML or JSON formatted OAS content",
  • "created_at": "2023-01-01T00:00:00.000Z",
  • "updated_at": "2023-01-01T00:00:00.000Z"
}

Delete API Product Version Specification

Removes a specification from a verion of an API product.

Authorizations:
personalAccessTokensystemAccountAccessToken
path Parameters
apiProductId
required
string <uuid>
Example: d32d905a-ed33-46a3-a093-d8f536af9a8a

The API product identifier

apiProductVersionId
required
string <uuid>
Example: 9f5061ce-78f6-4452-9108-ad7c02821fd5

The API product version identifier

specificationId
required
string <uuid>
Example: 742ff9f1-fb89-4aeb-a599-f0e278c7aeaa

The API product version specification identifier

Responses

Response samples

Content type
application/problem+json
{
  • "status": 401,
  • "title": "Unauthorized",
  • "instance": "kong:trace:8347343766220159418",
  • "detail": "Unauthorized"
}