List all admins¶
GET/
Partner API · Partner Admins
List all partner admins.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Partner-ID | header | string (uuid) | Yes | Partner ID. |
page | query | integer | No | The page number to fetch, starting with 1. |
pageSize | query | integer | No | The size of the page requested. |
pageTotal | query | boolean | No | Whether the number of pages should be calculated and returned in the response. |
sort | query | array of string | No | Defines how to sort the data. Each item must match the pattern (^[^:]+$)|(^[^:]+:(asc|desc)$). |
fields | query | array of string | No | The fields to return in a partial response. |
search | query | string | No | Search for items that match the given terms. |
email | query | string | No | Search by email. |
roleId | query | string (uuid) | No | Search by role ID. |
withAccessToTenant | query | string (uuid) | No | Search for admins that have access to the given tenant. |
Request samples¶
curl -X GET "https://api.central.sophos.com/partner/v1/admins" -H "Authorization: Bearer <access-token>" -H "X-Partner-ID: <partner-id>"
import requests
response = requests.get(
"https://api.central.sophos.com/partner/v1/admins",
headers={
"Authorization": "Bearer <access-token>",
"X-Partner-ID": "<partner-id>",
},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Partner-ID" = "<partner-id>"
}
Invoke-RestMethod -Method GET -Uri "https://api.central.sophos.com/partner/v1/admins" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.central.sophos.com/partner/v1/admins", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <access-token>")
req.Header.Set("X-Partner-ID", "<partner-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/partner/v1/admins", {
method: "GET",
headers: {
"Authorization": "Bearer <access-token>",
"X-Partner-ID": "<partner-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
200 — Paged array of partner admins.¶
Response fields
itemsarray of objectrequiredPartner administrators.
Partner administrator.
Show child attributesHide child attributes
idstring (uuid)requiredAdministrator ID.
usernamestring (email)requiredAdministrator username (email).
profileobjectrequiredProfile information for partner administrator.
Show child attributesHide child attributes
namestringrequiredFull name.
firstNamestringrequiredFirst name.
lastNamestringrequiredLast name.
phonestringPhone number.
mobilestringMobile phone number.
faxstringFax number.
activebooleanrequiredWhether the administrator is active.
primarybooleanrequiredWhether this is the primary administrator for the account.
roleAssignmentsarray of objectrequiredAdministrator's role assignments.
Role assignment.
Show child attributesHide child attributes
idstring (uuid)requiredRole assignment ID.
roleIdstring (uuid)requiredRole ID.
roleNamestringRole name.
scopeobjectrequiredRole assignment scope.
Show child attributesHide child attributes
typestringrequiredRole assignment scope type.
Must be one of:
Must be one of:
tenant, allManagedTenants, self, tenantGroup.idstring (uuid)Tenant ID. Optional or not present when
type is allManagedTenants or self.namestringTenant name. Optional or not present when
type is allManagedTenants or self.pagesobjectrequiredShow child attributesHide child attributes
currentintegerrequiredThe 1-based page number being returned.
sizeintegerrequiredThe size of the page being returned.
totalinteger(Optional) The total number of pages that exist, if pageTotal=true in the request.
itemsinteger(Optional) The total number of items across all pages.
maxSizeintegerrequiredThe maximum page size that can be requested.
Errors¶
| Status | Meaning |
|---|---|
500 | Unexpected error. |
All error responses share the same shape — see the error response object.
Response examples¶
200¶
{
"items": [
{
"id": "00000000-0000-0000-0000-000000000000",
"username": "user@example.com",
"profile": {
"name": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"mobile": "string",
"fax": "string"
},
"active": true,
"primary": false,
"roleAssignments": [
{
"id": "00000000-0000-0000-0000-000000000000",
"roleId": "00000000-0000-0000-0000-000000000000",
"roleName": "string",
"scope": {
"type": "tenant",
"id": "00000000-0000-0000-0000-000000000000",
"name": "string"
}
}
]
}
],
"pages": {
"current": 0,
"size": 0,
"total": 0,
"items": 0,
"maxSize": 0
}
}
See the guide for a narrative walkthrough of this API.