Search and Filter Cases๐
Search for cases using the Cases query language, the same query syntax used in Secureworksยฎ Taegisโข XDR Advanced Search.
Search Cases๐
Query available cases by title, severity, status, dates, and more.
Query๐
query searchCases($arguments: CasesArguments!) {
cases(arguments: $arguments) {
cases {
id
shortId
title
severity
type {
id
name
}
primaryStatus {
id
name
}
tags
assigneeId
createdAt
updatedAt
}
totalCount
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
}
Variables๐
Search with a query:
{
"arguments": {
"query": "title contains 'suspicious login'",
"pagination": {
"offset": {
"page": 1,
"perPage": 20
}
}
}
}
Query Syntax๐
Basic Query Structure๐
The where keyword is optional.
Searchable Fields๐
| Field | Type | Description |
|---|---|---|
id |
UUID | Case ID |
shortId |
String | Human-readable ID (e.g., CSE00001) |
title |
String | Case title |
severity |
Number | Severity: 2, 4, 6, 8, 10 |
riskScore |
Number | Risk score value |
tags |
Array | Case tags |
assigneeId |
String | Assigned user or team |
createdAt |
Timestamp | Creation time |
updatedAt |
Timestamp | Last update time |
closedAt |
Timestamp | Close time (null if open) |
closeReason |
String | Reason provided when the case was closed |
archivedAt |
Timestamp | Archive time (null if not archived) |
managedBy |
String | PROVIDER or CUSTOMER |
typeId |
UUID | Case type ID |
primaryStatusId |
UUID | Primary status ID |
Operators๐
| Operator | Example |
|---|---|
= |
shortId = 'CSE00001' |
!= |
severity != 2 |
contains |
title contains 'phishing' |
!contains |
title !contains 'Draft' |
in (...) |
primaryStatusId in ('uuid1', 'uuid2') |
is null |
closedAt is null |
is not null |
closedAt is not null |
Logical Operators๐
Combine conditions with AND:
String Values๐
Enclose strings in single quotes:
Array Fields (tags)๐
Match cases where tags contain specific values:
Sort๐
Order results with the | sort operator:
Default sort is createdAt DESC (newest first).
Time Ranges๐
Filter by date range using ISO 8601 timestamps:
Query Examples๐
Find open critical cases๐
{
"arguments": {
"query": "severity = 10 AND closedAt is null",
"pagination": {"offset": {"page": 1, "perPage": 20}}
}
}
Search by title๐
{
"arguments": {
"query": "title contains 'ransomware'",
"pagination": {"offset": {"page": 1, "perPage": 50}}
}
}
Filter by tag๐
{
"arguments": {
"query": "tags contains 'malware' AND severity >= 6",
"pagination": {"offset": {"page": 1, "perPage": 20}}
}
}
Find recently updated cases๐
{
"arguments": {
"query": "updatedAt >= '2024-08-14T00:00:00Z' | sort updatedAt desc",
"pagination": {"offset": {"page": 1, "perPage": 20}}
}
}
Assigned to specific user๐
{
"arguments": {
"query": "assigneeId = '@customer'",
"pagination": {"offset": {"page": 1, "perPage": 20}}
}
}
Pagination๐
Both offset (page-based) and cursor-based pagination are supported.
Offset Pagination๐
page: 1-indexed page number (default: 1)perPage: Results per page, max 100 (default: 20)
Cursor Pagination๐
first: Forward page size, max 100 (default: 20)after: Cursor from previous page'sendCursor
Use last and before for backward traversal.
Important Notes๐
- No search by name at this time: You must filter by IDs (e.g.,
primaryStatusId,typeId), not names. QuerycaseTypesandcasePrimaryStatusesfirst to get IDs for filtering. - Empty query: Omit
queryto retrieve all cases (default sort: newest first). - Default pagination: If
paginationis omitted, defaults to page 1, 20 results. - Cursor strings are opaque: Do not parse cursor valuesโuse them as-is.
Next Steps๐
For more information, see the Get Started with the Cases GraphQL API.