Create Email Alerts
The follwing mutation creates an email alert for a given test suite:
- Query
- cURL
mutation CreateTestSuiteEmailAlert($testSuiteId: ObjectID!, $email: String!, $alertTypes: [EmailAlertType]) {
createTestSuiteEmailAlert(input: {
testSuiteId: $testSuiteId,
email: $email
alertTypes: $alertTypes
}) {
testSuiteEmailAlert {
id
email
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 CreateTestSuiteEmailAlert($testSuiteId: ObjectID!, $email: String!, $alertTypes: [EmailAlertType]) { createTestSuiteEmailAlert(input: { testSuiteId: $testSuiteId, email: $email alertTypes: $alertTypes }) { testSuiteEmailAlert { id email alertTypes } } }"}' https://api.lumar.io/graphql
caution
alertTypes
is optional and is defaulting to [Pass, Warning, Fail]
.