Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 84 lines (66 sloc) 3.396 kB
de06c1c @dhh Added Access API
dhh authored
1 Accesses
2 ========
3
4 Get accesses
5 ------------
6
7 * `GET /projects/1/accesses.json` will return all the people with access to the project.
bc20d04 @dhh More docs
dhh authored
8 * `GET /calendars/1/accesses.json` will return all the people with access to the calendar.
de06c1c @dhh Added Access API
dhh authored
9
d47a6af @jeremy Document that /projects/1/accesses.json is paginated. Add a general n…
jeremy authored
10 We will return 50 people per page. If the response has 50 people, check the next page
11 for more people. Do this by adding `&page=2` to the query, then `&page=3` and so on.
12
de06c1c @dhh Added Access API
dhh authored
13 ```json
14 [
15 {
16 "id": 149087659,
91391ca @eileencodes Update accesses json
eileencodes authored
17 "identity_id": 982871737,
de06c1c @dhh Added Access API
dhh authored
18 "name": "Jason Fried",
a7dbac3 @qrush Become Basecamp
qrush authored
19 "email_address": "jason@basecamp.com",
91391ca @eileencodes Update accesses json
eileencodes authored
20 "admin": true,
21 "is_client": false,
22 "trashed": false,
23 "avatar_url": "https://asset0.37img.com/global/4113d0a133a32931be8934e70b2ea21efeff72c1/avatar.96.gif",
24 "fullsize_avatar_url": "https://asset0.37img.com/global/4113d0a133a32931be8934e70b2ea21efeff72c1/original.gif?r=3",
25 "created_at": "2012-03-22T16:56:48-05:00",
de06c1c @dhh Added Access API
dhh authored
26 "updated_at": "2012-03-22T16:56:48-05:00",
ca25498 @eileencodes Add `app_url` to json responses in documentation
eileencodes authored
27 "url": "https://basecamp.com/999999999/api/v1/people/149087659-jason-fried.json",
28 "app_url": "https://basecamp.com/999999999/people/149087659-jason-fried"
de06c1c @dhh Added Access API
dhh authored
29 },
30 {
31 "id": 1071630348,
91391ca @eileencodes Update accesses json
eileencodes authored
32 "identity_id": 827377171,
de06c1c @dhh Added Access API
dhh authored
33 "name": "Jeremy Kemper",
a7dbac3 @qrush Become Basecamp
qrush authored
34 "email_address": "jeremy@basecamp.com",
91391ca @eileencodes Update accesses json
eileencodes authored
35 "admin": true,
36 "is_client": false,
37 "trashed": false,
38 "avatar_url": "https://asset0.37img.com/global/e68cafa694e8f22203eb36f13dccfefa9ac0acb2/avatar.96.gif",
39 "fullsize_avatar_url": "https://asset0.37img.com/global/4113d0a133a32931be8934e70b2ea21efeff72c1/original.gif?r=3",
40 "created_at": "2012-03-22T16:56:48-05:00",
de06c1c @dhh Added Access API
dhh authored
41 "updated_at": "2012-03-22T16:56:48-05:00",
ca25498 @eileencodes Add `app_url` to json responses in documentation
eileencodes authored
42 "url": "https://basecamp.com/999999999/api/v1/people/1071630348-jeremy-kemper.json",
43 "app_url": "https://basecamp.com/999999999/people/1071630348-jeremy-kemper"
de06c1c @dhh Added Access API
dhh authored
44 }
45 ]
46 ```
47
48 Grant access
49 ------------
50
c519180 @eileencodes Add client accesses to documentation
eileencodes authored
51 Grant access to team members:
52
53 * `POST /projects/1/accesses.json` will grant team access to the project for the existing `ids` of people already on the account or new people via `email_addresses`. (Same goes for calendars with /calendars/ instead)
de06c1c @dhh Added Access API
dhh authored
54
55 ```json
56 {
57 "ids": [ 5, 6, 10 ],
58 "email_addresses": [ "someone@example.com", "someoneelse@example.com" ]
59 }
60 ```
61
c519180 @eileencodes Add client accesses to documentation
eileencodes authored
62 Grant access to clients:
63
64 * `POST /projects/1/client_accesses.json` will grant client access to the project for the existing `ids` of people already on the account or new people via `email_addresses`. Calendars only have team access so this endpoint is not applicable. Project calendars adhere to the accesses set in the project.
65
66 ```json
67 {
68 "ids": [ 1, 9, 11 ],
69 "email_addresses": [ "client@example.com", "anotherclient@example.com" ]
70 }
71 ```
72
a7dbac3 @qrush Become Basecamp
qrush authored
73 You can get the ids of existing people on the account from the [people API](https://github.com/basecamp/bcx-api/blob/master/sections/people.md).
de06c1c @dhh Added Access API
dhh authored
74
5c147b5 @qrush clarify Grant Accesses endpoint response codes
qrush authored
75 This will return `204 No Content` if the access was granted successfully. If the authenticated user does not have access to this project, `404 Not Found` will be returned.
de06c1c @dhh Added Access API
dhh authored
76
77
78 Revoke access
79 -------------
80
bc20d04 @dhh More docs
dhh authored
81 * `DELETE /projects/1/accesses/1.json` will revoke the access of the person who's id is mentioned in the URL. (Same goes for calendars with /calendars/ instead)
de06c1c @dhh Added Access API
dhh authored
82
5c147b5 @qrush clarify Grant Accesses endpoint response codes
qrush authored
83 This will return `204 No Content` if the revoke was a success. If the user does not have access to revoke access from the project, `403 Forbidden` will be returned. If the authenticated user does not have access to this project, `404 Not Found` will be returned.
Something went wrong with that request. Please try again.