GitLab API

GitlabTool

Actions1000

Overview

This node operation restores a previously deleted project in GitLab 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 accidentally deleted or need to reinstate archived projects in their GitLab instance.

Use Case Examples

  1. Restoring a deleted project by specifying its project ID to recover its data and settings.
  2. Automating project restoration in workflows where project deletion and recovery are part of the process.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the request, which is POST for this operation.
Path Parameters The path parameter 'id' specifies the unique identifier 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.
  • web_url - The web URL to access the restored project in GitLab.
  • created_at - The timestamp when the project was originally created.
  • last_activity_at - The timestamp of the last activity in the restored project.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and corresponds to a deleted project that can be restored.
  • Verify that the API authentication token or key has sufficient permissions to restore projects in the GitLab instance.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 404 Not Found if the project ID does not exist or is not deleted, and 401 Unauthorized if authentication fails.

Links

Discussion