Skip to main content

Create a registration token for a repository

Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate using an access token with the `repo` scope to use this endpoint. #### Example using registration token Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. ``` ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN ```

POST/repos/{owner}/{repo}/actions/runners/registration-token
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
owner string
required
repo string
required

Responses

application/json Authentication Token object

Response

expires_at string<date-time>
required

The time this token expires

Example: 2016-07-11T22:14:10Z

permissions object
optional
Example:
{
  "deployments": "write",
  "issues": "read"
}
repositories array[Repository object]
optional

The repositories this token has access to

items Repository object

A git repository

allow_forking boolean
optional

Whether to allow forking this repo

allow_merge_commit boolean
optional

Whether to allow merge commits for pull requests.

Example: true

allow_rebase_merge boolean
optional

Whether to allow rebase merges for pull requests.

Example: true

allow_squash_merge boolean
optional

Whether to allow squash merges for pull requests.

Example: true

archive_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}

archived boolean
required

Whether the repository is archived.

assignees_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/assignees{/user}

blobs_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}

branches_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/branches{/branch}

clone_url string
required

Example: https://github.com/octocat/Hello-World.git

collaborators_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}

comments_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/comments{/number}

commits_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/commits{/sha}

compare_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}

contents_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/contents/{+path}

contributors_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/contributors

created_at string<date-time>
requirednullable

Example: 2011-01-26T19:01:12Z

default_branch string
required

The default branch of the repository.

Example: master

delete_branch_on_merge boolean
optional

Whether to delete head branches when pull requests are merged

Example: false

deployments_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/deployments

description string
requirednullable

Example: This your first repo!

disabled boolean
required

Returns whether or not this repository disabled.

downloads_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/downloads

events_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/events

fork boolean
required
forks integer
required
forks_count integer
required

Example: 9

forks_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/forks

full_name string
required

Example: octocat/Hello-World

git_commits_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}

git_refs_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}

git_tags_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}

git_url string
required

Example: git:github.com/octocat/Hello-World.git

has_downloads boolean
required

Whether downloads are enabled.

Example: true

has_issues boolean
required

Whether issues are enabled.

Example: true

has_pages boolean
required
has_projects boolean
required

Whether projects are enabled.

Example: true

has_wiki boolean
required

Whether the wiki is enabled.

Example: true

homepage string<uri>
requirednullable

Example: https://github.com

hooks_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/hooks

html_url string<uri>
required

Example: https://github.com/octocat/Hello-World

id integer
required

Unique identifier of the repository

Example: 42

is_template boolean
optional

Whether this repository acts as a template that can be used to generate new repositories.

Example: true

issue_comment_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}

issue_events_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number}

issues_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/issues{/number}

keys_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id}

labels_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/labels{/name}

language string
requirednullable
languages_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/languages

license License Simple object
requirednullable

License Simple

html_url string<uri>
optional
key string
required

Example: mit

name string
required

Example: MIT License

node_id string
required

Example: MDc6TGljZW5zZW1pdA==

spdx_id string
requirednullable

Example: MIT

url string<uri>
requirednullable

Example: https://api.github.com/licenses/mit

master_branch string
optional
merges_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/merges

milestones_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/milestones{/number}

mirror_url string<uri>
requirednullable

Example: git:git.example.com/octocat/Hello-World

name string
required

The name of the repository.

Example: Team Environment

network_count integer
optional
node_id string
required

Example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5

notifications_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}

open_issues integer
required
open_issues_count integer
required

Example: 0

organization Simple User object
optionalnullable

Simple User

avatar_url string<uri>
required

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

email string
optionalnullable
events_url string
required

Example: https://api.github.com/users/octocat/events{/privacy}

followers_url string<uri>
required

Example: https://api.github.com/users/octocat/followers

following_url string
required

Example: https://api.github.com/users/octocat/following{/other_user}

gists_url string
required

Example: https://api.github.com/users/octocat/gists{/gist_id}

gravatar_id string
requirednullable

Example: 41d064eb2195891e12d0413f63227ea7

html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

login string
required

Example: octocat

name string
optionalnullable
node_id string
required

Example: MDQ6VXNlcjE=

organizations_url string<uri>
required

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

received_events_url string<uri>
required

Example: https://api.github.com/users/octocat/received_events

repos_url string<uri>
required

Example: https://api.github.com/users/octocat/repos

site_admin boolean
required
starred_at string
optional

Example: "2020-07-09T00:17:55Z"

starred_url string
required

Example: https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_url string<uri>
required

Example: https://api.github.com/users/octocat/subscriptions

type string
required

Example: User

url string<uri>
required

Example: https://api.github.com/users/octocat

owner Simple User object
required

Simple User

avatar_url string<uri>
required

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

email string
optionalnullable
events_url string
required

Example: https://api.github.com/users/octocat/events{/privacy}

followers_url string<uri>
required

Example: https://api.github.com/users/octocat/followers

following_url string
required

Example: https://api.github.com/users/octocat/following{/other_user}

gists_url string
required

Example: https://api.github.com/users/octocat/gists{/gist_id}

gravatar_id string
requirednullable

Example: 41d064eb2195891e12d0413f63227ea7

html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

login string
required

Example: octocat

name string
optionalnullable
node_id string
required

Example: MDQ6VXNlcjE=

organizations_url string<uri>
required

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

received_events_url string<uri>
required

Example: https://api.github.com/users/octocat/received_events

repos_url string<uri>
required

Example: https://api.github.com/users/octocat/repos

site_admin boolean
required
starred_at string
optional

Example: "2020-07-09T00:17:55Z"

starred_url string
required

Example: https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_url string<uri>
required

Example: https://api.github.com/users/octocat/subscriptions

type string
required

Example: User

url string<uri>
required

Example: https://api.github.com/users/octocat

permissions object
optional
admin boolean
required
maintain boolean
optional
pull boolean
required
push boolean
required
triage boolean
optional
private boolean
required

Whether the repository is private or public.

pulls_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/pulls{/number}

pushed_at string<date-time>
requirednullable

Example: 2011-01-26T19:06:43Z

releases_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/releases{/id}

size integer
required

Example: 108

ssh_url string
required

Example: [email protected]:octocat/Hello-World.git

stargazers_count integer
required

Example: 80

stargazers_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/stargazers

starred_at string
optional

Example: "2020-07-09T00:17:42Z"

statuses_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha}

subscribers_count integer
optional
subscribers_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/subscribers

subscription_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/subscription

svn_url string<uri>
required

Example: https://svn.github.com/octocat/Hello-World

tags_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/tags

teams_url string<uri>
required

Example: http://api.github.com/repos/octocat/Hello-World/teams

temp_clone_token string
optional
template_repository object
optionalnullable
allow_merge_commit boolean
optional
allow_rebase_merge boolean
optional
allow_squash_merge boolean
optional
allow_update_branch boolean
optional
archive_url string
optional
archived boolean
optional
assignees_url string
optional
blobs_url string
optional
branches_url string
optional
clone_url string
optional
collaborators_url string
optional
comments_url string
optional
commits_url string
optional
compare_url string
optional
contents_url string
optional
contributors_url string
optional
created_at string
optional
default_branch string
optional
delete_branch_on_merge boolean
optional
deployments_url string
optional
description string
optional
disabled boolean
optional
downloads_url string
optional
events_url string
optional
fork boolean
optional
forks_count integer
optional
forks_url string
optional
full_name string
optional
git_commits_url string
optional
git_refs_url string
optional
git_tags_url string
optional
git_url string
optional
has_downloads boolean
optional
has_issues boolean
optional
has_pages boolean
optional
has_projects boolean
optional
has_wiki boolean
optional
homepage string
optional
hooks_url string
optional
html_url string
optional
id integer
optional
is_template boolean
optional
issue_comment_url string
optional
issue_events_url string
optional
issues_url string
optional
keys_url string
optional
labels_url string
optional
language string
optional
languages_url string
optional
merges_url string
optional
milestones_url string
optional
mirror_url string
optional
name string
optional
network_count integer
optional
node_id string
optional
notifications_url string
optional
open_issues_count integer
optional
owner object
optional
permissions object
optional
private boolean
optional
pulls_url string
optional
pushed_at string
optional
releases_url string
optional
size integer
optional
ssh_url string
optional
stargazers_count integer
optional
stargazers_url string
optional
statuses_url string
optional
subscribers_count integer
optional
subscribers_url string
optional
subscription_url string
optional
svn_url string
optional
tags_url string
optional
teams_url string
optional
temp_clone_token string
optional
topics array
optional
trees_url string
optional
updated_at string
optional
url string
optional
visibility string
optional
watchers_count integer
optional
topics array[string]
optional
trees_url string
required

Example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}

updated_at string<date-time>
requirednullable

Example: 2011-01-26T19:14:43Z

url string<uri>
required

Example: https://api.github.com/repos/octocat/Hello-World

visibility string
optional

The repository visibility: public, private, or internal.

watchers integer
required
watchers_count integer
required

Example: 80

repository_selection string
optional

Describe whether all repositories have been selected or there's a selection involved

single_file string
optionalnullable

Example: config.yaml

token string
required

The token used for authentication

Example: v1.1f699f1069f60xxx