List zones for an account. See Using Global API Keys for more information on permission and scope requirements.
Successful Operation
Invalid Request
Access token is missing or invalid
You do not have permission to perform this action.
Entity not found
Too many requests
$apiKey = 'your_automox_api_key' $headers = @{ "Authorization" = "Bearer $apiKey" "Content-Type" = "application/json" } $url = "https://console.automox.com/api/accounts/{accountId}/zones" $response = (Invoke-WebRequest -Method Get -Uri $url -Headers $headers).Content
{- "data": [
- {
- "id": "00000000-0000-0000-0000-000000000001",
- "organization_id": 123456,
- "account_id": "00000000-0000-0000-0000-000000000002",
- "parent_id": "00000000-0000-0000-0000-000000000003",
- "name": "Zone 1",
- "created_by": {
- "id": "00000000-0000-0000-0000-000000000004",
- "user_id": 12345,
- "email": "user1@example.com",
- "first_name": "FirstName1",
- "last_name": "LastName1",
- "status": "active",
- "account_rbac_role": "global-admin",
- "is_verified": true,
- "two_factor_authentication": "email",
- "created_at": "2023-03-07T17:11:17+0000"
}, - "access_key": "00000000-0000-0000-0000-000000000005",
- "created_at": "2024-04-03T16:19:36+0000",
- "updated_at": "2024-04-03T16:19:36+0000",
- "tier": "tier3"
}, - {
- "id": "00000000-0000-0000-0000-000000000003",
- "organization_id": 654321,
- "account_id": "00000000-0000-0000-0000-000000000002",
- "parent_id": null,
- "name": "Zone 2",
- "created_by": [ ],
- "access_key": "00000000-0000-0000-0000-000000000006",
- "created_at": "2023-03-07T17:11:17+0000",
- "updated_at": "2023-03-07T17:11:17+0000",
- "tier": "tier3"
}
], - "metadata": {
- "total_pages": 1,
- "current_page": 0,
- "total_count": 2,
- "limit": 500,
- "links": [ ]
}
}