Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-09-21 15:19:16 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-09-21 15:19:16 +0400
commit131553627d2e62cea2ea8a342250ca2d2495d8fc (patch)
tree0011e2fb22baf6d410837cdcafdc23cac872ccec /doc/api
parent10d3a30b255cd85b2cf7af39814fd7418eecd838 (diff)
parent25b745271a1db25fc709ae13737b04c1f94cdb95 (diff)
Merge pull request #1521 from NARKOZ/api
API for project team members
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/projects.md63
1 files changed, 43 insertions, 20 deletions
diff --git a/doc/api/projects.md b/doc/api/projects.md
index 53ee5d412ab..1e23df3ac89 100644
--- a/doc/api/projects.md
+++ b/doc/api/projects.md
@@ -112,66 +112,89 @@ Parameters:
Will return created project with status `201 Created` on success, or `404 Not
found` on fail.
-## Get project users
+## List project team members
-Get users and access roles for existing project
+Get a list of project team members.
```
-GET /projects/:id/users
+GET /projects/:id/members
```
Parameters:
+ `id` (required) - The ID or code name of a project
-Will return users and their access roles with status `200 OK` on success, or `404 Not found` on fail.
+## Get project team member
-## Add project users
+Get a project team member.
-Add users to exiting project
+```
+GET /projects/:id/members/:user_id
+```
+
+Parameters:
++ `id` (required) - The ID or code name of a project
++ `user_id` (required) - The ID of a user
+
+```json
+{
+
+ "id": 1,
+ "email": "john@example.com",
+ "name": "John Smith",
+ "blocked": false,
+ "created_at": "2012-05-23T08:00:58Z",
+ "access_level": 40
+}
```
-POST /projects/:id/users
+
+## Add project team member
+
+Add a user to a project team.
+
+```
+POST /projects/:id/members
```
Parameters:
+ `id` (required) - The ID or code name of a project
-+ `user_ids` (required) - The ID list of users to add
-+ `project_access` (required) - Project access level
++ `user_id` (required) - The ID of a user to add
++ `access_level` (required) - Project access level
Will return status `201 Created` on success, or `404 Not found` on fail.
-## Update project users access level
+## Edit project team member
-Update existing users to specified access level
+Update project team member to specified access level.
```
-PUT /projects/:id/users
+PUT /projects/:id/members/:user_id
```
Parameters:
+ `id` (required) - The ID or code name of a project
-+ `user_ids` (required) - The ID list of users to add
-+ `project_access` (required) - Project access level
++ `user_id` (required) - The ID of a team member
++ `access_level` (required) - Project access level
Will return status `200 OK` on success, or `404 Not found` on fail.
-## Delete project users
+## Remove project team member
-Delete users from exiting project
+Removes user from project team.
```
-DELETE /projects/:id/users
+DELETE /projects/:id/members/:user_id
```
Parameters:
+ `id` (required) - The ID or code name of a project
-+ `user_ids` (required) - The ID list of users to add
++ `user_id` (required) - The ID of a team member
-Will return status `200 OK` on success, or `404 Not found` on fail.
+Status code `200` will be returned on success.
## Get project hooks
@@ -344,7 +367,7 @@ Parameters:
+ `id` (required) - The ID or code name of a project
+ `sha` (required) - The commit or branch name
-+ `filepath` (required) - The path the file
++ `filepath` (required) - The path the file
Will return the raw file contents.