Skip to content
GitmoapAPIBeta
Buildpipeline-components
POST/repositories/{repo_id}/pipeline-components

Create a reusable pipeline component

create_repo_pipeline_component
  • 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 · pipeline components per scope

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

Creates a component in this repository: a named, parameterised set of pipeline nodes its pipelines can reuse. The body stays a draft until you publish a version, and nothing can reference the component before then; an invalid draft is kept and reported rather than refused. Maintainers and above may create one. The name must be unique here, and a repository holds a limited number of components.

Parameters

Path
  • repo_idRepositoryId (string · uuid)The repository'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
    • 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
    • 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

201The component as stored. Its body is a draft until a version is published, and nothing can reference it before thenapplication/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
    • 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
    • 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
  • idComponentId (string · uuid)
  • nameComponentName (string)
  • 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
    • 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.
  • 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 deprecated version 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. A sunset version refuses to resolve at all, exact reference included.
    • published_atstring
    • published_byActorSummary
    • 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
201 exampleSynthesized example
{
"body": {
"component_instances": [
{
"component_id": "e5869417-0057-4d6f-88c2-1472a448b3b7",
"id": "id-a69f",
"name": "payments-api",
"version": "version-8729"
},
{
"component_id": "b8d4523b-4e2b-4457-b47e-076c015ba787",
"id": "id-5ee9",
"name": "payments-api",
"version": "version-45af"
}
],
"edges": [
{
"id": "id-4a21",
"source_node_id": "fffed202-08d4-41a4-8080-6ce99dc3b7bc",
"target_node_id": "39239dac-8107-4842-974f-c9d60358c1f3"
}
],
"inputs": [
{
"name": "payments-api",
"targets": []
}
],
"nodes": [
{
"node": {
"capability_id": "ec248198-cb4a-4b2a-a0b0-913430ffa975",
"id": "id-223b",
"name": "payments-api"
},
"stage_slot": "stage-slot-98d5"
},
{
"node": {
"capability_id": "392aba5d-5c97-4382-b795-1cd6781d1e83",
"id": "id-2c05",
"name": "payments-api"
},
"stage_slot": "stage-slot-a60a"
}
],
"outputs": [
{
"name": "payments-api",
"source": {
"node_id": "1ac64813-3ec5-490f-a0f9-31e81ed8a45b",
"port": "port-9569"
}
},
{
"name": "payments-api",
"source": {
"node_id": "ebeb3a68-ab4c-462a-bab6-e2dd89c13e3d",
"port": "port-0e95"
}
}
],
"parameters": [
{
"name": "payments-api",
"param_type": "string"
}
],
"stage_slots": [
"stage-slots-6926",
"stage-slots-2de3"
]
},
"created_at": "2026-10-11T15:16:30Z",
"created_by": {
"email": "tomas@acme.example",
"id": "id-7f07",
"username": "tomas",
"avatar_url": "https://gitmoap.example/acme/f5e6e620"
},
"id": "117d417c-1e30-4997-9a2b-fd19973f925f",
"name": "payments-api",
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
},
"updated_at": "2026-10-11T09:24:19Z",
"version_count": 7,
"description": "Renders each region as density contours of its operations.",
"diagnostics": {
"valid": false,
"violations": [
{
"code": "code-0495",
"message": "Stream pipeline status into the run header",
"target": {
"kind": "pipeline"
}
},
{
"code": "code-7d35",
"message": "Pin a page's payload to the build that rendered it",
"target": {
"kind": "pipeline"
}
}
],
"warnings": [
{
"code": "code-2043",
"message": "Draw the region map from operation density",
"target": {
"kind": "pipeline"
}
},
{
"code": "code-6b3c",
"message": "Stream pipeline status into the run header",
"target": {
"kind": "pipeline"
}
}
]
},
"latest_version": "latest-version-9e03",
"versions": [
{
"capability_requirements": [],
"contract_digest": "contract-digest-14b4",
"depth": 75,
"expanded_node_count": 7,
"lifecycle_state": "active",
"published_at": "2026-10-10T00:56:47Z",
"published_by": {
"email": "mara@acme.example",
"id": "id-4fe9",
"username": "lin"
},
"variable_requirements": [],
"version": "version-29da"
},
{
"capability_requirements": [],
"contract_digest": "contract-digest-0a9a",
"depth": 59,
"expanded_node_count": 7,
"lifecycle_state": "active",
"published_at": "2026-10-09T15:18:06Z",
"published_by": {
"email": "mara@acme.example",
"id": "id-54eb",
"username": "mara"
},
"variable_requirements": [],
"version": "version-310b"
}
]
}
400The body is malformed — an unknown stage slot, a duplicate identifier, a parameter reference nothing declares, or a node field a component may not carryapplication/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-1260",
"message": "Inline scalar newtypes but keep their brand"
}
}
401application/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-2899",
"message": "Label every synthesized example"
}
}
403Maintainer is required to create a componentapplication/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-f7a4",
"message": "Label every synthesized example"
}
}
404No such repository, or it is not visible to the callerapplication/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-0844",
"message": "Label every synthesized example"
}
}
409A component with this name already exists hereapplication/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-0d3e",
"message": "Label every synthesized example"
}
}
429The scope's component 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-4d72",
"message": "Inline scalar newtypes but keep their brand"
}
}

CLI

gitmoap pipeline-components create-repo-pipeline-component

  • --repo-ididThe repository's id (id or owner/repo path)
  • --bodyjsonoptional
  • --descriptionstringoptional
  • --namestring

Used in these guides