Skip to content
GitmoapAPIBeta
Buildpipeline-components
GET/repositories/{repo_id}/pipeline-components/{component_id}/upgrade-impact

Report how far every consumer is from one published version

get_repo_component_upgrade_impact
  • pipeline:read
    A token needs the pipeline:read scope: View pipeline runs and definitionsGranted by read_api, read_repository, write_api, write_repository.Every operation this scope unlocks

For every pipeline using the component, reports the version its reference selects and whether reaching the target needs an edit to the pipeline, and re-checks a sample against the target to show whether they would still be valid. The target defaults to the newest published version; a component with nothing published is not found. Pipelines in repositories you cannot read are left out.

Parameters

Path
  • repo_idRepositoryId (string · uuid)The repository's id
  • component_idComponentId (string · uuid)The component's id
Query
  • target_versionstringoptionalThe version to measure against. Defaults to the newest published one

Responses

200Each consumer, the version its reference selects, and whether it needs an edit to reach the target — plus a sample re-checked against the target to see whether it would still be a valid pipeline. A consumer in a repository the caller cannot read is left outapplication/json
  • needs_repininteger · int320–∞
  • on_targetinteger · int320–∞
  • sampledinteger · int320–∞How many consumers were re-expanded against the target to see whether they still validate.
  • target_versionComponentVersion (string)
  • total_usagesinteger · int320–∞
  • unresolvableinteger · int320–∞
  • entriesarray of ComponentUpgradeEntryoptional
    • The ComponentUpgradeEntry schema
    • dispositionUpgradeDispositionon_targetneeds_repinunresolvableWhere a pipeline using the component stands against the target version: on_target (its reference already selects it), needs_repin (its reference has to be changed to reach it) or unresolvable (its reference selects no version at all, because every candidate has been retired).
    • instance_idNodeId (string)
    • pipeline_idPipelineId (string · uuid)
    • pipeline_namePipelineName (string)
    • repository_idRepositoryId (string · uuid)
    • version_refComponentVersionRef (string)
    • resolves_toComponentVersion (string) or nulloptionalThe version the pipeline's reference selects at the moment — for a floating reference, possibly newer than when the pipeline was last saved. Absent when it selects none.
  • sample_failuresarray of BlastRadiusFailureoptional
    • The BlastRadiusFailure schema
    • pipeline_idPipelineId (string · uuid)
    • pipeline_namePipelineName (string)
    • repository_idRepositoryId (string · uuid)
    • violationsValidationSummary
      • 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.
  • truncatedbooleanoptionalTrue when the component has more consumers than one report covers. The remainder are reached by narrowing to a target version, or by reading the usage listing directly.
200 exampleSynthesized example
{
"needs_repin": 18,
"on_target": 49,
"sampled": 76,
"target_version": "target-version-02fe",
"total_usages": 7,
"unresolvable": 78,
"entries": [
{
"disposition": "on_target",
"instance_id": "1a08a280-3f80-4b00-ace4-02e2ec11a2e4",
"pipeline_id": "5ab5869a-5112-4ab0-b820-d09158632c54",
"pipeline_name": "payments-api",
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"version_ref": "version-ref-23f6"
},
{
"disposition": "on_target",
"instance_id": "86e3bc19-efa9-4cd6-a858-f08ac4b08917",
"pipeline_id": "801ed23d-ea0a-4804-9dcb-bb4c97ce6832",
"pipeline_name": "payments-api",
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"version_ref": "version-ref-d752"
}
],
"sample_failures": [
{
"pipeline_id": "ed476f93-4e57-449a-885f-b0f6471015fb",
"pipeline_name": "payments-api",
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"violations": {
"valid": false,
"violations": []
}
}
],
"truncated": false
}
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 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-8edc",
"message": "Label every synthesized example"
}
}
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-b2ed",
"message": "Draw the region map from operation density"
}
}
403Reporter is required to read componentsapplication/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-6dfd",
"message": "Label every synthesized example"
}
}
404No such component here, or the component has no published version to measure againstapplication/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-3d9f",
"message": "Draw the region map from operation density"
}
}

CLI

gitmoap pipeline-components get-repo-component-upgrade-impact

  • --repo-ididThe repository's id (id or owner/repo path)
  • --component-ididThe component's id
  • --target-versionstringoptionalThe version to measure against. Defaults to the newest published one

Used in these guides