GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation cancels a GitHub import process in a GitLab project by sending a POST request to the GitLab API endpoint `/api/v4/import/github/cancel`. It is useful for users who want to programmatically stop an ongoing GitHub import into their GitLab project.

Use Case Examples

  1. Cancel a GitHub import process that was initiated but needs to be stopped due to errors or changes in the import plan.
  2. Automate the cancellation of GitHub imports in CI/CD pipelines or project management workflows.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication process for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Parameter Schema Defines the schema for the parameters sent in the request body, specifically for the cancel GitHub import operation.
Request Body Schema Defines the schema for the request body, which is null for this operation.
Request Path The API endpoint path for cancelling the GitHub import, set to `/api/v4/import/github/cancel`.

Output

JSON

  • statusCode - HTTP status code returned by the API after attempting to cancel the GitHub import.
  • body - The response body from the API, which may contain details about the cancellation result or error messages.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has sufficient permissions to cancel GitHub imports.
  • Verify the base URL is correct and accessible, especially if using a self-hosted GitLab instance.
  • Check that the HTTP method is set to POST as required by the cancel import endpoint.
  • Common error messages may include authentication failures, permission denied, or invalid endpoint errors. Verify credentials and endpoint path to resolve these.

Links

Discussion