Skip to content

List concurrency groups for a workflow run

GET
/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups

Lists all concurrency groups associated with a workflow run or its jobs.

The set of groups is derived from the run’s configuration, so a group is included even when the run no longer has any items currently holding or waiting in it. In that case the group_members array will be empty. total_count reflects the number of groups the run participates in by configuration, not the number with active items.

This differs from GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}, which returns 404 when a group has no active items. That endpoint reports the live state of a group repo-wide, while this endpoint reports the groups associated with a specific run by configuration.

Results are sorted by group name and support cursor-based pagination via before and after. The after cursor paginates forward only and does not emit a rel="prev" Link; use before to page backward from a forward page’s next cursor.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

run_id
required
integer

The unique identifier of the workflow run.

per_page
integer
default: 30

The number of results per page (max 100). For more information, see “Using pagination in the REST API.”

before
string

A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see “Using pagination in the REST API.”

after
string

A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see “Using pagination in the REST API.”

Response

Media type application/json
Concurrency Group Run List

A list of concurrency groups associated with a workflow run.

object
total_count
required

The total number of concurrency groups this workflow run participates in, derived from the run’s configuration. This count is not filtered by whether the run currently holds or is waiting in each group, so it can include groups whose group_members array is empty (for example, when the run has already released its lease in that group).

integer
concurrency_groups
required
Array<object>
object
group_name
required

The name of the concurrency group.

string
group_url
required

API URL for this concurrency group. May return 404 if the group has no active items at the time it is requested, since the get-by-name endpoint reports the live repo-wide state of a group while this endpoint lists groups associated with a run by configuration.

string format: uri
group_members
required

Items belonging to this workflow run that are either currently holding or waiting for the concurrency group lease. May be empty if the run no longer has any active or queued items in this group.

Array<object>
object
run_id
required

The ID of the workflow run.

integer
run_name
required

The name of the workflow run.

string
run_url
required

API URL for the workflow run.

string format: uri
nullable
run_html_url
required

Web URL for the workflow run.

string format: uri
nullable
position
required

Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending).

integer
position_url
required

API URL to get items ahead of this item in the concurrency group.

string format: uri
job_id

The ID of the job, when the item represents a job-level or reusable-workflow-level lease.

integer
nullable
job_name

The display name of the job, when the item represents a job-level or reusable-workflow-level lease.

string
nullable
job_url

API URL for the job.

string format: uri
nullable
job_html_url

Web URL for the job.

string format: uri
nullable
status
required
string
Allowed values: in_progress pending
Examples
Example default
{
"total_count": 2,
"concurrency_groups": [
{
"group_name": "deploy-prod",
"group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod",
"group_members": [
{
"run_id": 30433642,
"run_name": "Deploy to production",
"run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642",
"run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642",
"status": "in_progress",
"position": 0,
"position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642"
}
]
},
{
"group_name": "ci-build",
"group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build",
"group_members": [
{
"run_id": 30433642,
"run_name": "Deploy to production",
"run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642",
"run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642",
"status": "pending",
"position": 2,
"position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260",
"job_id": 798245260,
"job_name": "build",
"job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260",
"job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260"
}
]
}
]
}
Link
string
Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Validation failed, or the endpoint has been spammed.

Media type application/json
Validation Error

Validation Error

object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
nullable
Example generated
{
"message": "example",
"documentation_url": "example",
"errors": [
{
"resource": "example",
"field": "example",
"message": "example",
"code": "example",
"index": 1,
"value": [
"example"
]
}
]
}