Buildpipeline-components
PUT/repositories/{repo_id}/pipeline-components/{component_id}
Replace a component's draft body
update_repo_pipeline_component
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"}
Replaces the component's name, description and draft body with the ones you send. Published versions are untouched: the edit reaches pipelines only once you publish it as a new version, so it cannot break one. Maintainers and above; the new name must not be taken by another component here.
Parameters
Path
- repo_idRepositoryId (string · uuid)The repository's id
- component_idComponentId (string · uuid)The component's id
Request body
application/json- nameComponentName (string)
bodyComponentBodyoptional
- The ComponentBody schema
component_instancesarray of NestedComponentInstanceoptionalOther components this component uses. Always empty in a published version, where they have already been expanded into steps.
- The NestedComponentInstance schema
- component_idComponentId (string · uuid)
- idNodeId (string)
- namestring
- versionComponentVersionRef (string)
- component_refstring or nulloptional
- paramsobjectoptional
- stage_mapobjectoptionalBinds every slot the referenced component declares to a slot of the containing body.
edgesarray of EdgeoptionalConnections between the component's own steps; both ends must be steps of this component.
- The Edge schema
- idEdgeId (string)
- source_node_idNodeId (string)
- target_node_idNodeId (string)
- source_portPortName (string) or nulloptionalAbsent on a dependency-only edge.
- target_portPortName (string) or nulloptionalAbsent on a dependency-only edge.
inputsarray of ComponentInputPortoptional
- The ComponentInputPort schema
- namePortName (string)
- targetsarray of PortRef
- descriptionstring or nulloptional
nodesarray of ComponentNodeoptional
- The ComponentNode schema
- nodeNode
- stage_slotStageSlot (string)Which of the component's stage slots this step is placed in.
- param_slotsComponentNodeParamsoptionalStep fields whose values come from the component's parameters rather than from the step.
outputsarray of ComponentOutputPortoptional
- The ComponentOutputPort schema
- namePortName (string)
- sourcePortRef
- descriptionstring or nulloptional
parametersarray of ComponentParameteroptional
- The ComponentParameter schema
- nameComponentParamName (string)
- param_typeComponentParamTypestringnumberbooleanobjectarrayThe JSON shape a parameter's value must have.
- allowed_valuesarray of object or nulloptionalThe only values this parameter accepts. Absent means any value of its type. On a published parameter, adding this list or removing a value from it is a major version change; adding a value is a minor one.
- defaultobjectoptional
- descriptionstring or nulloptional
- requiredbooleanoptionalWhether a pipeline using the component must supply a value. A required parameter cannot have a default.
- stage_slotsarray of StageSlot (string)optionalThe positions the component's steps occupy, in order. A pipeline using the component maps each slot to one of its own stages.
- descriptionstring or nulloptional
Request body exampleSynthesized example
{
"name": "payments-api"
}
Responses
200The component as stored. Published versions are untouched — this edits only what the next publish would capture, so it cannot break a pipelineapplication/json
bodyComponentBodyThe draft: what the next published version will contain.
- The ComponentBody schema
component_instancesarray of NestedComponentInstanceoptionalOther components this component uses. Always empty in a published version, where they have already been expanded into steps.
- The NestedComponentInstance schema
- component_idComponentId (string · uuid)
- idNodeId (string)
- namestring
- versionComponentVersionRef (string)
- component_refstring or nulloptional
- paramsobjectoptional
- stage_mapobjectoptionalBinds every slot the referenced component declares to a slot of the containing body.
edgesarray of EdgeoptionalConnections between the component's own steps; both ends must be steps of this component.
- The Edge schema
- idEdgeId (string)
- source_node_idNodeId (string)
- target_node_idNodeId (string)
- source_portPortName (string) or nulloptionalAbsent on a dependency-only edge.
- target_portPortName (string) or nulloptionalAbsent on a dependency-only edge.
inputsarray of ComponentInputPortoptional
- The ComponentInputPort schema
- namePortName (string)
- targetsarray of PortRef
- descriptionstring or nulloptional
nodesarray of ComponentNodeoptional
- The ComponentNode schema
- nodeNode
- stage_slotStageSlot (string)Which of the component's stage slots this step is placed in.
- param_slotsComponentNodeParamsoptionalStep fields whose values come from the component's parameters rather than from the step.
outputsarray of ComponentOutputPortoptional
- The ComponentOutputPort schema
- namePortName (string)
- sourcePortRef
- descriptionstring or nulloptional
parametersarray of ComponentParameteroptional
- The ComponentParameter schema
- nameComponentParamName (string)
- param_typeComponentParamTypestringnumberbooleanobjectarrayThe JSON shape a parameter's value must have.
- allowed_valuesarray of object or nulloptionalThe only values this parameter accepts. Absent means any value of its type. On a published parameter, adding this list or removing a value from it is a major version change; adding a value is a minor one.
- defaultobjectoptional
- descriptionstring or nulloptional
- requiredbooleanoptionalWhether a pipeline using the component must supply a value. A required parameter cannot have a default.
- stage_slotsarray of StageSlot (string)optionalThe positions the component's steps occupy, in order. A pipeline using the component maps each slot to one of its own stages.
- created_atstring
created_byActorSummary
- The ActorSummary schema
- emailstring
- idstring
- usernamestring
- avatar_urlstring or nulloptional
- idComponentId (string · uuid)
- nameComponentName (string)
- scopeScopeRef
- updated_atstring
- version_countinteger · int640–∞
- descriptionstring or nulloptional
diagnosticsValidationSummary or nulloptionalProblems found in the draft. A draft is saved even when it is invalid.
- The ValidationSummary schema
- validboolean
violationsarray of ValidationViolation
- The ValidationViolation schema
- codestringStable machine-readable code (e.g.
cycle_detected,type_mismatch,required_input_not_wired). - messagestringHuman-readable description.
- targetValidationTarget
warningsarray of ValidationWarningoptionalThings worth knowing that do not make the definition invalid, such as a deprecated component version. A violation stops a published definition from being saved; a warning never does. Left out when there are none.
- The ValidationWarning schema
- codestringStable machine code — the warning rule's own name, exactly as a violation's is.
- messagestring
- targetValidationTarget
- latest_versionComponentVersion (string) or nulloptional
versionsarray of ComponentVersionSummaryoptionalPublished versions, newest first. Present on a single-component read.
- The ComponentVersionSummary schema
- 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
{
"body": {
"component_instances": [
{
"component_id": "65ac999b-8ff0-4c8d-bb9a-640ad25a380d",
"id": "id-fed1",
"name": "payments-api",
"version": "version-d9d2"
},
{
"component_id": "3f46e29d-3fca-4ceb-84bd-a841e70c9bc8",
"id": "id-84dd",
"name": "payments-api",
"version": "version-5d9c"
}
],
"edges": [
{
"id": "id-438e",
"source_node_id": "aa231a20-ec66-4bd3-988f-1bf590f7c467",
"target_node_id": "a27dc3ea-bf56-49f4-b13b-f898fab5273a"
},
{
"id": "id-d090",
"source_node_id": "809721d8-e739-4d4d-8481-1efc0e0a5102",
"target_node_id": "c5986b2b-7946-4440-a8ee-8078397a1129"
}
],
"inputs": [
{
"name": "payments-api",
"targets": []
},
{
"name": "payments-api",
"targets": []
}
],
"nodes": [
{
"node": {
"capability_id": "54782be6-1f13-4df6-85f6-1ab91a741a55",
"id": "id-8300",
"name": "payments-api"
},
"stage_slot": "stage-slot-7abe"
},
{
"node": {
"capability_id": "bce2b542-5071-4e89-8011-8b85867adc05",
"id": "id-f1ef",
"name": "payments-api"
},
"stage_slot": "stage-slot-c557"
}
],
"outputs": [
{
"name": "payments-api",
"source": {
"node_id": "46b2a977-7230-44c9-b1f9-2ae0f9cc1f83",
"port": "port-86c1"
}
},
{
"name": "payments-api",
"source": {
"node_id": "74e0115f-62fc-49ee-9829-2be27967b434",
"port": "port-50b9"
}
}
],
"parameters": [
{
"name": "payments-api",
"param_type": "string"
}
],
"stage_slots": [
"stage-slots-37e1"
]
},
"created_at": "2026-10-15T22:10:06Z",
"created_by": {
"email": "tomas@acme.example",
"id": "id-da99",
"username": "tomas",
"avatar_url": "https://gitmoap.example/acme/a1216551"
},
"id": "b8c43789-0bb1-40ef-b4b2-5df406d0d815",
"name": "payments-api",
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
},
"updated_at": "2026-10-10T04:03:11Z",
"version_count": 4,
"description": "Renders each region as density contours of its operations.",
"diagnostics": {
"valid": false,
"violations": [
{
"code": "code-1a35",
"message": "Pin a page's payload to the build that rendered it",
"target": {
"kind": "pipeline"
}
},
{
"code": "code-c280",
"message": "Label every synthesized example",
"target": {
"kind": "pipeline"
}
}
],
"warnings": [
{
"code": "code-12c4",
"message": "Label every synthesized example",
"target": {
"kind": "pipeline"
}
}
]
},
"latest_version": "latest-version-87f1",
"versions": [
{
"capability_requirements": [],
"contract_digest": "contract-digest-0f15",
"depth": 57,
"expanded_node_count": 0,
"lifecycle_state": "active",
"published_at": "2026-10-15T20:42:54Z",
"published_by": {
"email": "tomas@acme.example",
"id": "id-9e39",
"username": "tomas"
},
"variable_requirements": [],
"version": "version-3874"
},
{
"capability_requirements": [],
"contract_digest": "contract-digest-0f92",
"depth": 66,
"expanded_node_count": 3,
"lifecycle_state": "active",
"published_at": "2026-10-17T07:15:47Z",
"published_by": {
"email": "tomas@acme.example",
"id": "id-f61b",
"username": "mara"
},
"variable_requirements": [],
"version": "version-5b57"
}
]
}
400The body is malformedapplication/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;
violationslists 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
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-14de",
"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
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-b78a",
"message": "Pin a page's payload to the build that rendered it"
}
}
403Maintainer is required to edit a componentapplication/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-2afe",
"message": "Pin a page's payload to the build that rendered it"
}
}
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
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-fed2",
"message": "Inline scalar newtypes but keep their brand"
}
}
409A component with this name already exists hereapplication/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-d04d",
"message": "Pin a page's payload to the build that rendered it"
}
}
CLI
gitmoap pipeline-components update-repo-pipeline-component
- --repo-ididThe repository's id (id or owner/repo path)
- --component-ididThe component's id
- --bodyjsonoptional
- --descriptionstringoptional
- --namestring