Administrators¶
The endpoint(s) available here are for managing administrators in your account.
PUT /administrators/<int:person_id>¶
Assign administrators to certain roles by their ID.
Path parameters:
person_id: The ID for the administrator.
Required parameters:
roles: A list of the role(s) the administrator should have as strings.
Optional parameters:
None
Example request:
curl -X PUT https://landscape.canonical.com/api/v2/administrators/6 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JWT" \
-d '{"roles": ["ServerAdmin", "DesktopAdmin"]}'
Example response:
{
"email": "robert@example.com",
"id": 6,
"name": "Robert Frost",
"roles": [
"DesktopAdmin",
"ServerAdmin"
]
}
GET /max-people-count¶
Get the maximum number of administrators allowed in the current account.
Path parameters:
None
Query parameters:
None
Example request:
curl -X GET https://landscape.canonical.com/api/v2/max-people-count -H "Authorization: Bearer $JWT"
Example response:
{
"max_people_count": 5
}