Implement GET API for GATs and PATs

New API endpoints:

1. Get Project Access Token by ID

GET projects/:id/access_tokens/:token_id
Attribute Type required Description
id integer or string yes ID or URL-encoded path of the project
token_id integer or string yes ID of the project access token
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/<project_id>/access_tokens/<token_id>"
{
   "user_id" : 141,
   "scopes" : [
      "api"
   ],
   "name" : "token",
   "expires_at" : "2021-01-31",
   "id" : 42,
   "active" : true,
   "created_at" : "2021-01-20T22:11:48.151Z",
   "revoked" : false,
   "access_level": 40,
   "last_used_at": "2022-03-15T11:05:42.437Z"
}

2. Get Group Access Token by ID

Get a group access token by ID.

GET groups/:id/access_tokens/:token_id
Attribute Type required Description
id integer or string yes ID or URL-encoded path of the group
token_id integer or string yes ID of the group access token
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/<group_id>/access_tokens/<token_id>"
{
   "user_id" : 141,
   "scopes" : [
      "api"
   ],
   "name" : "token",
   "expires_at" : "2021-01-31",
   "id" : 42,
   "active" : true,
   "created_at" : "2021-01-20T22:11:48.151Z",
   "revoked" : false,
   "access_level": 40
}
Edited by Hannah Sutor