Dominio de acciones
environment
Todas las acciones que este dominio expone vía gitlab_execute_action, del manifiesto gitlab://tools. Cada entrada se despliega a su descripción completa y sus parámetros obligatorios.
24 · acciones6 · destructivas9 · solo lectura
Contado contra gitlab.com, que es el único host con el que habla este endpoint, con un token que resuelve como Ultimate: para usarlo contra una instancia self-managed, levanta tú el servidor — su documentación lo cubre. El catálogo depende del token que pregunta, así que el recuento se mueve con su tier y con sus permisos: un token Free ve menos acciones, quien es miembro de un grupo con plan de pago ve las de ese plan, y los dominios de administración solo aparecen a tokens autorizados a usarlos. Por eso las cifras difieren en otros sitios: el proyecto upstream cuenta 872 operaciones en Community Edition y hasta 1.099 en el tier más alto de GitLab.com, mientras que este despliegue publica 980 porque es solo-OAuth y actúa con tu token, así que los dominios de administración que una cuenta sin admin no puede llamar no aparecen nunca. Las tres describen el mismo catálogo, contado desde tres sitios distintos.
Cada entrada dice también qué necesita un token de acceso personal fine-grained de GitLab para ejecutarla, tal como lo declara GitLab 19.6.1: todos los permisos de una línea, en uno de los ámbitos indicados. Cuando hay alternativas, basta con cualquiera. Lo que sigue a «Algunas llamadas necesitan además» solo lo necesitan las llamadas que envían esa petición, y las partes de la respuesta que GitLab sirve vacías a ese token van aparte.
Volver a la ficha del servidor
Environment Createenvironment.createCreate an environment in a project. Use when introducing new runtime targets such as review, staging, or production environments.
Parámetros obligatorios:
name (string),project_id (string|integer)Token fine-grained:
Environment: Createen proyecto
Environment Deletedestructivaenvironment.deleteDelete a stopped environment from a project. Returns: a success confirmation naming the deleted environment. See also:
environment.stop,environment.list,environment.get.Parámetros obligatorios:
environment_id (integer),project_id (string|integer)Token fine-grained:
Environment: Deleteen proyecto
Deployment Approve Or Rejectenvironment.deployment_approve_or_rejectApprove 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.Parámetros obligatorios:
deployment_id (integer),project_id (string|integer),status (string)Token fine-grained:
Deployment: Approveen proyecto
Deployment Createenvironment.deployment_createCreate 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.Parámetros obligatorios:
environment (string),project_id (string|integer),ref (string),sha (string),status (string),tag (boolean)Token fine-grained:
Deployment: Createen proyecto
Deployment Deletedestructivaenvironment.deployment_deleteDelete 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.Parámetros obligatorios:
deployment_id (integer),project_id (string|integer)Token fine-grained:
Deployment: Deleteen proyecto
Deployment Getsolo lecturaenvironment.deployment_getGet one deployment by deployment_id for a project. Use when investigating a specific deployment state, environment, or actor metadata.
Parámetros obligatorios:
deployment_id (integer),project_id (string|integer)Token fine-grained:
Deployment: Readen proyecto
Deployment Listsolo lecturaenvironment.deployment_listList 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.Parámetros obligatorios:
project_id (string|integer)Token fine-grained:
Deployment: Readen proyecto
List Deployment Merge Requestssolo lecturaenvironment.deployment_merge_requestsList 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.Parámetros obligatorios:
deployment_id (integer),project_id (string|integer)Token fine-grained:
Deployment: ReadyMerge Request: Readen proyecto
Deployment Updateenvironment.deployment_updateUpdate 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.Parámetros obligatorios:
deployment_id (integer),project_id (string|integer),status (string)Token fine-grained:
Deployment: Updateen proyecto
Create Freeze Periodenvironment.freeze_createCreate a deploy freeze period for a project. Returns: the created freeze period with id, freeze_start/freeze_end cron expressions, and cron_timezone.
Parámetros obligatorios:
freeze_end (string),freeze_start (string),project_id (string|integer)Token fine-grained:
Freeze Period: Createen proyecto
Delete Freeze Perioddestructivaenvironment.freeze_deleteDelete a deploy freeze period. Returns: no content on success (HTTP 204).
Parámetros obligatorios:
freeze_period_id (integer),project_id (string|integer)Token fine-grained:
Freeze Period: Deleteen proyecto
Get Freeze Periodsolo lecturaenvironment.freeze_getGet a specific deploy freeze period. Returns: the freeze period's id, freeze_start/freeze_end cron expressions, cron_timezone, and created/updated timestamps.
Parámetros obligatorios:
freeze_period_id (integer),project_id (string|integer)Token fine-grained:
Freeze Period: Readen proyecto
List Freeze Periodssolo lecturaenvironment.freeze_listList deploy freeze periods for a project. Returns: each freeze period's id, freeze_start/freeze_end cron expressions, cron_timezone, and created/updated timestamps.
Parámetros obligatorios:
project_id (string|integer)Token fine-grained:
Freeze Period: Readen proyecto
Update Freeze Periodenvironment.freeze_updateUpdate an existing deploy freeze period. Returns: the updated freeze period with id, freeze_start/freeze_end cron expressions, and cron_timezone.
Parámetros obligatorios:
freeze_period_id (integer),project_id (string|integer)Token fine-grained:
Freeze Period: Updateen proyecto
Environment Getsolo lecturaenvironment.getGet one environment by environment_id. Use when inspecting state, tier, external URL, and stop behavior of a specific environment.
Parámetros obligatorios:
environment_id (integer),project_id (string|integer)Token fine-grained:
Environment: Readen proyecto
Environment Listsolo lecturaenvironment.listList environments in one project with filters and pagination. Use this to discover environment IDs before get/update/stop/delete operations.
Parámetros obligatorios:
project_id (string|integer)Token fine-grained:
Environment: Readen proyecto
Protected Environment Getsolo lecturaenvironment.protected_getGet 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.Parámetros obligatorios:
environment (string),project_id (string|integer)Token fine-grained:
Protected Environment: Readen proyecto
Protected Environment Listsolo lecturaenvironment.protected_listList 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.Parámetros obligatorios:
project_id (string|integer)Token fine-grained:
Protected Environment: Readen proyecto
Protected Environment Protectenvironment.protected_protectProtect 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.Parámetros obligatorios:
deploy_access_levels (array),name (string),project_id (string|integer)Token fine-grained:
Protected Environment: Createen proyecto
Protected Environment Unprotectdestructivaenvironment.protected_unprotectUnprotect 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.Parámetros obligatorios:
environment (string),project_id (string|integer)Token fine-grained:
Protected Environment: Deleteen proyecto
Protected Environment Updateenvironment.protected_updateUpdate 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.Parámetros obligatorios:
environment (string),project_id (string|integer)Token fine-grained:
Protected Environment: Updateen proyecto
Environment Stopdestructivaenvironment.stopStop 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.
Parámetros obligatorios:
environment_id (integer),project_id (string|integer)Token fine-grained:
Environment: Stopen proyecto
Environment Stop Staledestructivaenvironment.stop_staleStop 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.Parámetros obligatorios:
before (string),project_id (string|integer)Token fine-grained:
Environment: Stopen proyecto
Environment Updateenvironment.updateUpdate 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.Parámetros obligatorios:
environment_id (integer),project_id (string|integer)Token fine-grained:
Environment: Updateen proyecto. Algunas llamadas necesitan además:Environment: Readen proyecto