Retrieve Email Alerts
Getting an Email Alert by id
The following query retrieves an email alert by id:
- Query
- cURL
query GetTestSuiteEmailAlert($testSuiteEmailAlertId: ObjectID!) {
node(id: $testSuiteEmailAlertId) {
... on 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":"query GetTestSuiteEmailAlert($testSuiteEmailAlertId: ObjectID!) { node(id: $testSuiteEmailAlertId) { ... on TestSuiteEmailAlert { id email alertTypes } } }"}' https://api.lumar.io/graphql
Getting the Email Alerts linked to a given test suite
The following query retrieves the email alerts linked to a given test suite:
- Query
- cURL
query GetTestSuiteEmailAlerts($testSuiteId: ObjectID!) {
node(id: $testSuiteId) {
... on TestSuite {
testSuiteEmailAlerts(last: 100) {
nodes {
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":"query GetTestSuiteEmailAlerts($testSuiteId: ObjectID!) { node(id: $testSuiteId) { ... on TestSuite { testSuiteEmailAlerts(last: 100) { nodes { id email alertTypes } } } } }"}' https://api.lumar.io/graphql