Add a notification target to a service.
POST
/service/{service_id}/notification_target/
const url = 'https://api.siteqwality.com/service/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/notification_target/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"type":"slack_channel","details":"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://api.siteqwality.com/service/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/notification_target/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "type": "slack_channel", "details": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” service_id
required
string format: uuid
Service identifier
Request Body required
Section titled “Request Body required ” Media type application/json
object
type
required
string
details
required
Responses
Section titled “ Responses ”Notification target created
Media type application/json
object
id
required
string format: uuid
service_id
required
string format: uuid
type
required
string
details
required
created_at
required
string format: date-time
Example
{ "type": "slack_channel"}Invalid request body
Missing or invalid authentication
Service not found
Internal server error