API

Updates an API.

patch/v3/apis/{apiId}

Request

  • Base URL: https://global.api.konghq.com
  • URL: https://global.api.konghq.com/v3/apis/{apiId}
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Query parameters

force'true' | 'false'

If true, allows operations to be removed from the current version when using access control enforcement. If false, operations removal will be rejected with a 409 error. Omitting the value means true.

Request body

idstring uuid

The API identifier.

namestring nullable

The name of your API. The name + version combination must be unique for each API you publish.

descriptionstring nullable

A description of your API. Will be visible on your live Portal.

versionstring nullable

An optional version for your API. Leave this empty if your API is unversioned.

slugstring nullable

The slug is used in generated URLs to provide human readable paths.

Defaults to slugify(name + version)

api_spec_idsstring[]

The list of API specification ids for the API.

labelsLabelsUpdate nullable

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 "_".

implementation_modestring nullable

the implementations that are associated with this api either gateway_entity_binding or access_control_enforcement

attributesApiAttributes

A set of attributes that describe the API

created_atstring date-time

An ISO-8601 timestamp representation of entity creation date.

updated_atstring date-time

An ISO-8601 timestamp representation of entity update date.

Example request

{
  "id": "9f5061ce-78f6-4452-9108-ad7c02821fd5",
  "name": "MyAPI",
  "current_version_summary": {
    "id": "7710d5c4-d902-410b-992f-18b814155b53",
    "spec": {
      "type": "oas3"
    },
    "created_at": "2022-11-04T20:10:06.927Z",
    "updated_at": "2022-11-04T20:10:06.927Z"
  },
  "slug": "my-api-v1",
  "api_spec_ids": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "portals": [
    {
      "id": "25a2624c-49fc-4764-99e1-224ed819f200",
      "name": "My Portal",
      "display_name": "My Portal"
    }
  ],
  "labels": {
    "env": "test"
  },
  "attributes": {
    "env": [
      "production"
    ],
    "domains": [
      "web",
      "mobile"
    ]
  },
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z"
}

Response

API

idstring uuid required

The API identifier.

namestring required

The name of your API. The name + version combination must be unique for each API you publish.

descriptionstring nullable

A description of your API. Will be visible on your live Portal.

versionstring nullable required

An optional version for your API. Leave this empty if your API is unversioned.

slugstring nullable required

The slug is used in generated URLs to provide human readable paths.

Defaults to slugify(name + version)

api_spec_idsstring[] required

The list of API specification ids for the API.

labelsLabels required

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 "_".

implementation_modestring nullable

the implementations that are associated with this api either gateway_entity_binding or access_control_enforcement

attributesApiAttributes

A set of attributes that describe the API

created_atstring date-time required

An ISO-8601 timestamp representation of entity creation date.

updated_atstring date-time required

An ISO-8601 timestamp representation of entity update date.

Example response

{
  "id": "9f5061ce-78f6-4452-9108-ad7c02821fd5",
  "name": "MyAPI",
  "current_version_summary": {
    "id": "7710d5c4-d902-410b-992f-18b814155b53",
    "spec": {
      "type": "oas3"
    },
    "created_at": "2022-11-04T20:10:06.927Z",
    "updated_at": "2022-11-04T20:10:06.927Z"
  },
  "slug": "my-api-v1",
  "api_spec_ids": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "portals": [
    {
      "id": "25a2624c-49fc-4764-99e1-224ed819f200",
      "name": "My Portal",
      "display_name": "My Portal"
    }
  ],
  "labels": {
    "env": "test"
  },
  "attributes": {
    "env": [
      "production"
    ],
    "domains": [
      "web",
      "mobile"
    ]
  },
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z"
}

Changes

    • warning

      added the new 400.00 enum value to the response property for the response status

    • warning

      added the new 401.00 enum value to the response property for the response status

    • warning

      added the new 403.00 enum value to the response property for the response status

    • warning

      added the new 404.00 enum value to the response property for the response status

    • warning

      added the new 409.00 enum value to the response property for the response status

    • breaking

      the response's body type changed from no type to object for status

    • breaking

      the response's body type changed from no type to object for status

    • breaking

      the response's body type changed from no type to object for status

    • breaking

      the response's body type changed from no type to object for status

    • breaking

      the response's body type changed from no type to object for status

    • breaking

      the response's body type changed from no type to object for status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status