APG PayAPG Paydocs

Reporting

Get report dataset

GET/report-datasets/{reportDatasetId}
Request
GEThttps://api.tst.au.apgpay.dev/report-datasets/{reportDatasetId}
curl -X GET https://api.tst.au.apgpay.dev/report-datasets/{reportDatasetId} \
  -H "Authorization: Bearer $API_KEY"

Return one dataset: its dimensions, measures and time grains. The caller may keep the answer for five minutes.

Permissions

Required permission
reports:query

Requires the `query` action on `reports` for the supplied runtime context

Path parameters

reportDatasetIdstring
required

Responses

The response is a tagged shape: type is always "RdsetAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "RdsetAttributes"
reportDatasetIdstringrequired

The dataset's name, which is also its id.

domainstringrequired

The subject area the dataset belongs to.

labelstringrequired
descriptionstringrequired

The time grains a query may bucket by. Empty for a dataset with no time dimension.

defaultGrainstring

The grain a client uses when the person has not chosen one.

Only the dimensions this caller may see.

rowColumnsarray of string

The columns a query with no measures returns, one row per record. Empty when the dataset has no row mode.

suggestedChartsarray of RdsetChart
BigNumberTimeSeriesBarPieTableUnknown

Named filters a question can apply by name, in segments.

The kinds of custom period the dataset is asked by, named in an RqryRangePeriod with the period's own bounds.

timezonestringrequired

The timezone this caller's questions are answered in when they name none, an IANA name or an offset: the timezone every active merchant the caller reads keeps, or the dataset's where they keep several. It is the default over the caller's own scope; a question narrowed with narrowTo takes the default of the tenants it narrows to, which may differ. A question's timezone overrides it.

The rules every question of this dataset is held to. Each dimension, measure and grain carries the rules a question naming it is held to.

What a row of an answer is, read from several of its measures, such as a customer's credit status. An answer carries a RowStatus column for each status whose every measure the question asks. Only the statuses this caller may read every measure of are listed.

Example
{
  "type": "RdsetAttributes",
  "reportDatasetId": "string",
  "domain": "string",
  "label": "string",
  "description": "string",
  "grains": [
    {
      "type": "RdsetGrainAttributes",
      "name": "Ada Lovelace",
      "label": "string",
      "rules": [
        {
          "type": "RdsetRuleAggregateLimit",
          "max": 1250
        }
      ]
    }
  ],
  "defaultGrain": "string",
  "dimensions": [
    {
      "type": "RdsetDimensionAttributes",
      "name": "Ada Lovelace",
      "label": "string",
      "description": "string",
      "summary": "string",
      "kind": "Text",
      "lookup": "OwnValues",
      "values": {
        "type": "RdsetValuesEntered",
        "reason": "Requested by the customer."
      },
      "drillsTo": "string",
      "matchesText": true,
      "group": "string",
      "rules": [
        {
          "type": "RdsetRuleAggregateLimit",
          "max": 1250
        }
      ],
      "operators": [
        "Equals"
      ],
      "identifies": "Enterprise",
      "bands": [
        {
          "type": "RdsetStatusOutcomeAttributes",
          "label": "string",
          "tone": "Danger"
        }
      ],
      "currencyDimension": "AUD"
    }
  ],
  "measures": [
    {
      "type": "RdsetMeasureAttributes",
      "name": "Ada Lovelace",
      "label": "string",
      "description": "string",
      "summary": "string",
      "format": "Money",
      "currencyDimension": "AUD",
      "currency": "AUD",
      "decimals": 1250,
      "additivity": "Additive",
      "target": {
        "type": "RdsetTargetBands",
        "label": "string",
        "bands": [
          {
            "type": "RdsetTargetBandAttributes",
            "label": "string",
            "from": "string",
            "until": "string"
          }
        ]
      },
      "group": "string",
      "rules": [
        {
          "type": "RdsetRuleAggregateLimit",
          "max": 1250
        }
      ],
      "riseIs": "Good"
    }
  ],
  "rowColumns": [
    "string"
  ],
  "suggestedCharts": [
    "BigNumber"
  ],
  "segments": [
    {
      "type": "RdsetSegmentAttributes",
      "name": "Ada Lovelace",
      "label": "string",
      "description": "string"
    }
  ],
  "periods": [
    {
      "type": "RdsetPeriodAttributes",
      "name": "Ada Lovelace",
      "label": "string",
      "description": "string"
    }
  ],
  "timezone": "string",
  "rules": [
    {
      "type": "RdsetRuleAggregateLimit",
      "max": 1250
    }
  ],
  "statuses": [
    {
      "type": "RdsetStatusAttributes",
      "name": "Ada Lovelace",
      "label": "string",
      "description": "string",
      "measures": [
        "string"
      ],
      "rules": [
        {
          "type": "RdsetStatusRuleAttributes",
          "label": "string",
          "tone": "Danger",
          "tests": [
            {
              "type": "RdsetStatusTestAttributes",
              "measure": "string",
              "comparison": "Above",
              "value": "string",
              "passesAbsent": true
            }
          ]
        }
      ],
      "otherwise": {
        "type": "RdsetStatusOutcomeAttributes",
        "label": "string",
        "tone": "Danger"
      }
    }
  ]
}

Error responses