Create Slack Webhooks
The follwing mutation creates a slack webhook for a test suite:
- Query
- cURL
mutation CreateSlackWebhook($testSuiteId: ObjectID!, $url: String!) {
createAutomatorSlackWebhook(input: {
testSuiteId: $testSuiteId,
url: $url
}) {
slackWebhook {
id
url
alertTypes
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation CreateSlackWebhook($testSuiteId: ObjectID!, $url: String!) { createAutomatorSlackWebhook(input: { testSuiteId: $testSuiteId, url: $url }) { slackWebhook { id url alertTypes } } }"}' https://api.lumar.io/graphql
caution
testSuiteId
and url
are the required fields.