GitLab API icon

GitLab API

Gitlab

Actions1062

Bulk_imports → getApiV4BulkImports

AI-generated

Summary

Retrieves a list of GitLab bulk imports (GET /api/v4/bulk_imports) with optional pagination, sorting, and filtering by status.

Inputs

  • skipAuthentication — If true, the request will not use credentials. Defaults to false. Set to true for public data (if supported by the endpoint). When false, the node uses the selected credentials to authenticate with GitLab. Note: The credentials must be configured as a GitLab API credential in n8n. Ignored if Authentication is hidden when skipAuthentication is true (the UI hides Authentication).
  • authentication — The credential to use for authenticating with GitLab. Only used when skipAuthentication is false. Defaults to 'gitlabApi'. This value corresponds to a GitLab API credential set up in n8n. If skipAuthentication is true this field is ignored and hidden in the UI.
  • baseUrl — Base URL for the GitLab instance (self‑managed or GitLab.com). Defaults to 'https://gitlab.com'. Override this if you point to a different GitLab server.
  • method — HTTP method to use for the request. The operation defaults to 'GET' as defined by the OpenAPI spec, but the UI allows changing it (though changing it away from GET will likely result in an error from the endpoint).
  • page — Page number for pagination of the bulk import list. Defaults to 1.
  • per_page — Number of items to return per page. Defaults to 20, maximum allowed by the GitLab API is 100.
  • sort — Sort order of the returned bulk imports. Accepted values are 'asc' (oldest first) or 'desc' (newest first). Defaults to 'desc'.
  • status — Filter the bulk imports by their status. Accepted values: 'created', 'started', 'finished', 'timeout', 'failed', 'canceled'. Omit to return all statuses.

Output shape

array

The node returns an array of bulk import objects as defined in the GitLab OpenAPI specification. Each object contains fields such as id, migration_id, label, state, created_at, updated_at, and any additional metadata returned by the endpoint.

Examples

Example 1: List all bulk imports for the default GitLab.com instance with pagination

Use default values (skipAuthentication false, authentication gitlabApi, baseUrl https://gitlab.com, method GET). Set page to 1 and per_page to 100 to fetch the first page with up to 100 items.

Example 2: Fetch only finished migrations sorted ascending

Set status to 'finished', sort to 'asc', and adjust page/per_page as needed.

Example 3: Query a self‑managed GitLab instance

Change baseUrl to your instance URL (e.g., 'https://gitlab.example.com'). Ensure the credentials (personal access token or OAuth) have permission to read bulk imports.

Links

Discussion