GitLab API

GitlabTool

Actions905

Overview

This node operation stops a specific environment within a GitLab project by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/environments/{environment_id}/stop`. It is useful for automating environment lifecycle management in CI/CD pipelines or project management workflows, such as stopping a deployment environment when it is no longer needed.

Use Case Examples

  1. Stopping a staging environment after tests complete to save resources.
  2. Automating environment shutdowns in a GitLab project as part of a cleanup process.

Properties

Name Meaning
Skip Authentication If true, the node will skip using authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, defaulting to POST for this operation.
Path Parameters Parameters required in the URL path to identify the project and environment to stop.

Output

JSON

  • response - The JSON response from the GitLab API after stopping the environment, typically containing details about the stopped environment or operation status.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and environment ID are correct and accessible by the authenticated user to avoid 404 or permission errors.
  • If authentication is skipped, the API request may fail due to lack of authorization.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the correct API endpoint is targeted.

Links

Discussion