cdn.pizzaDocumentation

Developers

GraphQL

The current GraphQL endpoint accepts a deliberately limited query subset.

#Overview

The current GraphQL endpoint accepts a deliberately limited query subset.

#Currently supported subset

The /api/graphql endpoint is protected like the rest of the API. It recognizes zones, files, stats, and nodes queries and scopes every result to the authenticated organization.

The current parser is not a general GraphQL server: introspection, mutations, complex fragments, and arbitrary fields are not guaranteed. An unsupported query returns an errors array; files are limited to 50 in this version.

#Send a query

  1. Put query text in the JSON query property.

  2. Add variables only when the query uses them.

  3. Check for errors even with a JSON HTTP response.

  4. Treat missing fields as incompatibility, not an assumed null.

#Available queries

This interface is a read-only subset without introspection or general mutations.

#zones

All zones in the organization.

Fields: id name domain isActive isVerified status region publicFilesReady

graphql
query {
  zones {
    id
    name
    domain
    isActive
    isVerified
    status
    region
    publicFilesReady
  }
}

#files

The first 50 visible files.

Fields: id uuid name size mimeType url publicPath

graphql
query {
  files {
    id
    uuid
    name
    size
    mimeType
    url
    publicPath
  }
}

#stats

Aggregates for the last 30 days.

Fields: totalRequests totalBandwidth zonesCount filesCount

graphql
query {
  stats {
    totalRequests
    totalBandwidth
    zonesCount
    filesCount
  }
}

#nodes

Organization nodes, without IP addresses.

Fields: id hostname region status

graphql
query {
  nodes {
    id
    hostname
    region
    status
  }
}
Customer documentationReference generated from published interfaces