GitLab API icon

GitLab API

Gitlab

Actions1062

Deployments → deleteApiV4ProjectsIdDeploymentsDeploymentId

AI-generated

Summary

Deletes a deployment from a GitLab project via the GitLab API.

Inputs

  • id (required) — The ID or URL-encoded path of the project that contains the deployment. This is a required path parameter.
  • deployment_id (required) — The ID of the deployment to delete. This is a required path parameter.
  • baseUrl — Base URL of the GitLab instance. Defaults to https://gitlab.com. Change this for self-hosted GitLab instances.
  • skipAuthentication — If enabled, authentication is skipped. Otherwise the GitLab API credential is used.

Output shape

No specific shape is guaranteed; the output is whatever the GitLab API returns.

The operation returns the GitLab API response for the DELETE request. For this endpoint, the GitLab API typically returns an empty response with a 204 No Content status.

Examples

Example 1: Remove a deployment from a GitLab project when it is no longer needed or was created in error.

This operation is a direct API call to GitLab's REST endpoint for deleting a deployment. It requires the project identifier and deployment identifier to be provided as path parameters. Authentication is handled through the configured GitLab API credential unless 'Skip Authentication' is enabled. The response is the raw output from the GitLab API, which is typically an empty response body with a 204 status code.

Links

Discussion