Quickstart

Make your first request to the Golden Reports GraphQL API in under five minutes.

Get your bearer token

All API requests require a bearer token. Sign in to the Golden Reports app and generate a token from Settings → API Access.

Your first query

The Golden Reports API is a single GraphQL endpoint:

https://api.goldenreports.dev/graphql

List your workspaces. List endpoints return a *NodesPage envelope with items and a cursor — see Pagination for details.

query {
  workspaces {
    items {
      id
      name
      description
    }
    cursor
  }
}

Send it with curl:

curl -X POST https://api.goldenreports.dev/graphql \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query":"{ workspaces { items { id name } cursor } }"}'

The response wraps everything in data:

{
  "data": {
    "workspaces": {
      "items": [
        { "id": "8b3f…", "name": "Acme Reporting" }
      ],
      "cursor": null
    }
  }
}

Render a report

Once you have a report set up in the app, you can export it to PDF or render it inline as HTML straight from the API. Use the report's code (set when the report was created):

query Export($code: String!) {
  exportedReport(
    code: $code
    pdf: { paperSize: A4, orientation: PORTRAIT }
  ) {
    downloadUrl
  }
}

The response contains a presigned URL — fetch it within the TTL to download the rendered file.

What's next

Was this page helpful?