APG PayAPG Paydocs

Reference data

List rule decisions

GET/rule-decisions
Request
GEThttps://api.tst.au.apgpay.dev/rule-decisions
curl -X GET https://api.tst.au.apgpay.dev/rule-decisions \
  -H "Authorization: Bearer $API_KEY"

Return a page of the decisions made for one target in one area, latest first, each with the fields it read and what each rule did.

Permissions

Required permission
rules:query

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

Query parameters

pageinteger (int32)

Offset pagination: 1-based page number. Mutually exclusive with the cursor parameters.

startingAfterstring

Cursor pagination, moving forward: the id of the last item on the current page. Mutually exclusive with page.

endingBeforestring

Cursor pagination, moving backward: the id of the first item on the current page. Mutually exclusive with page.

limitinteger (int32)

Maximum items per page.

columnsarray of RdecColumn

Columns to include, in order, when asking for text/csv. Omit for all of them. Sending it with application/json is a 400.

domainstring
required

The area whose decisions are listed, as ruleAreaId names it.

targetIdstring
required

The target the decisions were made for, as a contextual id or as the 24 hexadecimal characters of its id without the prefix.

Responses

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

Discriminated by type
type = "RdecPageAttributes"
hasMorebooleanrequired

Whether further items exist after this page.

Example true

nextStartingAfterstring

Id to pass as startingAfter to fetch the next page. Present in cursor mode only.

totalCountinteger (int64)

Total items matching the query.

Example 42

pageinteger (int32)

The 1-based page returned. Present in offset mode only.

Example 1250

totalPagesinteger (int32)

Total pages available. Present in offset mode only.

Example 1250

Example
{
  "type": "RdecPageAttributes",
  "data": [
    {
      "type": "RdecViewAttributes",
      "ruleDecisionId": "rdec_9f2Kd8QpLzXw",
      "domain": "string",
      "owner": {
        "type": "RpolOwnerEnterprise",
        "enterpriseId": "ent_9f2Kd8QpLzXw"
      },
      "snapshotVersion": 1250,
      "targetId": "string",
      "targetVersion": 1250,
      "matchedRuleIds": [
        "rpol_9f2Kd8QpLzXw"
      ],
      "shadowRuleIds": [
        "rpol_9f2Kd8QpLzXw"
      ],
      "namedLists": [
        {
          "type": "RdecListAttributes",
          "namedListId": "nlst_9f2Kd8QpLzXw",
          "version": 1250
        }
      ],
      "outcome": "NoMatch",
      "decidedAt": "2026-08-19T04:21:07Z",
      "inputs": [
        {
          "type": "RdecInputAttributes",
          "field": "string",
          "sensitivity": "Plain",
          "value": {
            "type": "RdecValueAbsent"
          }
        }
      ],
      "results": [
        {
          "type": "RdecResultAttributes",
          "rulePolicyId": "rpol_9f2Kd8QpLzXw",
          "ruleVersion": 1250,
          "templateId": "string",
          "templateVersion": 1250,
          "mode": "Shadow",
          "matched": true,
          "action": "string",
          "arguments": [
            {
              "type": "RdecArgumentAttributes",
              "argument": "string",
              "sensitivity": "Plain",
              "value": {
                "type": "RdecValueAbsent"
              }
            }
          ]
        }
      ]
    }
  ],
  "hasMore": true,
  "nextStartingAfter": "string",
  "totalCount": 42,
  "page": 1250,
  "totalPages": 1250
}

Error responses