Skip to content

List profiles

GET/profiles

Cloud Security API · runtime-detections

List runtime detection profiles (Latest version).

Required permissioncns_runtime_detection:read

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 objectrequired
List of runtime detection profiles.
Runtime detection profile metadata.
Show child attributesHide child attributes
idstring (uuid)required
ID of the runtime detection profile.
namestringrequired
Name of the runtime detection profile.
defaultContentIdstring (uuid)required
ID of the default content used to create the runtime detection profile.
contentVersionstring
Version of the default content used to create the runtime detection profile.
createdAtstring (date-time)required
Creation date of the runtime detection profile in UTC.
versionintegerrequired
Latest version of the runtime detection profile.
policiesarray of object
List of policies using the runtime detection profile.
Policy metadata.
Show child attributesHide child attributes
idstring (uuid)required
ID of the policy.
namestringrequired
Name of the policy.
versionintegerrequired
Version of the profile linked to the policy.
pagesobjectrequired
Show child attributesHide child attributes
currentintegerrequired
The 1-based page number being returned.
sizeintegerrequired
The 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.
maxSizeintegerrequired
The 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.