ci.runner-groups.create

Create a runner group

POST /ci/api/runner-groupsIAM ci:ManageRunnersChanges stateDestructive

A run reaches a runner of the group only when its repository, its ref and its event are all allowed. A merge queue build is judged by the branch it lands on.

Request syntax

POST /ci/api/runner-groups
{
  "name": "string",
  "repositoryIds": "array of string",
  "refs": "array of string",
  "protectedRefsOnly": "boolean",
  "allowPullRequests": "boolean"
}

Request body

  • nameRequired

    string

    Name of the group, 1 to 100 characters: letters, digits, spaces, . _ -, starting with a letter or digit; unique in the organization (409)

    Constraints: 1-100 chars

  • repositoryIdsOptional

    array of string

    Repositories the group serves, up to 500, each a repository of this organization (404 otherwise); null or omitted: every repository

    Constraints: uuid

    May be null.

  • refsOptional

    array of string

    Ref globs it serves (`main`, `release/*`, `refs/tags/v*`), up to 50 of up to 200 characters (letters, digits, * . _ / -); omitted or empty: any ref

    Constraints: 1-200 chars

  • protectedRefsOnlyOptional

    boolean

    Only branches covered by a branch protection rule; for runners that hold deploy credentials. Off when omitted

  • allowPullRequestsOptional

    boolean

    Whether pull-request runs reach it; on when omitted

Response

201 with the new group (fields as in the list). 409 when the organization has a group of that name; 404 when a repository in repositoryIds is not in this organization.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow ci:ManageRunners on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud ci runner-groups create --name example

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_ci_runner-groups_create.