title: Google Cloud Platform API - list used zones for compute engines
body: <p>When you want to list some resources using the Google Cloud Api usually the zone is required.
  E.g. if you wnat to list all VM instances you have to execute</p>
  
  <pre><code>compute.instances.list
  -----------------------
  GET https://www.googleapis.com/compute/v1/projects/{some project}/zones/{some zone}/instances?key={YOUR_API_KEY}
  </code></pre>
  
  <p>This is cool if you know the zone in advance, but I would like to list all available zones, let the user choose a zone and then list all instances in that project and zone. </p>
  
  <p>There is an endpoint that returns the zones for a given project:</p>
  
  <pre><code>compute.zones.list
  ------------------
  
  GET https://www.googleapis.com/compute/v1/projects/{some project}/zones?key={YOUR_API_KEY}
  </code></pre>
  
  <p>but it returns all available zones, even the ones that you don't have any resource in.</p>
  
  <p>Is there a way to get only the used zones? </p>