GitLab API icon

GitLab API

Gitlab

Actions880

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 manage environments programmatically.

Use Case Examples

  1. Fetch environment details for project ID '123' and environment ID '456' to check deployment status.
  2. Retrieve environment configuration for a specific project environment to automate deployment workflows.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API access.
Authentication Type of authentication to use for the API request, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance to which the API request is sent, default is https://gitlab.com.
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).
  • project_id - The ID of the project to which the environment belongs.
  • 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 path parameters are correctly set and valid to avoid 404 Not Found errors.
  • If authentication is enabled, verify that the GitLab API key credential is correctly configured and has sufficient permissions to access the environment data.
  • Check the baseUrl parameter if using a self-hosted GitLab instance to ensure the URL is correct and accessible.
  • Common error messages include '401 Unauthorized' if authentication fails, and '404 Not Found' if the specified project or environment does not exist.

Links

Discussion