ci.releases.start

Dispatch the release workflow with the newest releasable commit, or with ref

POST /ci/api/repositories/{repoId}/releaseIAM ci:StartWorkflowChanges state

An explicit ref is dispatched even when it does not qualify (unmet lists what it lacks): the release workflow decides. A dry run needs only ci:ListRuns. With tag_prefix the caller also needs git:PushRepository (and git:PushProtectedTag where a tag protection rule covers the tag): the tag is made first, and who may not tag does not release. The tag starts no workflow of its own. The CLI’s `release` command shows the commit and asks before it starts.

Request syntax

POST /ci/api/repositories/{repoId}/release
{
  "ref": "string",
  "dryRun": "boolean"
}

Path parameters

  • repoIdRequired

    string

    Constraints: uuid

Request body

  • refOptional

    string

    The commit to release; the newest releasable commit when absent

    Constraints: /^[0-9a-f]{7,40}$/

  • dryRunOptional

    boolean

    Say which commit it would release, start nothing

Response

201 with { sha, subject, releasable, unmet, name, workflowPath, lastRelease, tag, dispatched: true, runId }; with dryRun, 200 with the same and dispatched: false, nothing started and no tag made. tag is the tag the release put on the commit (`<tag_prefix>-<YYYY-MM-DD>-<n>`, the date in UTC, n counting that day’s releases), null when .dcloud/release.yml sets no tag_prefix. 409 when there is no .dcloud/release.yml (or it is invalid), or no ref is given and no commit qualifies (the error is one line saying why and which commit is nearest), or no ref is given and the last release already shipped the newest releasable commit, or the tag could not be made; 404 when ref names no commit.

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:StartWorkflow 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 releases start repoId

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