GitLab API

GitlabTool

Actions1000

Overview

This node operation cancels a bulk import in GitLab by sending a POST request to the endpoint `/api/v4/bulk_imports/{import_id}/cancel`. It is useful for users who want to stop an ongoing bulk import process in their GitLab instance. For example, if a migration or bulk import is taking too long or was started by mistake, this operation allows the user to cancel it programmatically within an n8n workflow.

Use Case Examples

  1. Cancel a bulk import by specifying the import ID to stop the migration process in GitLab.
  2. Automate the cancellation of bulk imports based on certain conditions in your workflow.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for testing or when authentication is handled externally.
Authentication Type of authentication used for the request, defaulting to GitLab API key authentication.
baseUrl The 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.
Path Parameters Parameters to be included in the request path, specifically the import_id which identifies the bulk import to cancel.

Output

JSON

  • status - HTTP response status code indicating the result of the cancel request.
  • data - Response data from GitLab API about the cancellation operation, typically including confirmation or error details.

Dependencies

  • Requires GitLab API key credential for authentication unless Skip Authentication is enabled.

Troubleshooting

  • Ensure the import_id path parameter is correctly set and corresponds to an existing bulk import ID in GitLab.
  • If authentication fails, verify that the GitLab API key credential is valid and has sufficient permissions to cancel bulk imports.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct and accessible.
  • Common error messages may include 404 Not Found if the import_id does not exist, or 401 Unauthorized if authentication is missing or invalid.

Links

Discussion