Skip to content

Approve or reject a deployment

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

Approves or rejects a deployment.

id
required
One of:
string

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

deployment_id
required
integer

The ID of the deployment

Media type application/json
object
status
required

The status of the approval (either approved or rejected)

string
>= 1 characters
Allowed values: approved rejected
comment

A comment to go with the approval

string
nullable
represented_as

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

string
nullable

Created

Media type application/json
object
user
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
status
string
created_at
string format: date-time
comment
string
Example
{
"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"
}

Bad Request

Not Found