Skip to content
GitmoapAPIBeta
Buildpipelines
GET/repositories/{repo_id}/pipelines/{pipeline_id}/triggers

The trigger configuration in effect for a pipeline at one ref

list_pipeline_triggers
  • 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
  • Single-resource

    x-gitmoap-isolation: {"kind":"single_or_self_scoped"}

Answers "will a push to this branch run this pipeline?" without the caller having to reason about globs. The response names the ref it answered for, because a pipeline's triggers are what its author declared at that ref and an answer without one would read as universal.

Parameters

Path
  • repo_idRepositoryId (string · uuid)Repository id
  • pipeline_idPipelineId (string · uuid)Pipeline id
Query
  • ref_namestringoptionalFull ref; defaults to the repository's default branch

Responses

200The triggers in effect at this refapplication/json
  • itemsarray of PipelineTrigger
    • The PipelineTrigger schema
    • idPipelineTriggerId (string · uuid)
    • kindTriggerKindpushmerge_requesttagschedulemanualWhat caused a run to start.
    • ordinalinteger · int320–∞The trigger's position in the pipeline's list of triggers, counting from zero.
    • repository_idRepositoryId (string · uuid)
    • actionsarray of MrAction: one of opened | synchronized | reopened | mergedoptionalWhich merge-request events the trigger responds to. Empty for other kinds of trigger.
    • allow_pipeline_triggeredbooleanoptional
    • buildMrBuildTargetmerge_resultsourceor nulloptionalWhich commit a merge-request trigger builds: merge_result (the default — the commit merging would produce) or source (the source branch's own tip).
    • cronstring or nulloptional
    • pathsarray of stringoptional
    • patternstring or nulloptionalThe branch or tag pattern. Absent means every ref of its kind.
    • pipeline_idPipelineId (string · uuid) or nulloptional
    • ref_namestring or nulloptionalFor a pipeline defined in a file, the ref the trigger was read from. Absent for a pipeline defined through the API, whose triggers apply to every ref of their kind.
    • source_shastring or nulloptionalThe commit a file-authored projection was read at, so a client can say as declared at `a1b2c3` rather than implying the answer is universal.
    • stemstring or nulloptionalFor a pipeline defined in a file, the file's path (.gitmoap/pipelines/…) without its extension. Absent for a pipeline defined through the API.
  • ref_namestringThe full ref these triggers were resolved for.
200 exampleSynthesized example
{
"items": [
{
"id": "b994f6dd-acde-447a-9649-c53c308bc3e3",
"kind": "push",
"ordinal": 0,
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70"
},
{
"id": "2c09fbba-1b67-450f-a143-e67aaf4bfa06",
"kind": "push",
"ordinal": 49,
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70"
}
],
"ref_name": "payments-api"
}
400Bad request — a path parameter is not a well-formed value of its typeapplication/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-3c9d",
"message": "Stream pipeline status into the run header"
}
}
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-d309",
"message": "Draw the region map from operation density"
}
}
403application/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-0f20",
"message": "Pin a page's payload to the build that rendered it"
}
}
404Repository or pipeline absent, or Private and the caller is not a memberapplication/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-b74b",
"message": "Inline scalar newtypes but keep their brand"
}
}

CLI

gitmoap pipelines list-triggers

  • --repo-ididRepository id (id or owner/repo path)
  • --pipeline-ididPipeline id
  • --ref-namestringoptionalFull ref; defaults to the repository's default branch

Used in these guides