Skip to content

Update profile name

PUT/profiles/{profileId}

Cloud Security API · runtime-detections

Update the name of a runtime detection profile.

Required permissioncns_runtime_detection:write

Parameters

Name In Type Required Description
X-Tenant-ID header string (uuid) Yes Tenant ID.
profileId path string (uuid) Yes Runtime detection profile ID.
name query string Yes Runtime detection profile name to use.
Must be 1–50 characters long.

Request samples

curl -X PUT "https://api-<data-region>.central.sophos.com/cloud-security/v1/profiles/<profileId>?name=<name>" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"

import requests

response = requests.put(
    "https://api-<data-region>.central.sophos.com/cloud-security/v1/profiles/<profileId>?name=<name>",
    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 PUT -Uri "https://api-<data-region>.central.sophos.com/cloud-security/v1/profiles/<profileId>?name=<name>" -Headers $headers

package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, err := http.NewRequest("PUT", "https://api-<data-region>.central.sophos.com/cloud-security/v1/profiles/<profileId>?name=<name>", 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/<profileId>?name=<name>", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Tenant-ID": "<tenant-id>",
  },
});
const data = await response.json();
console.log(data);

Responses

200 — Runtime detection profile name updated.

Errors

Status Meaning
400 Invalid request for updating the profile name.
401 Authentication failed.
403 Authorization failed.
404 Profile ID doesn't exist.
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.