Get zones (organizations) a user has been granted access to.

Retrieve zones (organizations) a user has been granted access to. See Using Global API Keys for more information on permission and scope requirements.

SecuritybearerAuth
Request
path Parameters
accountId
required
string <uuid>
Example: 3d89206d-754f-4308-8c81-b1c886f029cf
userId
required
string <uuid>
Example: ef519091-5a62-476d-add6-d40270f3ebed
Responses
200

OK

4XX

Invalid Request

get/accounts/{accountId}/users/{userId}/zones
Request samples
$apiKey = 'your_automox_api_key'
$headers = @{
    "Authorization" = "Bearer $apiKey"
    "Content-Type" = "application/json"
}
$url = "https://console.automox.com/api/accounts/{accountId}/users/{userId}/zones"
$response = (Invoke-WebRequest -Method Get -Uri $url -Headers $headers).Content
Response samples
application/json
{
  • "data": [
    • {
      • "rbac_role": "zone-admin",
      • "zone": {
        • "id": "bbe165cb-4793-48d5-8ffa-64973ef6e9d0",
        • "organization_id": 100751,
        • "account_id": "a18afd39-1182-4a78-8cd9-b410b9de2ea0",
        • "parent_id": "80c80102-2d0f-4c30-92c7-5c9e0ce102d0",
        • "name": "Test Zone 2",
        • "created_by": {
          • "id": "56e207a9-3b3e-48f1-b738-4172f11f70fd",
          • "user_id": 50687,
          • "email": "john.doe@example.com",
          • "first_name": "John",
          • "last_name": "Doe",
          • "status": "active",
          • "account_rbac_role": "global-admin",
          • "is_verified": true,
          • "two_factor_authentication": "email",
          • "created_at": "2021-10-20T16:03:25+0000"
          },
        • "access_key": "411747da-9467-41e5-920c-35142d47a06f",
        • "created_at": "2022-01-04T04:36:39+0000",
        • "updated_at": "2022-01-04T04:36:39+0000"
        }
      }
    ],
  • "metadata": {
    • "total_pages": 1,
    • "current_page": 0,
    • "total_count": 2,
    • "limit": 500
    }
}