Skip to content

Create /[groups/projects]/:id/access_tokens/self API endpoints

What does this MR do and why?

Create /[groups/projects]/:id/access_tokens/self API endpoints

Created /groups/:id/access_tokens/self and /projects/:id/access_tokens/self API endpoints to get the information of the group/project access token that has been used in the HTTP request.

This is similar to /personal_access_tokens/self but return additional information, like the group/project ID, the resource_type and access_level.

Changelog: added

References

Related to https://gitlab.com/gitlab-com/request-for-help/-/issues/3087+

Screenshots or screen recordings

No changes

How to set up and validate locally

  1. Create a group access token: https://gdk.test:3443/groups/flightjs/-/settings/access_tokens
  2. Test the new endpoint: curl --request GET --header "PRIVATE-TOKEN: glpat-..." "https://gdk.test:3443/api/v4/groups/33/access_tokens/self"
  3. Same for project access tokens.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eduardo Sanz García

Merge request reports

Loading