Skip to content

Instantly share code, notes, and snippets.

@kerin
Last active August 3, 2017 09:08
Show Gist options
  • Save kerin/e9fd30eb776e97993bd7ce37401a02df to your computer and use it in GitHub Desktop.
Save kerin/e9fd30eb776e97993bd7ce37401a02df to your computer and use it in GitHub Desktop.
$ curl -H "Authorization: token TOKEN_A" https://api.github.com/user/orgs -v
> GET /user/orgs HTTP/1.1
< HTTP/1.1 200 OK
< Server: GitHub.com
< X-OAuth-Scopes: read:org, read:user, user:email
< X-Accepted-OAuth-Scopes: admin:org, read:org, repo, user, write:org
[
{
"login": "ministryofjustice",
"id": 2203574,
"url": "https://api.github.com/orgs/ministryofjustice",
"repos_url": "https://api.github.com/orgs/ministryofjustice/repos",
"events_url": "https://api.github.com/orgs/ministryofjustice/events",
"hooks_url": "https://api.github.com/orgs/ministryofjustice/hooks",
"issues_url": "https://api.github.com/orgs/ministryofjustice/issues",
"members_url": "https://api.github.com/orgs/ministryofjustice/members{/member}",
"public_members_url": "https://api.github.com/orgs/ministryofjustice/public_members{/member}",
"avatar_url": "https://avatars3.githubusercontent.com/u/2203574?v=4",
"description": ""
},
{
"login": "moj-analytical-services",
"id": 25906034,
"url": "https://api.github.com/orgs/moj-analytical-services",
"repos_url": "https://api.github.com/orgs/moj-analytical-services/repos",
"events_url": "https://api.github.com/orgs/moj-analytical-services/events",
"hooks_url": "https://api.github.com/orgs/moj-analytical-services/hooks",
"issues_url": "https://api.github.com/orgs/moj-analytical-services/issues",
"members_url": "https://api.github.com/orgs/moj-analytical-services/members{/member}",
"public_members_url": "https://api.github.com/orgs/moj-analytical-services/public_members{/member}",
"avatar_url": "https://avatars2.githubusercontent.com/u/25906034?v=4",
"description": ""
}
]
==========================================================================
$ curl -H "Authorization: token TOKEN_B" https://api.github.com/user/orgs -v
> GET /user/orgs HTTP/1.1
< HTTP/1.1 200 OK
< Server: GitHub.com
< X-OAuth-Scopes: read:org, read:user, user:email
< X-Accepted-OAuth-Scopes: admin:org, read:org, repo, user, write:org
[
{
"login": "moj-analytical-services",
"id": 25906034,
"url": "https://api.github.com/orgs/moj-analytical-services",
"repos_url": "https://api.github.com/orgs/moj-analytical-services/repos",
"events_url": "https://api.github.com/orgs/moj-analytical-services/events",
"hooks_url": "https://api.github.com/orgs/moj-analytical-services/hooks",
"issues_url": "https://api.github.com/orgs/moj-analytical-services/issues",
"members_url": "https://api.github.com/orgs/moj-analytical-services/members{/member}",
"public_members_url": "https://api.github.com/orgs/moj-analytical-services/public_members{/member}",
"avatar_url": "https://avatars2.githubusercontent.com/u/25906034?v=4",
"description": ""
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment