Skip to main content
This guide verifies API access by listing your project’s CDN distributions. It does not create or change resources.

Before you begin

  • Select a project and activate Cloud CDN.
  • Have permission to create API keys and grant the key permission to list distributions.
  • Use Bash with curl, or PowerShell. The examples below do not require an SDK.
If you are using Cloud DNS instead, use /cloud-dns/zones in place of /cloud-cdn/distributions and grant permission to list zones. Your organization needs the corresponding active service.

1. Create the credentials

In the Management Console, select your project and open Developers → Create API key. Name the key for its workload and grant only the list permission needed for this request. Save both the access key, which begins with APTRANET_, and its secret. The secret is shown only when created or rolled. The key’s project is permanent; switching the console project does not change the key.

2. Send the request

Send both credential headers. Omit the console’s project query parameter and organization header: the API key already identifies the project.
Bash examples elsewhere in these docs use $APTRANET_ACCESS_KEY and $APTRANET_SECRET from this step. For unattended workloads, supply these values through your deployment’s secret store.

3. Check the response

An empty Cloud DNS zone collection returns 200 with []. Do not attempt to parse a 204 response as JSON. PowerShell reports non-success HTTP responses as errors; inspect their status before retrying. When finished with an interactive session, clear the variables:

Continue