Konnect APIs
What are the Konnect APIs?
The Konnect APIs allow you to manage your ecosystem, including Kong Gateway configuration management, Analytics, Dev Portal, and more.
Konnect API authentication
The recommended method of authentication for Konnect is the Personal Access Token (PAT), which can be obtained from the personal access token page in Konnect. You can also use the Identity API to generate system account access tokens.
The access token must be passed in the Authorization
header of all requests, for example:
curl -X GET 'https://global.api.konghq.com/v2/users/' --header 'Authorization: Bearer kpat_xgfT'
Before you generate a PAT, keep the following in mind:
- A PAT is granted all of the permissions that the user has access to via their most up-to-date role assignment.
- The PAT has a maximum duration of 12 months.
- There is a limit of 10 personal access tokens per user.
- Unused tokens are deleted and revoked after 12 months of inactivity.
Konnect API filtering
The Konnect APIs support the ability to filter over selected collections and only return results that you are interested in.
Not every filter operation described here is available in every Konnect API. Specific APIs may support a subset of these options. For the most accurate information on available filters for each API endpoint, always refer to the individual API specification.
Available fields
-
Users:
id
,email
,full_name
,active
-
Teams:
id
,name
,system_team
-
Assigned Roles:
role
,entity_type
,entity_region
,entity_id
Numeric and timestamp fields
When matching against both numeric and timestamp fields, you can filter in the following formats:
-
Equal:
?filter[field][eq]=value
or?filter[field]=value
-
Contains:
?filter[field][contains]=value
-
Less Than:
?filter[field][lt]=value
-
Less Than or Equal:
?filter[field][lte]=value
-
Greater Than:
?filter[field][gt]=value
-
Greater Than or Equal:
?filter[field][gte]=value
If the qualifier is omitted, ?filter[field]=value
for example, the filtering behavior will perform an exact style equal match.
Filtering examples
The examples in the table below filter the following response:
{
"data": [
{
"id": "500d74f4-37e1-4f59-b51a-8cf7c7903692",
"email": "CharlieCruz@konghq.com",
"name": "Charlie",
"full_name": "Charlie Cruz",
"active": true,
"created_at": "2022-05-10T15:10:25Z"
},
{
"id": "500d74f4-37e1-4b13-b51a-8cf7c7903692",
"email": "AlexCruz@konghq.com",
"name": "Alex",
"full_name": "Alex Cruz",
"active": true,
"created_at": "2022-05-10T15:10:25Z",
"updated_at": "2022-10-19T15:33:02Z"
},
{
"id": "500d74f4-37e1-4d13-b51a-8cf7c7903692",
"email": "AlexGarcia@konghq.com",
"name": "Alex",
"full_name": "Alex Garcia",
"active": true,
"created_at": "2022-05-10T15:10:25Z",
"updated_at": "2022-10-19T15:33:02Z"
}
]
}
Filter |
Result |
---|---|
Filter on a single parameter:
|
|
Filter on multiple parameters:
|
|
Filter on the existence of a key:
|
|