GitLab API

GitlabTool

Actions905

Overview

This node operation performs an API call to erase a specific job in a GitLab project. It is useful for automating the management of CI/CD jobs within GitLab projects, such as cleaning up old or unwanted job records. For example, it can be used in workflows that maintain project hygiene by removing obsolete build jobs automatically.

Use Case Examples

  1. Erase a job with ID 88 in project with ID 123 to clean up old CI/CD jobs.
  2. Automate job erasure in GitLab projects as part of a deployment pipeline.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API call.
Authentication The authentication method used for the API call, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance to which the API call is made, defaulting to https://gitlab.com.
Method The HTTP method used for the API call, here it is POST for erasing a job.
Path Parameters Parameters specifying the project ID and job ID to identify which job to erase.

Output

JSON

  • response - The JSON response from the GitLab API after erasing the specified job, typically confirming the job has been erased or providing status information.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID and job ID are correct and exist in the GitLab instance to avoid 'not found' errors.
  • Verify that the API authentication token has sufficient permissions to erase jobs in the project.
  • Check network connectivity and base URL correctness if the API call fails to reach the GitLab server.

Links

Discussion