You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
title:API enhancements for working with organization permissions are now official
4
+
created_at:2016-01-05
5
+
author_name:jakeboxer
6
+
---
7
+
8
+
To allow API developers to take advantage of the[improved organization permissions][dotcom-blog-post] that launched in September 2015, we're making the[API enhancements][api-enhancements-blog-post] for working with organization permissions a part of the official GitHub API.
9
+
10
+
During the preview period, you needed to[provide a custom media type in the`Accept` header][preview-period] to opt-in to the changes. Now that the preview period has ended, you no longer need to specify this custom[media type][custom-media-types].
11
+
12
+
If you have any questions or feedback, please[get in touch with us][contact]!
Copy file name to clipboardExpand all lines: content/v3/orgs/members.md
+2-14Lines changed: 2 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -20,23 +20,11 @@ be returned.
20
20
21
21
Name | Type | Description
22
22
--------|---------|--------------
23
-
`filter`|`string` | Filter members returned in the list. Can be one of:<br/>*`2fa_disabled`: Members without[two-factor authentication][2fa-blog] enabled. Available for organization owners.<br/>*`all`: Allorganizationmembers.<br/><br/>Default:`all`
24
-
`role` |`string` | Filter members returned by their role. Can be one of:<br/>*`all`: All members of the organization, regardless of role.<br/>*`admin`: Organization owners.<br/>*`member`: Non-owner organization members.**This option requires a custom media type to be specified. Please see more in the alert below.**<br/><br/>Default:`all`
23
+
`filter`|`string` | Filter members returned in the list. Can be one of:<br/>*`2fa_disabled`: Members without[two-factor authentication][2fa-blog] enabled. Available for organization owners.<br/>*`all`: All members the authenticated user can see.<br/><br/>Default:`all`
24
+
`role` |`string` | Filter members returned by their role. Can be one of:<br/>*`all`: All members of the organization, regardless of role.<br/>*`admin`: Organization owners.<br/>*`member`: Non-owner organization members.<br/><br/>Default:`all`
We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see[the blog post](/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/) for full details.
31
-
32
-
To access the API during the preview period, you must provide a custom[media type](/v3/media) in the`Accept` header:
Copy file name to clipboardExpand all lines: content/v3/orgs/teams.md
+7-93Lines changed: 7 additions & 93 deletions
Original file line number
Diff line number
Diff line change
@@ -43,22 +43,7 @@ Name | Type | Description
43
43
`description`|`string` | The description of the team.
44
44
`repo_names`|`array` of`strings` | The full name (e.g., "organization-name/repository-name") of repositories to add the team to.
45
45
`privacy`|`string`| The level of privacy this team should have. Can be one of:<br/> *`secret` - only visible to organization owners and members of this team.<br/> *`closed` - visible to all members of this organization.<br/>Default:`secret`<br/>**This parameter requires a custom media type to be specified. Please see more in the alert below.**
46
-
`permission`|`string` |**Deprecated**. In the preview period described in the alert below, a team's`permission` attribute no longer dictates what permission it has on its repositories; it only dictates what permission the repositories in this request will be added with, and what permission a new repository will be added to the team with if none is specified by the user. Avoid confusion by specifying a`permission` when using the[Add team repository](/v3/orgs/teams/#add-team-repository) API instead.<br/><br/>The permission to grant the team. Can be one of:<br/> *`pull` - team members can pull, but not push to or administer these repositories.<br/> *`push` - team members can pull and push, but not administer these repositories.<br/> *`admin` - team members can pull, push and administer these repositories.<br/>Default:`pull`
47
-
48
-
{{#tip}}
49
-
50
-
We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see the[blog post](/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/) for full details.
51
-
52
-
To access the API during the preview period, you must provide a custom[media type](/v3/media) in the`Accept` header:
53
-
54
-
```
55
-
application/vnd.github.ironman-preview+json
56
-
```
57
-
58
-
**Warning:** If you specify the`privacy` attribute on an organization that hasn't had[improved organization permissions](https://github.com/blog/2020-improved-organization-permissions) enabled yet, you will get a`422` error response.
59
-
60
-
{{/tip}}
61
-
46
+
`permission`|`string` |**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br/> *`pull` - team members can pull, but not push to or administer newly-added repositories.<br/> *`push` - team members can pull and push, but not administer newly-added repositories.<br/> *`admin` - team members can pull, push and administer newly-added repositories.<br/>Default:`pull`
62
47
####Example
63
48
64
49
<%= json\
@@ -84,23 +69,8 @@ Name | Type | Description
84
69
-----|------|--------------
85
70
`name`|`string` |**Required**. The name of the team.
86
71
`description`|`string` | The description of the team.
87
-
`privacy`|`string`| The level of privacy this team should have. Can be one of:<br/> *`secret` - only visible to organization owners and members of this team.<br/> *`closed` - visible to all members of this organization.<br/>Default:`secret`<br/>**This parameter requires a custom media type to be specified. Please see more in the alert below.**
88
-
`permission`|`string` |**Deprecated**. In the preview period described in the alert below, a team's`permission` attribute no longer dictates what permission it has on its repositories; it only dictates what permission a new repository will be added to the team with if none is specified by the user. Avoid confusion by specifying a`permission` when using the[Add team repository](/v3/orgs/teams/#add-team-repository) API instead.<br/><br/>The permission to grant the team. Can be one of:<br/> *`pull` - team members can pull, but not push to or administer these repositories.<br/> *`push` - team members can pull and push, but not administer these repositories.<br/> *`admin` - team members can pull, push and administer these repositories. Default:`pull`
89
-
90
-
91
-
{{#tip}}
92
-
93
-
We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see the[blog post](/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/) for full details.
94
-
95
-
To access the API during the preview period, you must provide a custom[media type](/v3/media) in the`Accept` header:
96
-
97
-
```
98
-
application/vnd.github.ironman-preview+json
99
-
```
100
-
101
-
**Warning:** If you specify the`privacy` attribute on an organization that hasn't had[improved organization permissions](https://github.com/blog/2020-improved-organization-permissions) enabled yet, you will get a`422` error response.
102
-
103
-
{{/tip}}
72
+
`privacy`|`string`| The level of privacy this team should have. Can be one of:<br/> *`secret` - only visible to organization owners and members of this team.<br/> *`closed` - visible to all members of this organization.<br/>Default:`secret`<br/>
73
+
`permission`|`string` |**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br/> *`pull` - team members can pull, but not push to or administer newly-added repositories.<br/> *`push` - team members can pull and push, but not administer newly-added repositories.<br/> *`admin` - team members can pull, push and administer newly-added repositories.<br/>Default:`pull`
104
74
105
75
####Example
106
76
@@ -141,20 +111,7 @@ you will be able to list all members for the team.
141
111
142
112
Name | Type | Description
143
113
-----|------|--------------
144
-
`role`|`string`| Filters members returned by their role in the team. Can be one of:<br/> *`member` - normal members of the team.<br/> *`maintainer` - team maintainers.<br/> *`all` - all members of the team.<br/>Default:`all`<br/>**This parameter requires a custom media type to be specified. Please see more in the alert below.**
145
-
146
-
147
-
{{#tip}}
148
-
149
-
We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see the[blog post](/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/) for full details.
150
-
151
-
To access the API during the preview period, you must provide a custom[media type](/v3/media) in the`Accept` header:
152
-
153
-
```
154
-
application/vnd.github.ironman-preview+json
155
-
```
156
-
157
-
{{/tip}}
114
+
`role`|`string`| Filters members returned by their role in the team. Can be one of:<br/> *`member` - normal members of the team.<br/> *`maintainer` - team maintainers.<br/> *`all` - all members of the team.<br/>Default:`all`
158
115
159
116
###Response
160
117
@@ -316,22 +273,7 @@ and a team, the authenticated user must be an organization owner.
316
273
317
274
Name | Type | Description
318
275
-----|------|--------------
319
-
`role`|`string`| The role that this user should have in the team. Can be one of:<br/> *`member` - a normal member of the team.<br/> *`maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.<br/>Default:`member`<br/>**This parameter requires a custom media type to be specified. Please see more in the alert below.**
320
-
321
-
322
-
{{#tip}}
323
-
324
-
We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see the[blog post](/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/) for full details.
325
-
326
-
To access the API during the preview period, you must provide a custom[media type](/v3/media) in the`Accept` header:
327
-
328
-
```
329
-
application/vnd.github.ironman-preview+json
330
-
```
331
-
332
-
**Warning:** If you specify the`role` attribute on an organization that hasn't had[improved organization permissions](https://github.com/blog/2020-improved-organization-permissions) enabled yet, you will get a`422` error response.
333
-
334
-
{{/tip}}
276
+
`role`|`string`| The role that this user should have in the team. Can be one of:<br/> *`member` - a normal member of the team.<br/> *`maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.<br/>Default:`member`
335
277
336
278
###Response if user's membership with team is now active
337
279
@@ -399,24 +341,11 @@ you will be able to list all repositories for the team.
399
341
400
342
###Alternative response with extra repository information
401
343
402
-
403
-
{{#tip}}
404
-
405
-
We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see the[blog post](/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/) for full details.
406
-
407
-
To access the API during the preview period, you must provide a custom[media type](/v3/media) in the`Accept` header:
408
-
409
-
```
410
-
application/vnd.github.ironman-preview+json
411
-
```
412
-
413
-
{{/tip}}
414
-
415
344
You can also get information about the specified repository, including what
416
345
permissions the team grants on it, by passing the following custom
`permission`|`string` | The permission to grant the team on this repository. Can be one of:<br/> *`pull` - team members can pull, but not push to or administer this repository.<br/> *`push` - team members can pull and push, but not administer this repository.<br/> *`admin` - team members can pull, push and administer this repository.<br/><br/>If no permission is specified, the team's`permission` attribute will be used to determine what permission to grant the team on this repository.<br/><br/>**This parameter requires a custom media type to be specified. Please see more in the alert below.**
366
+
`permission`|`string` | The permission to grant the team on this repository. Can be one of:<br/> *`pull` - team members can pull, but not push to or administer this repository.<br/> *`push` - team members can pull and push, but not administer this repository.<br/> *`admin` - team members can pull, push and administer this repository.<br/><br/>If no permission is specified, the team's`permission` attribute will be used to determine what permission to grant the team on this repository.
We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see the[blog post](/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/) for full details.
445
-
446
-
To access the API during the preview period, you must provide a custom[media type](/v3/media) in the`Accept` header:
447
-
448
-
```
449
-
application/vnd.github.ironman-preview+json
450
-
```
451
-
452
-
**Warning:** If you specify the`permission` attribute on an organization that hasn't had[improved organization permissions](https://github.com/blog/2020-improved-organization-permissions) enabled yet, you will get a`422` error response.
###Alternative response with extra repository information
26
-
27
-
{{#tip}}
28
-
29
-
We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see the[blog post](/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/) for full details.
30
-
31
-
To access the API during the preview period, you must provide a custom[media type](/v3/media) in the`Accept` header:
`permission`|`string` | The permission to grant theteam.**Only valid on organization-owned repositories.** Can be one of:<br/> *`pull` - can pull, but not push to or administer this repository.<br/> *`push` - can pull and push, but not administer this repository.<br/> *`admin` - can pull, push and administer this repository.<br/>Default:`push`<br/>**This parameter requires a custom media type to be specified. Please see more in the alert below.**
45
+
`permission`|`string` | The permission to grant thecollaborator.**Only valid on organization-owned repositories.** Can be one of:<br/> *`pull` - can pull, but not push to or administer this repository.<br/> *`push` - can pull and push, but not administer this repository.<br/> *`admin` - can pull, push and administer this repository.<br/>Default:`pull`
We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see the[blog post](/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/) for full details.
70
-
71
-
To access the API during the preview period, you must provide a custom[media type](/v3/media) in the`Accept` header:
72
-
73
-
```
74
-
application/vnd.github.ironman-preview+json
75
-
```
76
-
77
-
**Warning:** If you use this API to add a collaborator to a repository that's owned by an organization that hasn't had[improved organization permissions](https://github.com/blog/2020-improved-organization-permissions) enabled yet, you will get a`422` error response.