Get permission sets¶
GET/
Organization API · Organization role management
Get permission set details.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Organization-ID | header | string (uuid) | Yes | Organization ID. |
fields | query | array of string | No | The fields to return in a partial response. |
type | query | string (enum) | No | Type of permission set. 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.central.sophos.com/organization/v1/roles/permission-sets" -H "Authorization: Bearer <access-token>" -H "X-Organization-ID: <organization-id>"
import requests
response = requests.get(
"https://api.central.sophos.com/organization/v1/roles/permission-sets",
headers={
"Authorization": "Bearer <access-token>",
"X-Organization-ID": "<organization-id>",
},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Organization-ID" = "<organization-id>"
}
Invoke-RestMethod -Method GET -Uri "https://api.central.sophos.com/organization/v1/roles/permission-sets" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.central.sophos.com/organization/v1/roles/permission-sets", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <access-token>")
req.Header.Set("X-Organization-ID", "<organization-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.central.sophos.com/organization/v1/roles/permission-sets", {
method: "GET",
headers: {
"Authorization": "Bearer <access-token>",
"X-Organization-ID": "<organization-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
200 — List of permission sets.¶
Response fields
itemsarray of objectrequiredList of permission sets.
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 with 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.
See the guide for a narrative walkthrough of this API.