AlmondTill/G3N API

On this page

reportCatalog

query · in the family Reading your records

What it does

List the ready-made reports — sales, payments and cash, inventory, purchasing, loyalty, gift cards, people and orders — each with the question it answers, the parameters it takes, its columns, and whether your role may run it.

THE REPORT CATALOGUE as YOU see it (THE REPORTS PROGRAM slice — R-110): every canned report — its key, group, title, the question it answers, the parameters it takes (period · lens · person · record · axis · status · option), its columns with their words, the engine that computes it, the families it reads and who may run it — WITH your own verdict per row: allowed (every family it reads is listable by your role, or the self lane over your own records) or the why in words (never a silent absence). Run one with reportRun(catalogKey, params). Born paginated (limit · nextToken over the bounded catalogue).

What happens

Read-only: nothing runs and nothing is saved. Every report is listed with your own verdict — allowed, or the reason it is closed to your role (a report reads only records your role may already list; a few run for anyone over their own records). Run one with reportRun and its key; the list is paged.

Who may call it

Capability area: Reading your records — Looking up and listing the records of your organization.

Arguments

NameTypeRequiredNotes
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe cursor from the previous page, passed back exactly as received.

Returns

ReportCatalogPage ReportCatalogPage! — One page of the report catalogue (born paginated — limit · nextToken over the bounded catalogue).

This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. See paging.

Example request

query ExampleReportCatalog($limit: Int) {
  reportCatalog(limit: $limit) {
    items {
      key
      group
      title
      question
      engine
      reads
      selfLane
      roles
      allowed
      lane
      why
    }
    nextToken
  }
}

Variables:

{
  "limit": 1
}

Example response

{
  "data": {
    "reportCatalog": {
      "items": [
        {
          "key": "<key>",
          "group": "<group>",
          "title": "Blue jeans",
          "question": "<question>",
          "engine": "<engine>",
          "reads": [
            "<reads>"
          ],
          "selfLane": "<self lane>",
          "roles": "<roles>",
          "allowed": true,
          "lane": "<lane>",
          "why": "<why>"
        }
      ],
      "nextToken": "<the cursor from the previous page>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer