deploy_resources

Approve or reject a deployment

Approves or rejects a deployment.

post/api/v4/projects/{id}/deployments/{deployment_id}/approval

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Path parameters

idstring required

The ID or URL-encoded path of the project owned by the authenticated user

deployment_idinteger required

The ID of the deployment

Request body

status'approved' | 'rejected' required

The status of the approval (either approved or rejected)

commentstring

A comment to go with the approval

represented_asstring

The name of the User/Group/Role to use for the approval, when the user belongs to multiple approval rules

Response

Approve or reject a deployment

statusstring required
created_atstring date-time required
commentstring required

Example response

{
  "user": {
    "id": 1,
    "username": "admin",
    "public_email": "john@example.com",
    "name": "Administrator",
    "state": "active",
    "avatar_url": "https://gravatar.com/avatar/1",
    "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
    "custom_attributes": [
      {
        "key": "foo",
        "value": "bar"
      }
    ],
    "web_url": "https://gitlab.example.com/root"
  },
  "status": "approved",
  "created_at": "2022-02-24T20:22:30.097Z",
  "comment": "LGTM"
}

Changes

No recorded changes to this operation across all 5 revisions of this API.