Admin Token API: Identify Feature Flags client token
requested to merge gitlab-community/gitlab-org/gitlab:512283-nwittstruck-admin-token-api-post-feature-flag-client-tokens into master
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
This MR adds identification of feature flags client token to the Admin Token API.
References
- Issue: #512283 (closed)
- Epic: &15777
- Docs: https://docs.gitlab.com/ee/api/admin/token.html
MR acceptance checklist
checklist
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
How to set up and validate locally
-
You'll need to create a
personal access token
to access the token and get anfeature flag client token
that you'd like to query:-
Create a
personal access token
withadmin_mode
andapi
capabilities.Preferences > Access Tokens > Add a new token
- You'll need feature flag client token of a project. Access it from any project from
Deploy > Feature flags > Configure
. The Instance ID listed is the token. It should start withglffct
.
-
Create a
-
Now you can retrieve information about this token:
curl -k --request POST \
--url 'https://gdk.test:3443/api/v4/admin/token' \
--header 'Authorization: Bearer <Admin Token from Step 2.1>' \
--header 'Content-Type: application/json' \
--data '{"token": "glffct-token-from-step-2.2"}'
{
"id": 68,
"project_id": 22
}
Related to #512283 (closed)
Edited by 🤖 GitLab Bot 🤖