Consumers

Create a new Consumer

Create a new Consumer

post/v2/control-planes/{controlPlaneId}/core-entities/consumers

Request body

created_atinteger nullable

Unix epoch when the resource was created.

custom_idstring nullable

Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.

idstring nullable

A string representing a UUID (universally unique identifier).

tagsstring[] nullable

An optional set of strings associated with the Consumer for grouping and filtering.

updated_atinteger nullable

Unix epoch when the resource was last updated.

usernamestring nullable

The unique username of the Consumer. You must send either this field or custom_id with the request.

Example request

{
  "custom_id": "4200",
  "id": "8a388226-80e8-4027-a486-25e4f7db5d21",
  "tags": [
    "silver-tier"
  ],
  "username": "bob-the-builder"
}

Response

Successfully created Consumer

created_atinteger nullable

Unix epoch when the resource was created.

custom_idstring nullable

Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.

idstring nullable

A string representing a UUID (universally unique identifier).

tagsstring[] nullable

An optional set of strings associated with the Consumer for grouping and filtering.

updated_atinteger nullable

Unix epoch when the resource was last updated.

usernamestring nullable

The unique username of the Consumer. You must send either this field or custom_id with the request.

Example response

{
  "custom_id": "4200",
  "id": "8a388226-80e8-4027-a486-25e4f7db5d21",
  "tags": [
    "silver-tier"
  ],
  "username": "bob-the-builder"
}

Changes

Changed in 4 of the 52 revisions of this API.813

  • 2c77aeaee5fb11See the full diff
    • the response property became nullable for the status

      response-property-became-nullable

    • the request property became nullable

      request-property-became-nullable

  • fc6abbc537f326See the full diff
    • the response property became nullable for the status

      response-property-became-nullable

    • the response property became nullable for the status

      response-property-became-nullable

    • the request optional property became not read-only

      request-optional-property-became-not-read-only

    • the request optional property became not read-only

      request-optional-property-became-not-read-only

    • the request property became nullable

      request-property-became-nullable

    • the request property became nullable

      request-property-became-nullable

    • the response optional property became not read-only for the status

      response-optional-property-became-not-read-only

    • the response optional property became not read-only for the status

      response-optional-property-became-not-read-only

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the request property became not nullable

      request-property-became-not-nullable

  • 08ead66e9ebb46See the full diff
    • the response property became nullable for the status

      response-property-became-nullable

    • the response property became nullable for the status

      response-property-became-nullable

    • the response property became nullable for the status

      response-property-became-nullable

    • the response property became nullable for the status

      response-property-became-nullable

    • the request optional property became not read-only

      request-optional-property-became-not-read-only

    • the request property became nullable

      request-property-became-nullable

    • the request property became nullable

      request-property-became-nullable

    • the request property became nullable

      request-property-became-nullable

    • the request property became nullable

      request-property-became-nullable

    • the response optional property became not read-only for the status

      response-optional-property-became-not-read-only

    This revision also has 88 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog