GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to create a new domain for GitLab Pages within a specific project. It is useful for managing custom domains associated with GitLab Pages hosted under a project. For example, a user can add a new domain to serve their project's static site via GitLab Pages.

Use Case Examples

  1. Adding a custom domain to a GitLab Pages project to serve a website under a personalized URL.
  2. Automating domain management for multiple projects hosted on GitLab Pages.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API calls.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to be included in the request path, specifically the project ID or URL-encoded path.

Output

JSON

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

Dependencies

  • GitLab API key credential

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 that the base URL is correctly set to the GitLab instance you are working with, especially if using a self-hosted GitLab.
  • Common error messages include 401 Unauthorized (invalid or missing authentication), 404 Not Found (project or endpoint does not exist), and 400 Bad Request (invalid parameters). Resolving these involves correcting credentials, project ID, or request parameters.

Links

Discussion