Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Under the Hood

Adriana Stefanova edited this page Jan 9, 2018 · 6 revisions

What has actually happened? Let's dig a bit deeper to get some idea how Abacus works.

Usage document

Dashboard reported new usage data via Abacus API. The document we submitted to Abacus, contains 100 API calls value. Abacus updates its stored aggregated usage data for that resource with the value we provided.

The rest of the fields in the usage document are used to specify who made the API calls (organization_id, space_id, consumer_id) and when did this happen (start and end).

The payload looks like this:

{
  "start": 1515159737498,
  "end": 1515159737498,
  "organization_id": "idz:sampleIdentityZoneId",
  "space_id": "sampleSpaceId",
  "consumer_id": "sampleConsumerId",
  "resource_id": "6d79654d-8344-4c08-8117-7f5157d50b2e",
  "plan_id": "standard",
  "resource_instance_id": "sampleResourceInstanceId",
  "measured_usage": [
    {
      "measure": "sampleName",
      "quantity": "100"
    }
  ]
}

Usage Report

Our demo application queries the current monthly usage via the Abacus API. We use the same user we send usage with.

The usage is per organization_id so we need to provide the same ID for which we submitted usage. Hence the URL for getting the usage contains the ID https://abacus-broker-test-app.<domain>/summary/idz:sampleIdentityZoneId

Plan

To update the aggregated values Abacus uses formulas defined in a "plan". We reference to the plan in the payload above, using the plan_id and resource_instance_id.

We need to develop and upload the plan to Abacus, so let's start by creating our first plan ...

<< Quick Start Create a Plan >>

Related Links:

Clone this wiki locally