Docs‎ > ‎CA Live API Creator‎ > ‎Create‎ > ‎Resources‎ > ‎REST APIs‎ > ‎

Summary Information

As part of any POST, PUT or DELETE response, you can get a summary of the rules that were executed in the transaction.

Transaction Summary  

It is common that updates have computational side effects. This can be both on rows updated, or related data. For example, paying an order would reduce the customers' balance.

Good UI design entails these results are shown to the End User. In many cases, this sadly requires a subsequent "fetch for refresh". This is inefficient, and in some cases not possible when the refreshed data has a system-generated primary key.

 API Creator therefore sends back the update response that contains all the updated rows. These are coerced into the types designated in the updating resource.

The diagram below illustrates that you can see transaction summary arising from marking an order as paid in the Rest Lab, showing the affected customer information.



Rules Summary

You can also obtain the Rules Summary:



JSON

The actual JSON is shown below.


{
  "statusCode": 200,
  "txsummary": [
    {
      "@metadata": {
        "href": "http://localhost:8080/APICreator/rest/demo1/OneCustomer.Orders/1",
        "resource": "OneCustomer.Orders",
        "verb": "UPDATE",
        "checksum": "767423ee17fdc97a6daf5f80f4481a20"
      },
      "order_number": 1,
      "amount_total": 35,
      "paid": false,
      "notes": "This is a small order",
      "customer_name": "Alpha and Sons"
    },
    {
      "@metadata": {
        "href": "http://localhost:8080/APICreator/rest/demo1/OneCustomer/Alpha and Sons",
        "resource": "OneCustomer",
        "verb": "UPDATE",
        "checksum": "1af862cf2b102a7c1c8ed540183b46a2"
      },
      "name": "Alpha and Sons",
      "balance": 155,
      "credit_limit": 900
    }
  ],
  "rulesummary": [
    {
      "type": "LOGIC_RUNNER",
      "entity": "purchaseorder",
      "pk": "purchaseorder[{order_number=1}]",
      "subtype": "BEGINUPDATE"
    },
    {
      "type": "BEFORE_ACTION",
      "entity": "purchaseorder",
      "pk": "purchaseorder[{order_number=1}]"
    },
    {
      "type": "AFTER_ACTION",
      "entity": "purchaseorder",
      "pk": "purchaseorder[{order_number=1}]"
    },
    {
      "type": "AFTER_AGGREGATE",
      "entity": "customer",
      "pk": "customer[{name=Alpha and Sons}]",
      "OldValue": 120
    },
    {
      "type": "LOGIC_RUNNER",
      "entity": "customer",
      "pk": "customer[{name=Alpha and Sons}]",
      "subtype": "BEGINUPDATE"
    },
    {
      "type": "AFTER_CONSTRAINT",
      "entity": "customer",
      "pk": "customer[{name=Alpha and Sons}]"
    },
    {
      "type": "LOGIC_RUNNER",
      "entity": "customer",
      "pk": "customer[{name=Alpha and Sons}]",
      "subtype": "END"
    },
    {
      "type": "LOGIC_RUNNER",
      "entity": "purchaseorder",
      "pk": "purchaseorder[{order_number=1}]",
      "subtype": "END"
    },
    {
      "type": "BEFORE_COMMIT"
    },
    {
      "type": "AFTER_COMMIT"
    }
  ]
}