Create a registration token for an enterprise
POST
/enterprises/{enterprise}/actions/runners/registration-token
enterprise-admin
config
script. The token expires after one hour.admin:enterprise
scope to use this endpoint.Example using registration token
TOKEN
with the registration token provided by this endpoint../config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.github.com/enterprises//actions/runners/registration-token'
Response Response Example
{
"expires_at": "2016-07-11T22:14:10Z",
"permissions": {
"deployments": "write",
"issues": "read"
},
"repositories": [
{
"allow_merge_commit": true,
"allow_rebase_merge": true,
"allow_squash_merge": true,
"archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"archived": false,
"assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
"created_at": "2011-01-26T19:01:12Z",
"default_branch": "master",
"delete_branch_on_merge": false,
"deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
"description": "This your first repo!",
"disabled": true,
"downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "http://api.github.com/repos/octocat/Hello-World/events",
"fork": true,
"forks": 0,
"forks_count": 9,
"forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
"full_name": "octocat/Hello-World",
"git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"has_downloads": true,
"has_issues": true,
"has_pages": true,
"has_projects": true,
"has_wiki": true,
"homepage": "https://github.com",
"hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
"html_url": "https://github.com/octocat/Hello-World",
"id": 42,
"is_template": true,
"issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
"language": "string",
"languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
"license": {
"html_url": "http://example.com",
"key": "mit",
"name": "MIT License",
"node_id": "MDc6TGljZW5zZW1pdA==",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit"
},
"master_branch": "string",
"merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"name": "Team Environment",
"network_count": 0,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"open_issues": 0,
"open_issues_count": 0,
"owner": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
},
"permissions": {
"admin": true,
"maintain": true,
"pull": true,
"push": true,
"triage": true
},
"private": false,
"pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"pushed_at": "2011-01-26T19:06:43Z",
"releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
"size": 108,
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_count": 80,
"stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
"starred_at": "\"2020-07-09T00:17:42Z\"",
"statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_count": 0,
"subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
"temp_clone_token": "string",
"template_repository": {
"allow_merge_commit": true,
"allow_rebase_merge": true,
"allow_squash_merge": true,
"archive_url": "string",
"archived": true,
"assignees_url": "string",
"blobs_url": "string",
"branches_url": "string",
"clone_url": "string",
"collaborators_url": "string",
"comments_url": "string",
"commits_url": "string",
"compare_url": "string",
"contents_url": "string",
"contributors_url": "string",
"created_at": "string",
"default_branch": "string",
"delete_branch_on_merge": true,
"deployments_url": "string",
"description": "string",
"disabled": true,
"downloads_url": "string",
"events_url": "string",
"fork": true,
"forks_count": 0,
"forks_url": "string",
"full_name": "string",
"git_commits_url": "string",
"git_refs_url": "string",
"git_tags_url": "string",
"git_url": "string",
"has_downloads": true,
"has_issues": true,
"has_pages": true,
"has_projects": true,
"has_wiki": true,
"homepage": "string",
"hooks_url": "string",
"html_url": "string",
"id": 0,
"is_template": true,
"issue_comment_url": "string",
"issue_events_url": "string",
"issues_url": "string",
"keys_url": "string",
"labels_url": "string",
"language": "string",
"languages_url": "string",
"merges_url": "string",
"milestones_url": "string",
"mirror_url": "string",
"name": "string",
"network_count": 0,
"node_id": "string",
"notifications_url": "string",
"open_issues_count": 0,
"owner": {
"avatar_url": "string",
"events_url": "string",
"followers_url": "string",
"following_url": "string",
"gists_url": "string",
"gravatar_id": "string",
"html_url": "string",
"id": 0,
"login": "string",
"node_id": "string",
"organizations_url": "string",
"received_events_url": "string",
"repos_url": "string",
"site_admin": true,
"starred_url": "string",
"subscriptions_url": "string",
"type": "string",
"url": "string"
},
"permissions": {
"admin": true,
"pull": true,
"push": true
},
"private": true,
"pulls_url": "string",
"pushed_at": "string",
"releases_url": "string",
"size": 0,
"ssh_url": "string",
"stargazers_count": 0,
"stargazers_url": "string",
"statuses_url": "string",
"subscribers_count": 0,
"subscribers_url": "string",
"subscription_url": "string",
"svn_url": "string",
"tags_url": "string",
"teams_url": "string",
"temp_clone_token": "string",
"topics": [
"string"
],
"trees_url": "string",
"updated_at": "string",
"url": "string",
"visibility": "string",
"watchers_count": 0
},
"topics": [
"string"
],
"trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"updated_at": "2011-01-26T19:14:43Z",
"url": "https://api.github.com/repos/octocat/Hello-World",
"visibility": "public",
"watchers": 0,
"watchers_count": 80
}
],
"repository_selection": "all",
"single_file": "config.yaml",
"token": "v1.1f699f1069f60xxx"
}
Request
Path Params
enterprise
string
required
Responses
Modified at 2022-09-10 00:54:29