Get group run¶
GET/
Detections API · DetectionGroup
Return the group query run with the given ID.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
runId | path | string (uuid) | Yes | Run ID of a query. |
Request samples¶
curl -X GET "https://api-<data-region>.central.sophos.com/detections/v1/queries/detection-groups/<runId>" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"
import requests
response = requests.get(
"https://api-<data-region>.central.sophos.com/detections/v1/queries/detection-groups/<runId>",
headers={
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Tenant-ID" = "<tenant-id>"
}
Invoke-RestMethod -Method GET -Uri "https://api-<data-region>.central.sophos.com/detections/v1/queries/detection-groups/<runId>" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api-<data-region>.central.sophos.com/detections/v1/queries/detection-groups/<runId>", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <access-token>")
req.Header.Set("X-Tenant-ID", "<tenant-id>")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
const response = await fetch("https://api-<data-region>.central.sophos.com/detections/v1/queries/detection-groups/<runId>", {
method: "GET",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
200 — Successful retrieval of the group query run.¶
Response fields
idstring (uuid)ID of the run.
createdAtstring (date-time)Timestamp when the run started.
expiresAtstring (date-time)Timestamp when the run expired.
finishedAtstring (date-time)Timestamp when the run finished.
resultCountintegerThe total number of items across all pages.
resultstringResult of a query run on groups or detections.
Must be one of:
Must be one of:
succeeded, canceled, failed, notAvailable, timedOut.statusstringStatus of a query run on groups or detections.
Must be one of:
Must be one of:
finished, pending, started.Errors¶
| Status | Meaning |
|---|---|
401 | Unauthorized. |
403 | Forbidden. |
404 | Not found. |
500 | Unexpected error. |
All error responses share the same shape — see the error response object.
See the guide for a narrative walkthrough of this API.