Approves an access request for the given user.
This feature was introduced in GitLab 8.11.
Path parameters
-
The ID or URL-encoded path of the project owned by the authenticated user
-
The user ID of the access requester
PUT
/projects/{id}/access_requests/{user_id}/approve
curl \
--request PUT 'https://www.gitlab.com/api/v4/projects/{id}/access_requests/{user_id}/approve' \
--header "Private-Token: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"access_level":30}'
Request examples
{
"access_level": 30
}
Response examples (200)
{
"id": 1,
"username": "admin",
"name": "Administrator",
"state": "active",
"avatar_url": "https://gravatar.com/avatar/1",
"avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
"custom_attributes": [
{
"key": "foo",
"value": "bar"
}
],
"web_url": "https://gitlab.example.com/root",
"email": "string",
"requested_at": "string"
}
Response examples (200)
{"id"=>1, "name"=>"Raymond Smith", "state"=>"active", "username"=>"raymond_smith", "created_at"=>"2012-10-22T14:13:35Z", "access_level"=>20}