Retrieve Test Suites
Retrieve test suites in an account
The following query retrieves the last 100 test suites for a given account:
- Query
- cURL
query GetAccountTestSuites($accountId: ObjectID!) {
node(id: $accountId) {
... on Account {
testSuites(last: 100) {
nodes {
id
name
}
}
}
}
}
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 GetAccountTestSuites($accountId: ObjectID!) { node(id: $accountId) { ... on Account { testSuites(last: 100) { nodes { id name } } } } }"}' https://api.lumar.io/graphql
Retrieve test suites in a given account
The following query searches for a test suite in a given account using the test suite name:
- Query
- cURL
query SearchAccountTestSuites($accountId: ObjectID!, $nameContains: String) {
node(id: $accountId) {
... on Account {
testSuites(first: 5, filter: { name: { contains: $nameContains } }) {
nodes {
id
name
}
}
}
}
}
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 SearchAccountTestSuites($accountId: ObjectID!, $nameContains: String) { node(id: $accountId) { ... on Account { testSuites(first: 5, filter: { name: { contains: $nameContains } }) { nodes { id name } } } } }"}' https://api.lumar.io/graphql