Get permission sets¶
GET/
Common API · Tenant role management
Get permission set details.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
fields | query | array of string | No | The fields to return in a partial response. |
type | query | string (enum) | No | Permission set type. Must be one of: base, product, setting. |
product | query | string (enum) | No | Filter permission sets associated with given product name. Must be one of: endpoint, server, mobile, encryption, emailGateway, webGateway, phishThreat, wireless, firewall, optix, ztna. |
access | query | string (enum) | No | Access level of permission set. Must be one of: admin, helpdesk, readOnly. |
allowedInCustomRole | query | boolean | No | Filter permissions sets allowed in custom roles. |
principalType | query | string (enum) | No | Principal type of role. Must be one of: user, service. |
Request samples¶
curl -X GET "https://api-<data-region>.central.sophos.com/common/v1/roles/permission-sets" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"
import requests
response = requests.get(
"https://api-<data-region>.central.sophos.com/common/v1/roles/permission-sets",
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/common/v1/roles/permission-sets" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api-<data-region>.central.sophos.com/common/v1/roles/permission-sets", 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/common/v1/roles/permission-sets", {
method: "GET",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
200 — List of permission sets.¶
Response fields
itemsarray of objectrequiredList of permission sets.
A permission set.
Show child attributesHide child attributes
idstringrequiredPermission set identifier.
namestringrequiredPermission set name.
descriptionstringPermission set description.
typestring (enum)requiredType of permission set.
Must be one of:
Must be one of:
base, product, setting.accessstring (enum)Access level of a permission set.
Must be one of:
Must be one of:
admin, helpdesk, readOnly.principalTypesarray of string (enum)requiredPrincipal types for which permission set is allowed.
Each item must be one of:
Each item must be one of:
user, service.productsarray of string (enum)List of products associated to a permission set of type product.
Items must be unique. Each item must be one of:
Items must be unique. Each item must be one of:
endpoint, server, mobile, encryption, emailGateway, webGateway, phishThreat, wireless, firewall, optix, ztna.allowedInCustomRolesbooleanrequiredSignifies if permission set is allowed in a custom role.
Errors¶
| Status | Meaning |
|---|---|
500 | Internal server error. |
All error responses share the same shape — see the error response object.