GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation updates a specific job in GitLab using the GitLab API. It is useful for automating job management tasks such as modifying job details or status by specifying the job ID and providing the updated data in the request body. For example, it can be used to programmatically update CI/CD job configurations or statuses within a GitLab project.

Use Case Examples

  1. Updating a CI/CD job's details by specifying the job ID and sending the updated parameters in the request body.
  2. Automating job status changes in GitLab pipelines by calling this operation with the appropriate job ID and data.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API calls.
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 HTTP method to use for the request, defaulting to GET but can be set to PUT for this operation.
Path Parameters Parameters included in the request path, specifically the job ID to identify which job to update.

Output

JSON

  • id - The unique identifier of the job that was updated.
  • status - The current status of the job after the update.
  • name - The name of the job.
  • stage - The stage in the pipeline where the job runs.
  • created_at - Timestamp when the job was created.
  • started_at - Timestamp when the job started.
  • finished_at - Timestamp when the job finished.
  • duration - Duration of the job execution.
  • user
    • id - ID of the user who triggered the job.
    • name - Name of the user who triggered the job.
  • pipeline
    • id - ID of the pipeline the job belongs to.
    • status - Status of the pipeline.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the job ID provided in the path parameters is valid and exists in the GitLab project to avoid '404 Not Found' errors.
  • Verify that the authentication credentials (API key) are correctly configured and have sufficient permissions to update jobs to prevent '401 Unauthorized' or '403 Forbidden' errors.
  • Check the request body schema to ensure all required fields are included and correctly formatted to avoid validation errors from the API.

Links

  • GitLab API - Update a Job - Official GitLab API documentation for updating a job, detailing required parameters and request body schema.

Discussion