Change a notification target's severity and event filters, or a Slack target's channel.
PUT
/service/{service_id}/notification_target/{target_id}
const url = 'https://api.siteqwality.com/service/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/notification_target/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"min_severity":"minor","events":["example"],"channel":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.siteqwality.com/service/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/notification_target/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "min_severity": "minor", "events": [ "example" ], "channel": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” service_id
required
string format: uuid
Service identifier
target_id
required
string format: uuid
Notification target identifier
Request Body required
Section titled “Request Body required ” Media type application/json
Responses
Section titled “ Responses ”Notification target updated
Media type application/json
object
id
required
string format: uuid
service_id
required
string format: uuid
type
required
string
details
required
Stored details with a webhook URL cut to its host; a Slack token reads
back as has_token: true.
created_at
required
string format: date-time
integration_id
The connected integration this target sends with, when it uses one.
string | null format: uuid
min_severity
events
The lifecycle events this target takes; absent takes every one.
array | null
signing_secret
A pasted-URL webhook’s signing secret, returned once on create and never again.
string | null
Example
{ "type": "slack_channel", "min_severity": "minor"}An unknown event, an empty event list, or a channel on a target that has none
Missing or invalid authentication
Service or target not found
Internal server error