octokit.rest

Get workflow usage

Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "Managing billing for GitHub Actions".

You can replace workflow_id with the workflow file name. For example, you could use main.yaml. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.

Parameters

string The token will be passed in the authorization header.

string

string

undefined The ID of the workflow. You can also pass the workflow file name as a string.

Request

GET https://api.github.com/repos///actions/workflows//timing
authorization: bearer undefined
accept: application/vnd.github.v3+json
user-agent: octokit.rest


Example Response

Status: 200
{
  "billable": {
    "UBUNTU": {
      "total_ms": 180000
    },
    "MACOS": {
      "total_ms": 240000
    },
    "WINDOWS": {
      "total_ms": 300000
    }
  }
}

See documentation on GitHub developer guides