Skip to content
GitmoapAPIBeta
Buildpipeline-components
POST/groups/{group_id}/pipeline-components/{component_id}/versions

Publish the current draft as an immutable version

publish_group_pipeline_component_version
  • pipeline:manage
    A token needs the pipeline:manage scope: Create, update, and delete pipeline definitionsGranted by write_api, write_repository.Every operation this scope unlocks
  • Audited · mutation

    x-gitmoap-audit: {"kind":"audited","arg":"mutation"}

  • Quota · versions per pipeline component

    x-gitmoap-quota: {"kind":"enforced","arg":"versions_per_pipeline_component"}

  • Dry run
    Takes dry_run.

Freezes the current draft as a numbered version that pipelines can reference. The draft must validate, and the number must be at least what the change requires: removing a parameter or a boundary port needs a new major version, adding an optional one a new minor, and a number once published is never reused. The response gives the lowest permitted version and what the publish does to pipelines already using the component, re-checking a sample of them; that report is advisory and never blocks the publish. Pass dry_run=true for the report alone. Maintainers and above; a component holds a limited number of versions.

Parameters

Path
  • group_idGroupId (string · uuid)The group's id
  • component_idComponentId (string · uuid)The component's id
Query
  • dry_runbooleanoptionalReport the lowest permissible version and what would change downstream, and write nothing

Request body

application/json
  • versionComponentVersion (string)
  • changelogstring or nulloptional
Request body exampleSynthesized example
{
"version": "version-c313"
}

Responses

200A dry run: the same report, with nothing writtenapplication/json
  • blast_radiusComponentBlastRadius
    • The ComponentBlastRadius schema
    • floating_pipelinesinteger · int320–∞Pipelines whose reference would resolve to this version.
    • sampledinteger · int320–∞How many of them were re-expanded and re-validated.
    • sample_failuresarray of BlastRadiusFailureoptional
  • capability_requirementsarray of CapabilityId (string)
  • contract_changeContractChangepatchminormajorHow far the contract moved between the last published version and the draft.
  • depthinteger · int320–∞
  • expanded_node_countinteger · int320–∞
  • minimum_versionComponentVersion (string)The lowest version the compatibility gate permits for this contract delta.
  • variable_requirementsarray of EnvironmentVariableName (string)The variables the version's steps read from the pipeline that uses it.
  • versionComponentVersion (string)
200 exampleSynthesized example
{
"blast_radius": {
"floating_pipelines": 55,
"sampled": 27,
"sample_failures": [
{
"pipeline_id": "fa4be2ac-5075-4c95-b143-884a0fc2eafb",
"pipeline_name": "payments-api",
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"violations": {
"valid": false,
"violations": []
}
}
]
},
"capability_requirements": [
"capability-requirements-4e18"
],
"contract_change": "patch",
"depth": 14,
"expanded_node_count": 4,
"minimum_version": "minimum-version-03ae",
"variable_requirements": [
"variable-requirements-ce7e",
"variable-requirements-b47f"
],
"version": "version-df30"
}
201The version as published, with the lowest number this change permitted and what it would do to the pipelines already referencing this componentapplication/json
  • blast_radiusComponentBlastRadius
    • The ComponentBlastRadius schema
    • floating_pipelinesinteger · int320–∞Pipelines whose reference would resolve to this version.
    • sampledinteger · int320–∞How many of them were re-expanded and re-validated.
    • sample_failuresarray of BlastRadiusFailureoptional
  • capability_requirementsarray of CapabilityId (string)
  • contract_changeContractChangepatchminormajorHow far the contract moved between the last published version and the draft.
  • depthinteger · int320–∞
  • expanded_node_countinteger · int320–∞
  • minimum_versionComponentVersion (string)The lowest version the compatibility gate permits for this contract delta.
  • variable_requirementsarray of EnvironmentVariableName (string)The variables the version's steps read from the pipeline that uses it.
  • versionComponentVersion (string)
201 exampleSynthesized example
{
"blast_radius": {
"floating_pipelines": 70,
"sampled": 56,
"sample_failures": [
{
"pipeline_id": "d39d7539-a5bd-42d0-a437-684275660706",
"pipeline_name": "payments-api",
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"violations": {
"valid": false,
"violations": []
}
}
]
},
"capability_requirements": [
"capability-requirements-01ea"
],
"contract_change": "patch",
"depth": 26,
"expanded_node_count": 5,
"minimum_version": "minimum-version-a9f2",
"variable_requirements": [
"variable-requirements-f96e"
],
"version": "version-865b"
}
400The draft does not validate, or the requested version is below what this change permits. Removing a parameter or a boundary port needs a major version; adding an optional one needs a minorapplication/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • PIPELINE_VALIDATION_FAILEDThe pipeline definition is invalid; violations lists every problem, so all of them can be fixed at once
  • 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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-c511",
"message": "Pin a page's payload to the build that rendered it"
}
}
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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-978f",
"message": "Stream pipeline status into the run header"
}
}
403Maintainer is required to publish a versionapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names 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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-e293",
"message": "Stream pipeline status into the run header"
}
}
404No such component 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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-8980",
"message": "Stream pipeline status into the run header"
}
}
409This version is already published. A version's contents never change, so it is never reusedapplication/json
Error codes
  • CONFLICTThe request conflicts with the resource's current state; reason says 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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-43e6",
"message": "Stream pipeline status into the run header"
}
}
429The component's version quota is exhaustedapplication/json
Error codes
  • TOO_MANY_REQUESTSRetryableA quota, a rate limit or a transfer budget is spent. When the response carries Retry-After, retry after that many seconds
  • 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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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.
429 exampleSynthesized example
{
"error": {
"code": "code-094b",
"message": "Pin a page's payload to the build that rendered it"
}
}

CLI

gitmoap pipeline-components publish-group-pipeline-component-version

  • --group-ididThe group's id (id or group path)
  • --component-ididThe component's id
  • --dry-runflagoptionalReport the lowest permissible version and what would change downstream, and write nothing
  • --changelogstringoptional
  • --versionstring

Used in these guides