Skip to content
DocumentationAPI ReferenceChangelog
API ReferenceTalon Studio v1.1.22-beta

Detections

List and read detections, fetch one as code, and propose new detections or edits as governed change requests.

List detections

GET/api/v1/detectionsdetections:read

Paginated list of detections in the token's reach.

Query parameters
workspaceIdstring (UUID)
Filter to one workspace. Never required: an org service token with no workspaceId sees detections across the whole org, and a personal org token with no workspaceId sees only its owner's accessible workspaces. A workspace-bound token passing a different workspace's id gets 403.
pageinteger
Page number, default 1.
perPageinteger
Items per page, 1–100, default 25.
Response
idstring (UUID)
namestring
descriptionstring · nullable
workspaceIdstring (UUID)
statusstring
Lifecycle status — one of draft, validated, degraded, deployed, deprecated, git_sync_failed.
mitreTacticstring · nullable
mitreTechniqueIdstring · nullable
Primary technique.
mitreTechniqueIdsstring[]
All mapped techniques.
confidencestring · nullable
One of high, medium, low.
sourcetypestring · nullable
The sourcetype of the stream the detection is built on.
createdAtstring (ISO 8601)
updatedAtstring (ISO 8601)
Returned with meta { page, perPage, total, totalPages } and links { next, prev }. The underlying query is capped at the 500 most recently updated detections (updatedAt descending) before paging is applied, so total never exceeds 500 and anything older than that window isn't reachable through this endpoint. The links keep workspaceId, so following one stays in the same workspace.
Request
curl -H "Authorization: Bearer tlk_…" \
  "https://<your-instance>/api/v1/detections?workspaceId=…&perPage=25"
Response
{
  "data": [
    { "id": "7c2a…", "name": "Suspicious PowerShell", "status": "deployed" },
    { "id": "9d4f…", "name": "Anomalous OAuth Grant", "status": "validated" }
  ],
  "meta": { "page": 1, "perPage": 25, "total": 2, "totalPages": 1 },
  "links": { "next": null, "prev": null }
}

Get detection

GET/api/v1/detections/{id}detections:read

Fetch one detection, including its rule bodies, how its Elastic query deploys, and its recent validation runs and deployments. Returned as a flat object, with no data envelope.

Path parameters
idstring (UUID)required
Response
idstring (UUID)
namestring
descriptionstring · nullable
workspaceIdstring (UUID)
statusstring
draft | validated | degraded | deployed | deprecated | git_sync_failed
mitreTacticstring · nullable
mitreTechniqueIdstring · nullable
mitreTechniqueIdsstring[]
severitystring · nullable
One of informational, low, medium, high, critical.
riskScoreinteger · nullable
sourcetypestring · nullable
splstring · nullable
Splunk SPL.
kqlstring · nullable
Sentinel KQL.
sigmastring · nullable
Canonical Sigma YAML.
eqlstring · nullable
The Elastic query, in the language elastic.language names.
elasticobject · nullable
How the Elastic query deploys: language (eql | kuery | lucene | esql — eql when the detection names none), ruleType (the Kibana rule type, e.g. threshold, new_terms, threat_match; null when unset) and indexPatterns[]. Null when there is no Elastic query.
yaraLstring · nullable
Chronicle YARA-L.
cqlstring · nullable
CrowdStrike CQL.
criblKqlstring · nullable
Cribl Search KQL.
referencesstring[]
Reference links. A detection with none of its own, adopted from a Splunk content rule, returns that rule's.
validationRunsarray
The 20 most recent validation and firing-test runs, newest first: id, source (atomic_red_team | cribl_lake | manual | splunk_attack_data | simulation | readiness | golden_events | in_house), result (pass | fail | no_atomic_test | withdrawn, or null), eventsTested, eventsMatched, failureReason, triggeredAt, completedAt.
deploymentsarray
The 20 most recent SIEM deployments, newest first: id, siemType (splunk | sentinel | elastic | chronicle | crowdstrike | cribl), status (success | failed | pending | exported), errorMessage, gitCommitHash, deployedAt.
createdAtstring (ISO 8601)
updatedAtstring (ISO 8601)
Scoped 404
Workspace-bound tokens get a uniform 404 for detections outside their workspace, and a personal org token likewise gets a 404 for detections in workspaces its owner can't access — the response never confirms whether the id exists.
Request
curl -H "Authorization: Bearer tlk_…" \
  "https://<your-instance>/api/v1/detections/{id}"
Response
{
  "id": "7c2a…",
  "name": "Suspicious PowerShell",
  "workspaceId": "d41f…",
  "status": "deployed",
  "mitreTechniqueId": "T1059.001",
  "severity": "high",
  "sigma": "title: Suspicious PowerShell\n…",
  "spl": "index=win …",
  "eql": null,
  "elastic": null,
  "references": ["https://attack.mitre.org/techniques/T1059/001/"],
  "validationRuns": [
    {
      "id": "51c0…",
      "source": "in_house",
      "result": "pass",
      "eventsTested": 4,
      "eventsMatched": 1,
      "failureReason": null,
      "triggeredAt": "2026-10-20T09:00:00.000Z",
      "completedAt": "2026-10-20T09:00:03.000Z"
    }
  ],
  "deployments": [
    {
      "id": "e9a7…",
      "siemType": "splunk",
      "status": "success",
      "errorMessage": null,
      "gitCommitHash": "4f9c2e1…",
      "deployedAt": "2026-10-21T14:02:11.000Z"
    }
  ]
}

Get detection as code

GET/api/v1/detections/{id}/yamldetections:read

The detection as a detection-as-code file: the YAML Studio writes for it and the file's path in the workspace repository, built from the detection as it stands on main — not from an open change request.

Path parameters
idstring (UUID)required
Response
data.idstring (UUID)
data.workspaceIdstring (UUID)
data.filePathstring
detections/<technique>_<name-slug>.yaml, under Talon/ when the workspace repository uses the nested layout. A detection with no technique is filed as unmapped.
data.yamlstring
The file's content: identity, ATT&CK mapping, stream, queries (splunk, sentinel, elastic, sigma, yara_l, and crowdstrike or cribl when the detection has one), tests and the rest of the detection.
Returned as { data: { … } }. The same uniform 404 as GET /detections/{id} for a detection outside the token's reach.
Request
curl -H "Authorization: Bearer tlk_…" \
  "https://<your-instance>/api/v1/detections/{id}/yaml"
Response
{
  "data": {
    "id": "7c2a…",
    "workspaceId": "d41f…",
    "filePath": "detections/T1059.001_suspicious-powershell.yaml",
    "yaml": "…\nname: Suspicious PowerShell\n…\nqueries:\n  splunk: index=win …\n…"
  }
}

Propose detection

POST/api/v1/detectionsdetections:propose

Propose a new detection. Propose-only: it validates the detection, then stages it on a new branch as a draft change request for a human to review and merge — it never writes to main or deploys. Personal tokens only; a service token is refused with 403.

Request body
namestringrequired
1–200 characters.
streamIdstring (UUID)required
The stream (sourcetype) the detection runs on — the id field from GET /sourcetypes. It must belong to the target workspace; an id from another workspace, or an unknown id, returns 404 "Stream not found in this workspace".
sigmastring · optional
Sigma YAML, 1–20,000 characters. At least one of sigma, spl, kql, eql, yaraL, cql or criblKql is required; any number may be sent.
splstring · optional
Splunk SPL, 1–20,000 characters.
kqlstring · optional
Sentinel KQL, 1–20,000 characters.
eqlstring · optional
The Elastic query, 1–20,000 characters, in the language elasticLanguage names.
elasticLanguagestring · optional
eql | kuery | lucene | esql. Written to the draft's x_elastic.language; ignored without eql. Without it, the Elastic query deploys as EQL.
yaraLstring · optional
Chronicle YARA-L, 1–20,000 characters.
cqlstring · optional
CrowdStrike CQL, 1–20,000 characters.
criblKqlstring · optional
Cribl Search KQL, 1–20,000 characters.
mitreTechniqueIdstring · optional
Up to 24 characters, e.g. T1059.001. Upper-cased before use; the tactic is filled in from the ATT&CK catalogue.
descriptionstring · optional
Up to 2,000 characters.
workspaceIdstring (UUID) · optional
Required with an org-scoped token; a workspace-bound token uses its own workspace.
Response
changeRequestIdstring (UUID)
branchNamestring
agent/, then a slug of the change request title "API: <name>" (up to 48 characters), then the first 8 characters of the change request id.
statusstring
Always "draft".
Returns 201 Created. If the detection fails validation the call returns 400 with only the generic message "Proposed detection failed validation" — the field-level reasons aren't included, so check the detection in the app. The change request's title is "API: <name>" and its author is the token's owner.
Propose, don't write
Every API-created detection lands as a reviewable draft change request, never straight to main. A successful proposal is recorded in the audit log as api.detection.proposed, with the change request id and the token id.
Request
curl -X POST -H "Authorization: Bearer tlk_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Suspicious PowerShell", "streamId": "6a9c…", "sigma": "title: …" }' \
  "https://<your-instance>/api/v1/detections"
Response
{
  "changeRequestId": "b19e1c2d-…",
  "branchName": "agent/api-suspicious-powershell-b19e1c2d",
  "status": "draft"
}

Propose an edit

PATCH/api/v1/detections/{id}detections:propose

Propose an edit to an existing detection. Governed and propose-only, like POST /detections: it stages a draft change request for human review and merge, and never writes to main or deploys. Personal tokens only; a service token is refused with 403.

Path parameters
idstring (UUID)required
Request body
sigmastring · optional
Sigma YAML, 1–20,000 characters. Changing it re-derives the stored SPL, KQL, EQL and YARA-L from the new Sigma (CQL and Cribl KQL are left as they are), except any native query you send in the same call or one that was hand-edited to differ from the old Sigma's translation.
splstring · optional
Splunk SPL, 1–20,000 characters.
kqlstring · optional
Sentinel KQL, 1–20,000 characters.
eqlstring · optional
The Elastic query, 1–20,000 characters.
elasticLanguagestring · optional
eql | kuery | lucene | esql. Sets the language the detection's Elastic query deploys in (x_elastic.language); it can be sent on its own.
yaraLstring · optional
Chronicle YARA-L, 1–20,000 characters.
cqlstring · optional
CrowdStrike CQL, 1–20,000 characters.
criblKqlstring · optional
Cribl Search KQL, 1–20,000 characters.
descriptionstring · optional
Up to 2,000 characters.
namestring · optional
1–200 characters. See the note below — a rename is refused.
mitreTechniqueIdstring · optional
Up to 24 characters. See the note below — re-mapping is refused.
Response
changeRequestIdstring (UUID)
branchNamestring
agent/, then a slug of the change request title "API: updated <name>" (up to 48 characters), then the first 8 characters of the change request id.
statusstring
Always "draft".
Returns 202 Accepted — the edit is staged as a draft change request titled "API: updated <name>", not applied. At least one body field is required (422 otherwise). If the edited YAML fails validation the call returns 400 "Proposed YAML failed validation". If the Sigma changed and the Sigma translation sidecar is down, the call returns 503 and nothing is staged. Recorded in the audit log as api.detection.edit_proposed.
Name and technique are fixed
A detection's file in Git is named from its ATT&CK technique and its name. An edit that changes either would move the file, so it is refused with 409 "This edit would move the detection source file (name or MITRE technique changed). Keep them stable." Use this endpoint for the rule bodies and description.
Request
curl -X PATCH -H "Authorization: Bearer tlk_…" \
  -H "Content-Type: application/json" \
  -d '{"description": "Tuned for service accounts"}' \
  "https://<your-instance>/api/v1/detections/{id}"
Response
{
  "changeRequestId": "9f41a2c3-…",
  "branchName": "agent/api-updated-suspicious-powershell-9f41a2c3",
  "status": "draft"
}