Buildpipeline-components
POST/repositories/{repo_id}/pipeline-components/{component_id}/versions/{version}/deprecate
Deprecate a published version
deprecate_repo_pipeline_component_version
pipeline:manage
A token needs thepipeline:managescope: Create, update, and delete pipeline definitionsGranted bywrite_api,write_repository.Every operation this scope unlocksAudited · mutation
x-gitmoap-audit: {"kind":"audited","arg":"mutation"}
A deprecated version still runs, and a pipeline that names it exactly is undisturbed, but no version range selects it any more, so pipelines tracking a range move off it the next time they are saved. Undeprecating it reverses this. A sunset version stays sunset and cannot be deprecated. Maintainers and above.
Parameters
Path
- repo_idRepositoryId (string · uuid)The repository's id
- component_idComponentId (string · uuid)The component's id
- versionComponentVersion (string)An exact version, such as v1.2.0
Responses
200The version as deprecated. It still runs, and a pipeline that named it exactly is undisturbed — but no version range selects it any more, so consumers tracking a range move off it the next time they are savedapplication/json
- capability_requirementsarray of CapabilityId (string)The provider capabilities the version's steps use.
- contract_digeststringA SHA-256 fingerprint, in hex, of what a pipeline using the version must satisfy: its parameters, its ports and the variables it reads. It changes only when that contract does.
- depthinteger · int320–∞How many levels of components the version spans: 1 when it uses no other component.
- expanded_node_countinteger · int320–∞How many steps the version expands into.
- lifecycle_stateComponentLifecycleStateactivedeprecatedsunsetWhere a published version sits in its retirement. A
deprecatedversion still resolves for an exact reference and still runs, but no floating reference selects it — which is what makes deprecating the safe way to retire one. Asunsetversion refuses to resolve at all, exact reference included. - published_atstring
published_byActorSummary
- The ActorSummary schema
- emailstring
- idstring
- usernamestring
- avatar_urlstring or nulloptional
- variable_requirementsarray of EnvironmentVariableName (string)The variables the version's steps read from the pipeline that uses it. Each must be declared on the environment those steps run in, or on a group or repository above the pipeline, or a run is refused when it starts.
- versionComponentVersion (string)
- changelogstring or nulloptional
200 exampleSynthesized example
{
"capability_requirements": [
"capability-requirements-624b",
"capability-requirements-1231"
],
"contract_digest": "contract-digest-1bf8",
"depth": 13,
"expanded_node_count": 2,
"lifecycle_state": "active",
"published_at": "2026-10-10T06:19:28Z",
"published_by": {
"email": "lin@acme.example",
"id": "id-d724",
"username": "mara",
"avatar_url": "https://gitmoap.example/acme/1f497589"
},
"variable_requirements": [
"variable-requirements-9130"
],
"version": "version-3c51",
"changelog": "changelog-6cf3"
}
400The version is not a well-formed version numberapplication/json
Error codes
- BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-4ffa",
"message": "Inline scalar newtypes but keep their brand"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
- UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-5fbf",
"message": "Draw the region map from operation density"
}
}
403Maintainer is required to change a version's lifecycleapplication/json
Error codes
- FORBIDDENYou are signed in but may not do this here;
reasonnames the permission or the rule that refused it - INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs;
required_scopenames it - PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-1d42",
"message": "Stream pipeline status into the run header"
}
}
404No such component or version hereapplication/json
Error codes
- NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-3d4e",
"message": "Inline scalar newtypes but keep their brand"
}
}
409The version is sunset, which is finalapplication/json
Error codes
- CONFLICTThe request conflicts with the resource's current state;
reasonsays how - LEGAL_ACCEPTANCE_REQUIREDAccept the current Terms of Service before changing anything; reading stays open
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
409 exampleSynthesized example
{
"error": {
"code": "code-c8e2",
"message": "Label every synthesized example"
}
}
CLI
gitmoap pipeline-components deprecate-repo-pipeline-component-version
- --repo-ididThe repository's id (id or owner/repo path)
- --component-ididThe component's id
- --versionidAn exact version, such as v1.2.0