Action domain

environment

Every action this domain exposes through gitlab_execute_action, from the gitlab://tools manifest. Each entry folds out to its full upstream description and required parameters.

24 · actions6 · destructive9 · read-only

Counted against gitlab.com, which is the only host this endpoint talks to, with a token it resolves to the Ultimate tier: to use it against a self-managed instance, run the server yourself — its documentation covers that. The catalog is scoped to the token that asks, so the count moves with both its tier and its permissions: a Free token sees fewer actions, a member of a group on a paid plan sees that plan's, and administration domains only appear to tokens allowed to use them. That is why the figures differ elsewhere: the upstream project counts 872 operations on Community Edition and up to 1,099 on GitLab.com's top tier, while this deployment publishes 980 because it is OAuth-only and acts with your token, so the administration domains a non-admin account cannot call never appear. All three describe the same catalog, counted from three vantage points.

Each entry also says what a GitLab fine-grained personal access token needs to run it, as GitLab 19.6.1 declares it: every permission of one line, at one of the boundaries named. Where there are alternatives, any one is enough. What follows "Some calls also need" is needed only by the calls that send that request, and the parts of the answer GitLab serves empty to such a token are listed apart.

Back to the server card

  1. environment.create

    Environment Create

    Create an environment in a project. Use when introducing new runtime targets such as review, staging, or production environments.

    Required parameters: name (string), project_id (string|integer)

    Fine-grained token: Environment: Create at project

  2. environment.delete

    Environment Deletedestructive

    Delete a stopped environment from a project. Returns: a success confirmation naming the deleted environment. See also: environment.stop, environment.list, environment.get.

    Required parameters: environment_id (integer), project_id (string|integer)

    Fine-grained token: Environment: Delete at project

  3. environment.deployment_approve_or_reject

    Deployment Approve Or Reject

    Approve or reject a blocked deployment awaiting protected-environment approval, optionally with a comment and an approval rule to represent. Returns: a confirmation message naming the deployment and the applied status. See also: environment.deployment_get, environment.deployment_update.

    Required parameters: deployment_id (integer), project_id (string|integer), status (string)

    Fine-grained token: Deployment: Approve at project

  4. environment.deployment_create

    Deployment Create

    Create a deployment record for an environment at a given ref and sha with an initial status. Returns: the created deployment with id, iid, ref, sha, status, and nested user, environment, and deployable objects. See also: environment.get, environment.deployment_list, environment.deployment_update.

    Required parameters: environment (string), project_id (string|integer), ref (string), sha (string), status (string), tag (boolean)

    Fine-grained token: Deployment: Create at project

  5. environment.deployment_delete

    Deployment Deletedestructive

    Delete a deployment record by deployment_id within a project. Returns: a confirmation that the deployment was deleted. See also: environment.deployment_get, environment.deployment_list.

    Required parameters: deployment_id (integer), project_id (string|integer)

    Fine-grained token: Deployment: Delete at project

  6. environment.deployment_get

    Deployment Getread-only

    Get one deployment by deployment_id for a project. Use when investigating a specific deployment state, environment, or actor metadata.

    Required parameters: deployment_id (integer), project_id (string|integer)

    Fine-grained token: Deployment: Read at project

  7. environment.deployment_list

    Deployment Listread-only

    List deployments in a project with environment, status, and date filters plus offset pagination. Returns: matching deployments with ref, sha, status, user, environment, and deployable (CI job) objects, and pagination metadata. See also: environment.deployment_get, environment.list, pipeline.get.

    Required parameters: project_id (string|integer)

    Fine-grained token: Deployment: Read at project

  8. environment.deployment_merge_requests

    List Deployment Merge Requestsread-only

    List the merge requests associated with a deployment, with merge-request filtering (state, approval, author, assignee, draft, created date) and offset pagination. Returns: matching merge requests with full metadata (author, assignees, reviewers, labels, milestone, pipelines, time stats, timestamps) and pagination metadata. See also: merge_request.get, merge_request.list, environment.deployment_list.

    Required parameters: deployment_id (integer), project_id (string|integer)

    Fine-grained token: Deployment: Read and Merge Request: Read at project

  9. environment.deployment_update

    Deployment Update

    Update a deployment's status by deployment_id within a project. Returns: the updated deployment with id, iid, ref, sha, status, and nested user, environment, and deployable objects. See also: environment.deployment_get, environment.deployment_list, environment.deployment_approve_or_reject.

    Required parameters: deployment_id (integer), project_id (string|integer), status (string)

    Fine-grained token: Deployment: Update at project

  10. environment.freeze_create

    Create Freeze Period

    Create a deploy freeze period for a project. Returns: the created freeze period with id, freeze_start/freeze_end cron expressions, and cron_timezone.

    Required parameters: freeze_end (string), freeze_start (string), project_id (string|integer)

    Fine-grained token: Freeze Period: Create at project

  11. environment.freeze_delete

    Delete Freeze Perioddestructive

    Delete a deploy freeze period. Returns: no content on success (HTTP 204).

    Required parameters: freeze_period_id (integer), project_id (string|integer)

    Fine-grained token: Freeze Period: Delete at project

  12. environment.freeze_get

    Get Freeze Periodread-only

    Get a specific deploy freeze period. Returns: the freeze period's id, freeze_start/freeze_end cron expressions, cron_timezone, and created/updated timestamps.

    Required parameters: freeze_period_id (integer), project_id (string|integer)

    Fine-grained token: Freeze Period: Read at project

  13. environment.freeze_list

    List Freeze Periodsread-only

    List deploy freeze periods for a project. Returns: each freeze period's id, freeze_start/freeze_end cron expressions, cron_timezone, and created/updated timestamps.

    Required parameters: project_id (string|integer)

    Fine-grained token: Freeze Period: Read at project

  14. environment.freeze_update

    Update Freeze Period

    Update an existing deploy freeze period. Returns: the updated freeze period with id, freeze_start/freeze_end cron expressions, and cron_timezone.

    Required parameters: freeze_period_id (integer), project_id (string|integer)

    Fine-grained token: Freeze Period: Update at project

  15. environment.get

    Environment Getread-only

    Get one environment by environment_id. Use when inspecting state, tier, external URL, and stop behavior of a specific environment.

    Required parameters: environment_id (integer), project_id (string|integer)

    Fine-grained token: Environment: Read at project

  16. environment.list

    Environment Listread-only

    List environments in one project with filters and pagination. Use this to discover environment IDs before get/update/stop/delete operations.

    Required parameters: project_id (string|integer)

    Fine-grained token: Environment: Read at project

  17. environment.protected_get

    Protected Environment Getread-only

    Get a single protected (or wildcard) environment by name. Returns: the environment with its deploy access levels (id, access level, user/group, group inheritance) and approval rules. See also: environment.protected_list, environment.protected_update, environment.protected_unprotect.

    Required parameters: environment (string), project_id (string|integer)

    Fine-grained token: Protected Environment: Read at project

  18. environment.protected_list

    Protected Environment Listread-only

    List protected environments in a project with order_by/sort and offset pagination. Returns: protected environments with their deploy access levels, required approval count, approval rules, and pagination metadata. See also: environment.protected_get, environment.protected_protect, environment.list.

    Required parameters: project_id (string|integer)

    Fine-grained token: Protected Environment: Read at project

  19. environment.protected_protect

    Protected Environment Protect

    Protect a single environment or wildcard with deploy access levels, each naming exactly one of access_level, user_id or group_id, and approval rules, each naming at least one. Returns: the newly protected environment with its deploy access levels, required approval count, and approval rules. See also: environment.protected_get, environment.protected_update, environment.protected_unprotect.

    Required parameters: deploy_access_levels (array), name (string), project_id (string|integer)

    Fine-grained token: Protected Environment: Create at project

  20. environment.protected_unprotect

    Protected Environment Unprotectdestructive

    Unprotect a single environment or wildcard, removing its deployment gates. Returns: a success confirmation naming the unprotected environment. See also: environment.protected_list, environment.protected_protect.

    Required parameters: environment (string), project_id (string|integer)

    Fine-grained token: Protected Environment: Delete at project

  21. environment.protected_update

    Protected Environment Update

    Update a protected environment's deploy access levels and approval rules. An entry with the id of an existing one changes it, or removes it with _destroy true, and an entry without an id adds one: a new deploy access level names exactly one of access_level, user_id or group_id, and every approval rule but a removal names at least one. Returns: the updated environment with its deploy access levels, required approval count, and approval rules. See also: environment.protected_get, environment.protected_protect, environment.protected_unprotect.

    Required parameters: environment (string), project_id (string|integer)

    Fine-grained token: Protected Environment: Update at project

  22. environment.stop

    Environment Stopdestructive

    Stop an active environment. This is modeled as a delete-style action but intentionally marked non-destructive because it changes runtime state without deleting the environment resource.

    Required parameters: environment_id (integer), project_id (string|integer)

    Fine-grained token: Environment: Stop at project

  23. environment.stop_stale

    Environment Stop Staledestructive

    Stop every environment of a project last modified or deployed to before a time, protected environments excepted, and the stops run in the background. Returns: the request's status and GitLab's message. See also: environment.list, environment.stop, environment.delete.

    Required parameters: before (string), project_id (string|integer)

    Fine-grained token: Environment: Stop at project

  24. environment.update

    Environment Update

    Update an existing environment in a project. Returns: the updated environment with state, tier, external URL, cluster agent, Kubernetes namespace, Flux resource path, and auto-stop settings. See also: environment.get, environment.list, environment.stop.

    Required parameters: environment_id (integer), project_id (string|integer)

    Fine-grained token: Environment: Update at project. Some calls also need: Environment: Read at project