GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to create a new domain for GitLab Pages within a specified project. It is useful for automating the management of GitLab Pages domains, such as adding custom domains to projects hosted on GitLab. For example, a user can automate the process of adding a new domain to a project's GitLab Pages site as part of a CI/CD pipeline or project setup workflow.

Use Case Examples

  1. Automate adding a custom domain to a GitLab Pages site for a project.
  2. Integrate domain management into a DevOps pipeline for GitLab projects.

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 authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method used for the API request, default is GET but POST is used for this operation.
Path Parameters Parameters included in the request path, specifically the project ID or URL-encoded path to identify the project.

Output

JSON

  • id - The unique identifier of the created domain.
  • domain - The domain name added to the GitLab Pages for the project.
  • project_id - The ID of the project to which the domain was added.
  • created_at - Timestamp when the domain was created.
  • updated_at - Timestamp when the domain was last updated.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible by the authenticated user.
  • Verify that the authentication credentials (GitLab API key) are valid and have sufficient permissions to manage project pages domains.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 401 Unauthorized (invalid or missing credentials), 404 Not Found (project ID does not exist or is inaccessible), and 400 Bad Request (invalid domain data). Resolving these involves correcting credentials, project ID, or request payload.

Links

Discussion