GitLab API

GitlabTool

Actions1000

Overview

This node operation updates a specific pipeline schedule for a project in GitLab using the GitLab API. It is useful for automating the management of pipeline schedules, such as modifying the timing or configuration of scheduled pipelines in a GitLab project. For example, a user can update the cron schedule or other parameters of a pipeline schedule programmatically within an n8n workflow.

Use Case Examples

  1. Updating the cron timing of a pipeline schedule for a project to run at a different time.
  2. Changing the description or variables of an existing pipeline schedule via an automated workflow.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the API request, useful for public or unauthenticated endpoints.
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 to use for the API request, default is GET but can be set to PUT for this operation.
Path Parameters Parameters for the API path including the project ID or URL-encoded path and the pipeline schedule ID to identify the specific pipeline schedule to update.

Output

JSON

  • id - The unique identifier of the updated pipeline schedule.
  • description - Description of the pipeline schedule.
  • ref - The Git reference (branch or tag) the pipeline schedule runs on.
  • cron - The cron timing string defining the schedule.
  • cron_timezone - The timezone for the cron schedule.
  • active - Boolean indicating if the schedule is active.
  • next_run_at - Timestamp of the next scheduled run.
  • owner
    • id - ID of the user who owns the pipeline schedule.
    • username - Username of the owner.
    • name - Full name of the owner.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and pipeline schedule ID are correct and exist in the GitLab instance.
  • Verify that the API key used for authentication has sufficient permissions to update pipeline schedules.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab.
  • If the request fails, review the HTTP method and path parameters to ensure they match the API specification for updating pipeline schedules.

Links

Discussion