From 2335b02d573a79a00c969e9a315a696b7573b46e Mon Sep 17 00:00:00 2001 From: Diana Clarke Date: Thu, 29 Dec 2016 11:56:27 -0600 Subject: [PATCH] api-ref: microversion 2.40 overview Add a brief overview of the microversion 2.40 changes to the simple tenant usage api-ref. - limit - marker - max_limit - stitching results - next links Implements blueprint paginate-simple-tenant-usage Change-Id: I4421aaca23f0d7f00ae22ec7b0366d5d6791b26d --- api-ref/source/os-simple-tenant-usage.inc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/api-ref/source/os-simple-tenant-usage.inc b/api-ref/source/os-simple-tenant-usage.inc index 348a241d7895..bb9cfb4eea8f 100644 --- a/api-ref/source/os-simple-tenant-usage.inc +++ b/api-ref/source/os-simple-tenant-usage.inc @@ -8,6 +8,25 @@ Reports usage statistics of compute and storage resources periodically for an individual tenant or all tenants. The usage statistics will include all instances' CPU, memory and local disk during a specific period. +Microversion 2.40 added pagination (and ``next`` links) to the usage +statistics via optional ``limit`` and ``marker`` query parameters. If +``limit`` isn't provided, the configurable ``max_limit`` will be used which +currently defaults to 1000. Older microversions will not accept these new +paging query parameters, but they will start to silently limit by +``max_limit``. + +.. code-block:: none + + /os-simple-tenant-usage?limit={limit}&marker={instance_uuid} + /os-simple-tenant-usage/{tenant_id}?limit={limit}&marker={instance_uuid} + +.. note:: + + A tenant's usage statistics may span multiple pages when the number of + instances exceeds ``limit``, and API consumers will need to stitch together + the aggregate results if they still want totals for all instances in a + specific time window, grouped by tenant. + List Tenant Usage Statistics For All Tenants ============================================