GitHub v3 REST API

Sync LDAP mapping for a user

Note that this API call does not automatically initiate an LDAP sync. Rather, if a 201 is returned, the sync job is queued successfully, and is performed when the instance is ready.

post
{protocol}://{hostname}/api/v3/admin/ldap/users/{username}/sync

Path Parameters

usernamestringrequired

Response

201 application/json

Response

statusstring
post/admin/ldap/users/{username}/sync
 
201 application/json

Create an organization

post
{protocol}://{hostname}/api/v3/admin/organizations

Body

application/json
loginstringrequired

The organization’s username.

adminstringrequired

The login of the user who will manage this organization.

profile_namestring

The organization’s display name.

Response

201 application/json

Response

Organization Simple

Organization Simple

loginstringrequired

Example:github

idintegerrequired

Example:1

node_idstringrequired

Example:MDEyOk9yZ2FuaXphdGlvbjE=

urlstring(uri)required

Example:https://api.github.com/orgs/github

repos_urlstring(uri)required

Example:https://api.github.com/orgs/github/repos

events_urlstring(uri)required

Example:https://api.github.com/orgs/github/events

hooks_urlstringrequired

Example:https://api.github.com/orgs/github/hooks

issues_urlstringrequired

Example:https://api.github.com/orgs/github/issues

members_urlstringrequired

Example:https://api.github.com/orgs/github/members{/member}

public_members_urlstringrequired

Example:https://api.github.com/orgs/github/public_members{/member}

avatar_urlstringrequired

Example:https://github.com/images/error/octocat_happy.gif

descriptionstring | nullrequired

Example:A great organization

post/admin/organizations

Body

{ "login": "github", "profile_name": "GitHub, Inc.", "admin": "monalisaoctocat" }
 
201 application/json

Update an organization name

patch
{protocol}://{hostname}/api/v3/admin/organizations/{org}

Path Parameters

orgstringrequired

Body

application/json
loginstringrequired

The organization’s new name.

Response

202 application/json

Response

messagestring
urlstring
patch/admin/organizations/{org}

Body

{ "login": "the-new-octocats" }
 
202 application/json

List pre-receive environments

get
{protocol}://{hostname}/api/v3/admin/pre-receive-environments

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

directionstring

One of asc (ascending) or desc (descending).

Allowed values:ascdesc

Default:desc

sortstring

Allowed values:createdupdatedname

Default:created

Response

200 application/json

Response

idinteger
namestring
image_urlstring
urlstring
html_urlstring
default_environmentboolean
created_atstring
hooks_countinteger
downloadobject
Show Child Parameters
get/admin/pre-receive-environments
 
200 application/json

Create a pre-receive environment

post
{protocol}://{hostname}/api/v3/admin/pre-receive-environments

Body

application/json
namestringrequired

The new pre-receive environment’s name.

image_urlstringrequired

URL from which to download a tarball of this environment.

Response

201 application/json

Response

pre-receive-environment

idinteger
namestring
image_urlstring
urlstring
html_urlstring
default_environmentboolean
created_atstring
hooks_countinteger
downloadobject
Show Child Parameters
post/admin/pre-receive-environments

Body

{ "name": "DevTools Hook Env", "image_url": "https://my_file_server/path/to/devtools_env.tar.gz" }
 
201 application/json