GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node interacts with the GitLab API to create a new domain for GitLab Pages within a specific project. It is useful for automating the management of GitLab Pages domains, such as adding custom domains to projects for hosting static websites. For example, a user can automate the process of adding a new domain to a project’s GitLab Pages setup without manually using the GitLab web interface.

Use Case Examples

  1. Automate adding a custom domain to a GitLab Pages project.
  2. Integrate domain management into a CI/CD pipeline for GitLab projects.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Parameter Schema Defines the parameters for the API call, including the project ID in the path and the request body schema for the domain creation.
Request Body Schema Schema defining the structure of the request body for creating a new domain.
Request Path API endpoint path for creating a new domain in a project’s GitLab Pages.
Path Parameters Collection of path parameters, specifically the project ID required to identify the project.

Output

JSON

  • id - The unique identifier of the created domain.
  • domain - The domain name added to the GitLab Pages 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.
  • verification_code - Code used to verify domain ownership.
  • auto_ssl_enabled - Indicates if automatic SSL is enabled for the domain.

Dependencies

  • Requires GitLab API key authentication to authorize requests.

Troubleshooting

  • Ensure the project ID is correct and accessible by the authenticated user to avoid 404 errors.
  • Verify that the API key has sufficient permissions to create domains in the project.
  • Check the request body schema matches the expected format to prevent validation errors.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated requests for this endpoint, which is uncommon.

Links

Discussion