Skip to content
GitmoapAPIBeta
Shipcatalog
GET/repositories/{repo_id}/catalog/environments

List a repository's environments

list_repo_environments
  • catalog:read
    A token needs the catalog:read scope: Read the service catalog: services, their bindings, their owners and their overviewsGranted by read_api, write_api.Every operation this scope unlocks
  • Filtered across resources

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

  • Paginated
    Pass the next_token a page returns to get the next one.

Returns the environments the repository declares, alphabetically by slug, leaving out archived ones unless include_archived=true. With inherited=true the ancestor groups' environments are included too, a nearer slug shadowing a farther one: the set a pipeline in this repository can deploy to, minus any owned by a group you cannot see. Filter by tier or search; pages hold up to 100 environments (20 by default). Reporters and above may call it: environments are not public, even on a public repository.

Parameters

Path
  • repo_idRepositoryId (string · uuid)The owning repository's id
Query
  • tierstringoptionalFilter by tier
  • include_archivedbooleanoptionalInclude archived environments (excluded by default)
  • inheritedbooleanoptionalAlso return the ancestor-group environments this repository may reference — what a pipeline author needs, since a node's environment: resolves up the chain
  • searchstringoptionalMatch the slug or display name
  • limitinteger · int32optionalPage size (1-100, default 20)
  • next_tokenstringoptionalPagination cursor

Responses

200The repository's environments, alphabeticalapplication/json
  • itemsarray of object
    • archivedboolean
    • environment_idEnvironmentId (string · uuid)
    • slugEnvironmentSlug (string)
    • tierEnvironmentTierdevelopmenttestingstagingproductionWhat kind of environment this is, whatever it is called: development, testing, staging or production. A production environment is protected by default.
    • display_namestring or nulloptional
    • urlstring or nulloptional
  • next_tokenstring or nulloptional
200 exampleSynthesized example
{
"items": [
{
"archived": false,
"environment_id": "6662a402-f68c-4b97-92de-f7993788ff9d",
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
},
"slug": "slug-47b4",
"tier": "development"
}
],
"next_token": "next-token-2ab2"
}
400Unknown filter value or malformed cursorapplication/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-d41e",
"message": "Draw the region map from operation density"
}
}
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-b419",
"message": "Label every synthesized example"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/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-23a8",
"message": "Stream pipeline status into the run header"
}
}
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-cdd2",
"message": "Stream pipeline status into the run header"
}
}

CLI

gitmoap catalog list-repo-environments

  • --repo-ididThe owning repository's id (id or owner/repo path)
  • --include-archivedflagoptionalInclude archived environments (excluded by default)
  • --inheritedflagoptionalAlso return the ancestor-group environments this repository may reference — what a pipeline author needs, since a node's `environment:` resolves up the chain
  • --limitnumberoptionalPage size (1-100, default 20)
  • --next-tokenstringoptionalPagination cursor
  • --searchstringoptionalMatch the slug or display name
  • --tierstringoptionalFilter by tier

Used in these guides