Skip to main content
ドキュメントへの更新が頻繁に発行されており、このページの翻訳はまだ行われている場合があります。 最新の情報については、「英語のドキュメント」を参照してください。
現在、GitHub AE は限定的リリースです。

REST API ドキュメントの一部は最近移動されました。 探しているものが見つからない場合は、Actions REST API ページを試してみてください。

組織

この REST API を使って、企業の組織を作成します。

組織の管理について

これらのエンドポイントは、認証されたサイト管理者のみが使用できます。 通常のユーザーは 404 応答を受け取ります。

Create an organization

"Create an organization" のパラメーター

ヘッダー
名前, Type, 説明
accept string

Setting to application/vnd.github+json is recommended.

本文のパラメーター
名前, Type, 説明
login string 必須

The organization's username.

admin string 必須

The login of the user who will manage this organization.

profile_name string

The organization's display name.

"Create an organization" の HTTP 応答状態コード

状態コード説明
201

Created

"Create an organization" のコード サンプル

post/admin/organizations
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/admin/organizations \ -d '{"login":"github","profile_name":"GitHub, Inc.","admin":"monalisaoctocat"}'

Response

Status: 201
{ "login": "github", "id": 1, "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", "url": "https://api.github.com/orgs/github", "repos_url": "https://api.github.com/orgs/github/repos", "events_url": "https://api.github.com/orgs/github/events", "hooks_url": "https://api.github.com/orgs/github/hooks", "issues_url": "https://api.github.com/orgs/github/issues", "members_url": "https://api.github.com/orgs/github/members{/member}", "public_members_url": "https://api.github.com/orgs/github/public_members{/member}", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "description": "A great organization" }

Update an organization name

"Update an organization name" のパラメーター

ヘッダー
名前, Type, 説明
accept string

Setting to application/vnd.github+json is recommended.

パス パラメーター
名前, Type, 説明
org string 必須

The organization name. The name is not case sensitive.

本文のパラメーター
名前, Type, 説明
login string 必須

The organization's new name.

"Update an organization name" の HTTP 応答状態コード

状態コード説明
202

Accepted

"Update an organization name" のコード サンプル

patch/admin/organizations/{org}
curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ https://HOSTNAME/api/v3/admin/organizations/ORG \ -d '{"login":"the-new-octocats"}'

Response

Status: 202
{ "message": "Job queued to rename organization. It may take a few minutes to complete.", "url": "https://<hostname>/api/v3/organizations/1" }