GitHub v3 REST API

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

Get a pre-receive environment

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

Path Parameters

pre_receive_environment_idintegerrequired

Response

200 application/json

Response

pre-receive-environment

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

Update a pre-receive environment

You cannot modify the default environment. If you attempt to modify the default environment, you will receive a 422 Unprocessable Entity response.

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

Path Parameters

pre_receive_environment_idintegerrequired

Body

application/json
namestring

This pre-receive environment’s new name.

image_urlstring

URL from which to download a tarball of this environment.

Response

application/json

Response

pre-receive-environment

idinteger
namestring
image_urlstring
urlstring
html_urlstring
default_environmentboolean
created_atstring
hooks_countinteger
downloadobject
Show Child Parameters
patch/admin/pre-receive-environments/{pre_receive_environment_id}

Body

{}
 
application/json