---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [clients](../index.md) / listAllZones

# Function: listAllZones()

> **listAllZones**(`client`, `organizationId`): `Promise`\<[`ListAllZonesResult`](../interfaces/ListAllZonesResult.md)\>

Defined in: [packages/b2c-tooling-sdk/src/clients/cdn-zones.ts:188](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/8fc17d8708d025c83fb0c44ca73198a200605153/packages/b2c-tooling-sdk/src/clients/cdn-zones.ts#L188)

Lists every zone in the organization by paging through `zones/info`.

The endpoint returns at most 50 zones per request (25 by default) and does not
report a total, so paging continues until a page returns fewer than 50 zones.

## Parameters

### client

[`CdnZonesClient`](../type-aliases/CdnZonesClient.md)

CDN Zones client

### organizationId

`string`

Organization ID (see [toOrganizationId](toOrganizationId.md))

## Returns

`Promise`\<[`ListAllZonesResult`](../interfaces/ListAllZonesResult.md)\>

All zones, plus the API error if any page request failed

## Example

```ts
const client = createCdnZonesClient({shortCode, tenantId}, auth);
const {zones, error} = await listAllZones(client, toOrganizationId(tenantId));
```
