API - list all domains/zones

curl -X GET “h__ps___://api.Cloudflare.com/#zone-list-zones” -H “Authorization: Bearer TOKEN” -H “Content-Type:application/json”
this lists out a ton of metadata, the api is working.
using api token with read permissions on everything.
My Goal - A list of all 1100 domains/zones we have in Cloudflare, exporting to csv or something I can parse. I’m a curl rookie, I have been trying this for over an hour. The syntax has to be simple right?

Thanks, Jon

You’ll have to do it many times, 1 page at a time, because it’s 50 max per page.

https://api.cloudflare.com/#zone-list-zones

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.