Silence the alerts of an environment, or of one of its apps.
POST
/api/v1/projects/{project}/environments/{environment}/silences
const url = 'https://example.com/api/v1/projects/example/environments/example/silences';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"reason":"example","startsAt":"example","endsAt":"example","app":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/projects/example/environments/example/silences \ --header 'Content-Type: application/json' \ --data '{ "reason": "example", "startsAt": "example", "endsAt": "example", "app": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project
required
string
Project name
environment
required
string
Environment short name
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
reason
required
string
startsAt
RFC 3339; now when omitted (freezes only).
string | null
endsAt
required
RFC 3339.
string
app
Silences only: one app of the environment.
string | null
Examplegenerated
{ "reason": "example", "startsAt": "example", "endsAt": "example", "app": "example"}Responses
Section titled “Responses”Media typeapplication/json
object
id
required
string format: uuid
reason
required
string
app
Silences only: the app, when not the whole environment.
string | null format: uuid
createdBy
required
string
startsAt
required
string
endsAt
required
string
liftedAt
string | null
active
required
In force now.
boolean
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "reason": "example", "app": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "createdBy": "example", "startsAt": "example", "endsAt": "example", "liftedAt": "example", "active": true}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}