Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commited9d74a

Browse files
committed
Merge pull request#948 from github/update-1452020009
2 parents95bf4a2 +847a8d0 commited9d74a

File tree

4 files changed

+28
-140
lines changed

4 files changed

+28
-140
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
kind:change
3+
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]!
13+
14+
[dotcom-blog-post]:https://github.com/blog/2064-new-organization-permissions-now-available
15+
[api-enhancements-blog-post]:/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/
16+
[preview-period]:/changes/2015-06-24-api-enhancements-for-working-with-organization-permissions/#preview-period
17+
[custom-media-types]:/v3/media/
18+
[contact]:https://github.com/contact?form[subject]=Organization+Permissions+API

‎content/v3/orgs/members.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,11 @@ be returned.
2020

2121
Name | Type | Description
2222
--------|---------|--------------
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`
2525

2626
[2fa-blog]:https://github.com/blog/1614-two-factor-authentication
2727

28-
{{#tip}}
29-
30-
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:
33-
34-
```
35-
application/vnd.github.ironman-preview+json
36-
```
37-
38-
{{/tip}}
39-
4028
###Response
4129

4230
<%= headers 200,:pagination => default_pagination_rels %>

‎content/v3/orgs/teams.md

Lines changed: 7 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,7 @@ Name | Type | Description
4343
`description`|`string` | The description of the team.
4444
`repo_names`|`array` of`strings` | The full name (e.g., "organization-name/repository-name") of repositories to add the team to.
4545
`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`
6247
####Example
6348

6449
<%= json\
@@ -84,23 +69,8 @@ Name | Type | Description
8469
-----|------|--------------
8570
`name`|`string` |**Required**. The name of the team.
8671
`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`
10474

10575
####Example
10676

@@ -141,20 +111,7 @@ you will be able to list all members for the team.
141111

142112
Name | Type | Description
143113
-----|------|--------------
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`
158115

159116
###Response
160117

@@ -316,22 +273,7 @@ and a team, the authenticated user must be an organization owner.
316273

317274
Name | Type | Description
318275
-----|------|--------------
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`
335277

336278
###Response if user's membership with team is now active
337279

@@ -399,24 +341,11 @@ you will be able to list all repositories for the team.
399341

400342
###Alternative response with extra repository information
401343

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-
415344
You can also get information about the specified repository, including what
416345
permissions the team grants on it, by passing the following custom
417346
[media type](/v3/media/) via the`Accept` header:
418347

419-
Accept: application/vnd.github.ironman-preview.repository+json
348+
Accept: application/vnd.github.v3.repository+json
420349

421350
<%= headers 200 %>
422351
<%= json:repo %>
@@ -434,25 +363,10 @@ organization.
434363

435364
Name | Type | Description
436365
-----|------|--------------
437-
`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.
438367

439368
<%= fetch_content(:optional_put_content_length) %>
440369

441-
442-
{{#tip}}
443-
444-
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.
453-
454-
{{/tip}}
455-
456370
###Response
457371

458372
<%= headers 204 %>

‎content/v3/repos/collaborators.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,6 @@ collaborators list.
1919

2020
###Response
2121

22-
<%= headers 200,:pagination => default_pagination_rels %>
23-
<%= json(:user) { |h|[h] } %>
24-
25-
###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:
32-
33-
```
34-
application/vnd.github.ironman-preview+json
35-
```
36-
37-
{{/tip}}
38-
3922
<%= headers 200,:pagination => default_pagination_rels %>
4023
<%= json(:collaborator) { |h|[h] } %>
4124

@@ -59,25 +42,10 @@ application/vnd.github.ironman-preview+json
5942

6043
Name | Type | Description
6144
-----|------|--------------
62-
`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`
6346

6447
<%= fetch_content(:optional_put_content_length) %>
6548

66-
67-
{{#tip}}
68-
69-
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.
78-
79-
{{/tip}}
80-
8149
###Response
8250

8351
<%= headers 204 %>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp