List profiles¶
GET/
Cloud Security API · runtime-detections
List runtime detection profiles (Latest version).
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
page | query | integer | No | The page number to fetch, starting with 1. |
pageSize | query | integer | No | The size of the page requested. |
searchTerm | query | string | No | Search by profile name. Must be 1–50 characters long. |
Request samples¶
curl -X GET "https://api-<data-region>.central.sophos.com/cloud-security/v1/profiles" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"
import requests
response = requests.get(
"https://api-<data-region>.central.sophos.com/cloud-security/v1/profiles",
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/cloud-security/v1/profiles" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api-<data-region>.central.sophos.com/cloud-security/v1/profiles", 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/cloud-security/v1/profiles", {
method: "GET",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
200 — Runtime detection profiles fetched successfully.¶
Response fields
itemsarray of objectrequiredList of runtime detection profiles.
Runtime detection profile metadata.
Show child attributesHide child attributes
idstring (uuid)requiredID of the runtime detection profile.
namestringrequiredName of the runtime detection profile.
defaultContentIdstring (uuid)requiredID of the default content used to create the runtime detection profile.
contentVersionstringVersion of the default content used to create the runtime detection profile.
createdAtstring (date-time)requiredCreation date of the runtime detection profile in UTC.
versionintegerrequiredLatest version of the runtime detection profile.
policiesarray of objectList of policies using the runtime detection profile.
Policy metadata.
Show child attributesHide child attributes
idstring (uuid)requiredID of the policy.
namestringrequiredName of the policy.
versionintegerrequiredVersion of the profile linked to the policy.
pagesobjectrequiredShow child attributesHide child attributes
currentintegerrequiredThe 1-based page number being returned.
sizeintegerrequiredThe size of the page being returned.
totalinteger(Optional) The total number of pages that exist, if pageTotal=true in the request.
itemsinteger(Optional) The total number of items across all pages.
maxSizeintegerrequiredThe maximum page size that can be requested.
Errors¶
| Status | Meaning |
|---|---|
400 | Invalid request for fetching profiles. |
401 | Authentication failed. |
403 | Authorization failed. |
500 | Unexpected error. |
All error responses share the same shape — see the error response object.
Response examples¶
200¶
{
"items": [
{
"id": "8adde1bf-3f94-451f-b218-3bbd2cb7010c",
"name": "RTD Profile 1",
"defaultContentId": "8adde1bf-3f94-451f-b218-3bbd2cb7010c",
"contentVersion": "3.4.8",
"createdAt": "2024-06-17T11:51:08",
"version": 3,
"policies": [
{
"id": "8adde1bf-3f94-451f-b218-3bbd2cb7010c",
"name": "RTD Profile 1",
"version": 3
}
]
}
],
"pages": {
"current": 0,
"size": 0,
"total": 0,
"items": 0,
"maxSize": 0
}
}
See the guide for a narrative walkthrough of this API.