GitLab API

GitlabTool

Actions905

Overview

This node operation archives a project in GitLab by sending a POST request to the GitLab API endpoint `/api/v4/projects/{id}/archive`. It is useful for automating project management tasks such as archiving completed or inactive projects in GitLab repositories. For example, a user can automate archiving projects after a release cycle or when a project is no longer actively maintained.

Use Case Examples

  1. Automate archiving of completed projects in GitLab to keep the repository clean.
  2. Integrate with CI/CD pipelines to archive projects after deployment.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip authentication for the request.
Authentication The authentication method used for the GitLab API request.
baseUrl The base URL of the GitLab instance to which the request is sent. Defaults to https://gitlab.com.
Method The HTTP method used for the request. For this operation, it is POST.
Path Parameters The path parameters for the request, specifically the project ID or URL-encoded path to identify the project to archive.

Output

JSON

  • id - The ID of the archived project.
  • name - The name of the archived project.
  • archived - Boolean indicating if the project is archived.
  • message - Response message confirming the archive action.

Dependencies

  • GitLab API credentials for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the provided credentials.
  • Authentication errors may occur if the GitLab API credentials are missing or invalid; verify the API key or token.
  • The base URL must be correct for the GitLab instance; otherwise, the request will fail.
  • If the project is already archived, the API may return an error or no change; check the project status before archiving.

Links

Discussion