Skip to content

Update comment

PUT/software/comments/{staticPackageId}

Endpoint API · Packages

Add/Update the static package comment.

Required permissionendpoint-versions:update

Parameters

Name In Type Required Description
X-Tenant-ID header string (uuid) Yes Tenant ID.
staticPackageId path string (uuid) Yes Static package ID.

Request body

Content type: application/json

Request body fields

commentstringrequired
The comment (can only include hyphens, letters, digits, spaces, tabs, line breaks, commas, or dots).
Must match the pattern ^[-\p{L}\p{N}\s,.]+$. Must be 1–5000 characters long.

Request samples

curl -X PUT "https://api-<data-region>.central.sophos.com/endpoint/v1/software/comments/<staticPackageId>" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>" -H "Content-Type: application/json" -d "{
  \"comment\": \"string\"
}"

import requests

response = requests.put(
    "https://api-<data-region>.central.sophos.com/endpoint/v1/software/comments/<staticPackageId>",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Tenant-ID": "<tenant-id>",
        "Content-Type": "application/json",
    },
    json={'comment': 'string'},
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Tenant-ID" = "<tenant-id>"
    "Content-Type" = "application/json"
}
$body = '{
  "comment": "string"
}'
Invoke-RestMethod -Method PUT -Uri "https://api-<data-region>.central.sophos.com/endpoint/v1/software/comments/<staticPackageId>" -Headers $headers -Body $body -ContentType "application/json"

package main

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

func main() {
    req, err := http.NewRequest("PUT", "https://api-<data-region>.central.sophos.com/endpoint/v1/software/comments/<staticPackageId>", strings.NewReader(`{
  "comment": "string"
}`))
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer <access-token>")
    req.Header.Set("X-Tenant-ID", "<tenant-id>")
    req.Header.Set("Content-Type", "application/json")

    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/endpoint/v1/software/comments/<staticPackageId>", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Tenant-ID": "<tenant-id>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "comment": "string"
}),
});
const data = await response.json();
console.log(data);

Responses

200 — Comment updated.

Response fields

packageobjectrequired
Static package.
Show child attributesHide child attributes
idstring (uuid)required
Static package ID.
namestringrequired
Static package description.
releasedAtstring (date)required
Static package publication date.
expiresAtstring (date)required
Static package expiration date.
typestringrequired
Static package type.
Must be one of: fixed, special, lts.
platformstringrequired
OS platform type.
Must be one of: windows, linux, macOS.
endpointTypestring
Endpoint type. Please note that the type securityVm is no longer used.
Must be one of: computer, server, securityVm.
modulesarray of objectrequired
Endpoint modules in this static package.
Single endpoint module.
Show child attributesHide child attributes
namestringrequired
The installed endpoint module.
Must be one of: coreAgent, deviceEncryption, interceptX, mdr.
versionstringrequired
Module version.
packageNotesUrlstring (uri)
Link to the static package release notes.
visiblebooleanrequired
If the software package is visible and assignable to policies.
idstring (uuid)required
ID of the static package.
commentstringrequired
Descriptive comment associated with the static package.

Errors

Status Meaning
400 Bad request.
404 Comment and/or static package not found.
500 Unexpected error.

All error responses share the same shape — see the error response object.

Response examples

200

{
  "package": {
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "string",
    "releasedAt": "2022-10-12",
    "expiresAt": "2022-02-12",
    "type": "fixed",
    "platform": "windows",
    "endpointType": "computer",
    "modules": [
      {
        "name": "coreAgent",
        "version": "2022.1.0.40"
      }
    ],
    "packageNotesUrl": "https://example.com",
    "visible": true
  },
  "id": "00000000-0000-0000-0000-000000000000",
  "comment": "Use this static package for special servers"
}

See the guide for a narrative walkthrough of this API.