You can manage developers, app registrations, and teams from the Access and approvals tab in your Dev Portal.
To assign roles to developers, you need to create a team and add them to it:
- In Konnect, click Dev Portal in the sidebar.
- Click your Dev Portal.
- Click Access and approvals in the sidebar.
- Click the Teams tab.
- Click New Team.
- Enter a team name in the Team field.
- Enter a team description in the Description field.
- Click Save.
- Click the name of your new team.
- Click Add developer.
- Select a developer from the Select one or more developer dropdown menu.
- Click the APIs tab.
- Click Add role.
- Select an API from the API dropdown menu.
-
Select a role from the Add roles dropdown menu.
You can set a role for all APIs on the Dev Portal, or set different roles for specific APIs. The following roles are available:
-
API Consumer: This role allows developers on the team to make calls to the selected APIs.
-
API Viewer: This role gives developers on the team read-only access to the selected APIs’ documentation.
-
Assign a developer to a team by sending a POST
request to the /portals/{portalId}/teams/{teamId}/developers
endpoint:
curl -X POST "https://us.api.konghq.com/v3/portals/$PORTAL_ID/teams/$TEAM_ID/developers" \
-H "Authorization: Bearer $KONNECT_TOKEN" \
--json '{
"id": "'$DEVELOPER_ID'"
}'
-
Add a role to the team by sending a POST
request to the /portals/{portalId}/teams/{teamId}/assigned-roles
endpoint:
curl -X POST "https://us.api.konghq.com/v3/portals/$PORTAL_ID/teams/$TEAM_ID/assigned-roles" \
-H "Authorization: Bearer $KONNECT_TOKEN" \
--json '{
"role_name": "API Viewer",
"entity_id": "'$API_ID'",
"entity_type_name": "'$API_NAME'",
"entity_region": "us"
}'
The following roles are available:
-
API Consumer: This role allows developers on the team to make calls to the selected APIs.
-
API Viewer: This role gives developers on the team read-only access to the selected APIs’ documentation.