GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves details of a specific environment within a GitLab project using the GitLab API. It is useful for scenarios where you need to fetch environment information such as deployment status or configuration for a given project and environment ID. For example, it can be used in CI/CD pipelines to monitor or audit environment states.

Use Case Examples

  1. Fetch environment details for project ID '123' and environment ID '456' to check deployment status.
  2. Retrieve configuration of a specific environment in a GitLab project for reporting or automation.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance to which the API request is sent.
Method HTTP method used for the API request, default is GET.
Path Parameters Parameters to specify the project ID and environment ID for the API request.

Output

JSON

  • id - The unique identifier of the environment.
  • name - The name of the environment.
  • slug - The slugified name of the environment.
  • external_url - The external URL associated with the environment.
  • state - The current state of the environment (e.g., available, stopped).
  • created_at - Timestamp when the environment was created.
  • updated_at - Timestamp when the environment was last updated.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and environment ID are correctly specified and exist in the GitLab instance.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to access the environment data.
  • If skipping authentication, confirm that the GitLab instance allows unauthenticated access to environment details, otherwise the request will fail.
  • Common error messages include 404 Not Found if the project or environment does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion