Consumers

The consumer object represents a consumer - or a user - of a service.
You can either rely on Kong Gateway as the primary datastore, or you can map the consumer list with your database to keep consistency between Kong Gateway and your existing primary datastore.

List all Consumers in a workspace

List all Consumers in a workspace

get

Query Parameters

sizeinteger

Number of resources to be returned.

Default:100

>= 1<= 1000

offsetstring

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

tagsstring

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

Path Parameters

workspacestring(string)required

The name of the workspace

Example:team-payments

controlPlaneIdstring(uuid)required

The UUID of your control plane. This variable is available in the Konnect manager.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

Response

application/json

A successful response listing Consumers

dataarray[object]

The Consumer object represents a consumer - or a user - of a Service. You can either rely on Kong as the primary datastore, or you can map the consumer list with your database to keep consistency between Kong and your existing primary datastore.

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

* Additional properties are NOT allowed.
Show Child Parameters
nextstring

URI to the next page (may be null)

offsetstring

Offset is used to paginate through the API. Provide this value to the next list operation to fetch the next page

get/control-planes/{controlPlaneId}/core-entities/{workspace}/consumers
 
application/json

Create a new Consumer in a workspace

Create a new Consumer in a workspace

post

Path Parameters

workspacestring(string)required

The name of the workspace

Example:team-payments

controlPlaneIdstring(uuid)required

The UUID of your control plane. This variable is available in the Konnect manager.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

Body

application/json

Description of the new Consumer for creation

Consumer

The Consumer object represents a consumer - or a user - of a Service. You can either rely on Kong as the primary datastore, or you can map the consumer list with your database to keep consistency between Kong and your existing primary datastore.

* Additional properties are NOT allowed.
created_atinteger

Unix epoch when the resource was created.

custom_idstring

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.

descriptionstring

User-defined entity description. Konnect only field, not synced to the Gateway.

idstring

A string representing a UUID (universally unique identifier).

managed_byobject

Arbitrary JSON data for client responsible for managing the entity. Konnect only field, not synced to the Gateway.

* Additional properties are allowed.
tagsarray[string]

A string representing a tag.

updated_atinteger

Unix epoch when the resource was last updated.

usernamestring

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

Response

application/json

Successfully created Consumer

Consumer

The Consumer object represents a consumer - or a user - of a Service. You can either rely on Kong as the primary datastore, or you can map the consumer list with your database to keep consistency between Kong and your existing primary datastore.

* Additional properties are NOT allowed.
created_atinteger

Unix epoch when the resource was created.

custom_idstring

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.

descriptionstring

User-defined entity description. Konnect only field, not synced to the Gateway.

idstring

A string representing a UUID (universally unique identifier).

managed_byobject

Arbitrary JSON data for client responsible for managing the entity. Konnect only field, not synced to the Gateway.

* Additional properties are allowed.
tagsarray[string]

A string representing a tag.

updated_atinteger

Unix epoch when the resource was last updated.

usernamestring

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

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

Body

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

Delete a Consumer in a workspace

Delete a Consumer in a workspace

delete

Path Parameters

ConsumerIdstringrequired

ID of the Consumer to lookup

Example:c1059869-6fa7-4329-a5f5-5946d14ca2c5

workspacestring(string)required

The name of the workspace

Example:team-payments

controlPlaneIdstring(uuid)required

The UUID of your control plane. This variable is available in the Konnect manager.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

Response

Successfully deleted Consumer or the resource didn’t exist

delete/control-planes/{controlPlaneId}/core-entities/{workspace}/consumers/{ConsumerId}
 

Get a Consumer in a workspace

Get a Consumer using ID or username in a workspace.

get

Path Parameters

workspacestring(string)required

The name of the workspace

Example:team-payments

ConsumerIdstringrequired

ID of the Consumer to lookup

Example:c1059869-6fa7-4329-a5f5-5946d14ca2c5

controlPlaneIdstring(uuid)required

The UUID of your control plane. This variable is available in the Konnect manager.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

Response

application/json

Successfully fetched Consumer

Consumer

The Consumer object represents a consumer - or a user - of a Service. You can either rely on Kong as the primary datastore, or you can map the consumer list with your database to keep consistency between Kong and your existing primary datastore.

* Additional properties are NOT allowed.
created_atinteger

Unix epoch when the resource was created.

custom_idstring

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.

descriptionstring

User-defined entity description. Konnect only field, not synced to the Gateway.

idstring

A string representing a UUID (universally unique identifier).

managed_byobject

Arbitrary JSON data for client responsible for managing the entity. Konnect only field, not synced to the Gateway.

* Additional properties are allowed.
tagsarray[string]

A string representing a tag.

updated_atinteger

Unix epoch when the resource was last updated.

usernamestring

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

get/control-planes/{controlPlaneId}/core-entities/{workspace}/consumers/{ConsumerId}
 
application/json