Actions

Endpoints to manage GitHub Actions using the REST API.

Operations

MethodEndpointDescription
GET/enterprises/{enterprise}/actions/cache/retention-limitGet GitHub Actions cache retention limit for an enterprise
PUT/enterprises/{enterprise}/actions/cache/retention-limitSet GitHub Actions cache retention limit for an enterprise
GET/enterprises/{enterprise}/actions/cache/storage-limitGet GitHub Actions cache storage limit for an enterprise
PUT/enterprises/{enterprise}/actions/cache/storage-limitSet GitHub Actions cache storage limit for an enterprise
GET/organizations/{org}/actions/cache/retention-limitGet GitHub Actions cache retention limit for an organization
PUT/organizations/{org}/actions/cache/retention-limitSet GitHub Actions cache retention limit for an organization
GET/organizations/{org}/actions/cache/storage-limitGet GitHub Actions cache storage limit for an organization
PUT/organizations/{org}/actions/cache/storage-limitSet GitHub Actions cache storage limit for an organization
GET/orgs/{org}/actions/cache/usageGet GitHub Actions cache usage for an organization
GET/orgs/{org}/actions/cache/usage-by-repositoryList repositories with GitHub Actions cache usage for an organization
GET/orgs/{org}/actions/hosted-runnersList GitHub-hosted runners for an organization
POST/orgs/{org}/actions/hosted-runnersCreate a GitHub-hosted runner for an organization
GET/orgs/{org}/actions/hosted-runners/images/customList custom images for an organization
GET/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}Get a custom image definition for GitHub Actions Hosted Runners
DELETE/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}Delete a custom image from the organization
GET/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versionsList image versions of a custom image for an organization
GET/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}Get an image version of a custom image for GitHub Actions Hosted Runners
DELETE/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}Delete an image version of custom image from the organization
GET/orgs/{org}/actions/hosted-runners/images/github-ownedGet GitHub-owned images for GitHub-hosted runners in an organization
GET/orgs/{org}/actions/hosted-runners/images/partnerGet partner images for GitHub-hosted runners in an organization
GET/orgs/{org}/actions/hosted-runners/limitsGet limits on GitHub-hosted runners for an organization
GET/orgs/{org}/actions/hosted-runners/machine-sizesGet GitHub-hosted runners machine specs for an organization
GET/orgs/{org}/actions/hosted-runners/platformsGet platforms for GitHub-hosted runners in an organization
GET/orgs/{org}/actions/hosted-runners/{hosted_runner_id}Get a GitHub-hosted runner for an organization
PATCH/orgs/{org}/actions/hosted-runners/{hosted_runner_id}Update a GitHub-hosted runner for an organization
DELETE/orgs/{org}/actions/hosted-runners/{hosted_runner_id}Delete a GitHub-hosted runner for an organization
GET/orgs/{org}/actions/permissionsGet GitHub Actions permissions for an organization
PUT/orgs/{org}/actions/permissionsSet GitHub Actions permissions for an organization
GET/orgs/{org}/actions/permissions/artifact-and-log-retentionGet artifact and log retention settings for an organization
PUT/orgs/{org}/actions/permissions/artifact-and-log-retentionSet artifact and log retention settings for an organization
GET/orgs/{org}/actions/permissions/fork-pr-contributor-approvalGet fork PR contributor approval permissions for an organization
PUT/orgs/{org}/actions/permissions/fork-pr-contributor-approvalSet fork PR contributor approval permissions for an organization
GET/orgs/{org}/actions/permissions/fork-pr-workflows-private-reposGet private repo fork PR workflow settings for an organization
PUT/orgs/{org}/actions/permissions/fork-pr-workflows-private-reposSet private repo fork PR workflow settings for an organization
GET/orgs/{org}/actions/permissions/repositoriesList selected repositories enabled for GitHub Actions in an organization
PUT/orgs/{org}/actions/permissions/repositoriesSet selected repositories enabled for GitHub Actions in an organization
PUT/orgs/{org}/actions/permissions/repositories/{repository_id}Enable a selected repository for GitHub Actions in an organization
DELETE/orgs/{org}/actions/permissions/repositories/{repository_id}Disable a selected repository for GitHub Actions in an organization
GET/orgs/{org}/actions/permissions/selected-actionsGet allowed actions and reusable workflows for an organization
PUT/orgs/{org}/actions/permissions/selected-actionsSet allowed actions and reusable workflows for an organization

The full set of 187 operations is in the API reference.

Example

Get GitHub Actions cache retention limit for an enterprise, with the TypeScript SDK:

ts
import { GitHubV3REST } from "github";

const client = new GitHubV3REST({
  baseUrl: "https://api.github.com",
});

const result = await client.actions.actionsGetCacheRetentionLimitForEnterprise({
  enterprise: "enterprise",
});
console.log(result);
Nine more languages

The same call exists in every SDK. See SDKs for the other nine.