GitLab API

GitlabTool

Actions905

Overview

This node operation restores a deleted GitLab project by sending a POST request to the GitLab API endpoint `/api/v4/projects/{id}/restore`. It is useful for users who want to recover projects that were previously deleted in their GitLab instance. For example, if a project was accidentally deleted, this node can be used to restore it by specifying the project ID.

Use Case Examples

  1. Restoring a deleted project by providing its project ID to the node.
  2. Automating project recovery workflows in GitLab through n8n.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip authentication when making the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, defaulting to POST for this operation.
Path Parameters The path parameter 'id' specifies the ID of the project to restore.

Output

JSON

  • id - The unique identifier of the restored project.
  • name - The name of the restored project.
  • description - The description of the restored project.
  • visibility - The visibility level of the restored project (e.g., private, internal, public).
  • created_at - The timestamp when the project was created.
  • last_activity_at - The timestamp of the last activity in the project.
  • default_branch - The default branch of the restored project.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and corresponds to a deleted project that can be restored.
  • If authentication is skipped, the request may fail due to lack of permissions; ensure proper authentication is configured unless skipping is intentional.
  • Common error messages include 404 Not Found if the project ID does not exist or is not deleted, and 401 Unauthorized if authentication fails. Verify the project ID and API credentials to resolve these issues.

Links

Discussion