Get package comment¶
GET/
Endpoint API · Packages
Get the static package comment.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
staticPackageId | path | string (uuid) | Yes | Static package ID. |
Request samples¶
curl -X GET "https://api-<data-region>.central.sophos.com/endpoint/v1/software/comments/<staticPackageId>" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"
import requests
response = requests.get(
"https://api-<data-region>.central.sophos.com/endpoint/v1/software/comments/<staticPackageId>",
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/endpoint/v1/software/comments/<staticPackageId>" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api-<data-region>.central.sophos.com/endpoint/v1/software/comments/<staticPackageId>", 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/endpoint/v1/software/comments/<staticPackageId>", {
method: "GET",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
200 — Comment.¶
Response fields
packageobjectrequiredStatic package.
Show child attributesHide child attributes
idstring (uuid)requiredStatic package ID.
namestringrequiredStatic package description.
releasedAtstring (date)requiredStatic package publication date.
expiresAtstring (date)requiredStatic package expiration date.
typestringrequiredStatic package type.
Must be one of:
Must be one of:
fixed, special, lts.platformstringrequiredOS platform type.
Must be one of:
Must be one of:
windows, linux, macOS.endpointTypestringEndpoint type. Please note that the type
Must be one of:
securityVm is no longer used.Must be one of:
computer, server, securityVm.modulesarray of objectrequiredEndpoint modules in this static package.
Single endpoint module.
Show child attributesHide child attributes
namestringrequiredThe installed endpoint module.
Must be one of:
Must be one of:
coreAgent, deviceEncryption, interceptX, mdr.versionstringrequiredModule version.
packageNotesUrlstring (uri)Link to the static package release notes.
visiblebooleanrequiredIf the software package is visible and assignable to policies.
idstring (uuid)requiredID of the static package.
commentstringrequiredDescriptive 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.