
The V2 summary endpoint uses a quite unconventional data format in the response. Currently, the format is the following: ``` {"total": <number of elements in the response>, "results": [array of arrays of data], "columns": [array of columns]} ``` To process this, we need to find the index of a column in the column list, and with this index, we retrieve the data in the array of data that is found in the array of results. The proposal is to use the following format in the response. ``` {"total": <number of elements in the response>, "results": [array of objects/dictionary]} ``` With this new format, one does not need to consult the index of a column to retrieve data in one of the entries. We would only need to retrieve the data in the entry using its column name. Therefore, the coding feels more natural. To maintain compatibility, this new format would be only applied when an option is sent to CloudKitty via `response_format` option. Depends-on: https://review.opendev.org/c/openstack/cloudkitty/+/793973 Change-Id: I5869d527e6e4655c653b6852d6fb7bebc9d71520
5 lines
131 B
YAML
5 lines
131 B
YAML
---
|
|
features:
|
|
- |
|
|
Introduce ``response_format`` option for the V2 summary API, which can
|
|
facilitate parsing the response. |