diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-12-06 00:53:19 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-12-06 00:53:19 +0000 |
commit | f0f514ac25763a5e02aac7abb8a7528a0437577f (patch) | |
tree | 504db37b60aae7bc87832d987c1221dca55f01b9 /doc | |
parent | 5bf04bf3cbb26a42ae87499a1ec8ce190208a1d6 (diff) | |
parent | d74801ac6fca7b20e01555ac6339d08b16bba8fc (diff) | |
download | gitlab-ce-f0f514ac25763a5e02aac7abb8a7528a0437577f.tar.gz |
Merge branch 'document-public-project-api' into 'master'
Document the public Project API and document `GET /projects/:id/users`
Documentation was not updated in !7843. Also the `GET /projects/:id/users` endpoint was not documented at all!
See merge request !7897
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/projects.md | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/doc/api/projects.md b/doc/api/projects.md index 132be644b59..0bc2a5210aa 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -347,7 +347,8 @@ Parameters: ### Get single project Get a specific project, identified by project ID or NAMESPACE/PROJECT_NAME, which is owned by the authenticated user. -If using namespaced projects call make sure that the NAMESPACE/PROJECT_NAME is URL-encoded, eg. `/api/v3/projects/diaspora%2Fdiaspora` (where `/` is represented by `%2F`). +If using namespaced projects call make sure that the NAMESPACE/PROJECT_NAME is URL-encoded, eg. `/api/v3/projects/diaspora%2Fdiaspora` (where `/` is represented by `%2F`). This endpoint can be accessed without authentication if +the project is publicly accessible. ``` GET /projects/:id @@ -436,10 +437,47 @@ Parameters: } ``` +## Get project users + +Get the users list of a project. + + +Parameters: + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `search` | string | no | Search for specific users | + +``` +GET /projects/:id/users +``` + +```json +[ + { + "id": 1, + "username": "john_smith", + "name": "John Smith", + "state": "active", + "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg", + "web_url": "http://localhost:3000/john_smith" + }, + { + "id": 2, + "username": "jack_smith", + "name": "Jack Smith", + "state": "blocked", + "avatar_url": "http://gravatar.com/../e32131cd8.jpeg", + "web_url": "http://localhost:3000/jack_smith" + } +] +``` + ### Get project events -Get the events for the specified project. -Sorted from newest to oldest +Get the events for the specified project sorted from newest to oldest. This +endpoint can be accessed without authentication if the project is publicly +accessible. ``` GET /projects/:id/events @@ -1344,7 +1382,9 @@ Parameter: ## Search for projects by name -Search for projects by name which are accessible to the authenticated user. +Search for projects by name which are accessible to the authenticated user. This +endpoint can be accessed without authentication if the project is publicly +accessible. ``` GET /projects/search/:query |