Files
cloudkitty/doc/source/api-reference/v2/api_samples/dataframes/dataframes_post.json
Justin Ferrieu 6e8efde432 Add a v2 API endpoint to push DataFrame objects
A new endpoint has been made available to admin users on
``POST /v2/dataframes``. This will allow end users to push
DataFrames in the form of JSON objects into the CloudKitty
storage.

Documentation and unit tests are included in this commit.

Depends-On: https://review.opendev.org/#/c/668669/
Change-Id: I42641462ecbac89f400a257805fc99f4027903b3
Story: 2005890
Task: 35953
2019-08-26 08:37:32 +00:00

97 lines
3.0 KiB
JSON

{
"dataframes": [
{
"period": {
"begin": "20190723T122810Z",
"end": "20190723T132810Z"
},
"usage": {
"metric_one": [
{
"vol": {
"unit": "GiB",
"qty": 1.2
},
"rating": {
"price": 0.04
},
"groupby": {
"group_one": "one",
"group_two": "two"
},
"metadata": {
"attr_one": "one",
"attr_two": "two"
}
}
],
"metric_two": [
{
"vol": {
"unit": "MB",
"qty": 200.4
},
"rating": {
"price": 0.06
},
"groupby": {
"group_one": "one",
"group_two": "two"
},
"metadata": {
"attr_one": "one",
"attr_two": "two"
}
}
]
}
},
{
"period": {
"begin": "20190823T122810Z",
"end": "20190823T132810Z"
},
"usage": {
"metric_one": [
{
"vol": {
"unit": "GiB",
"qty": 2.4
},
"rating": {
"price": 0.08
},
"groupby": {
"group_one": "one",
"group_two": "two"
},
"metadata": {
"attr_one": "one",
"attr_two": "two"
}
}
],
"metric_two": [
{
"vol": {
"unit": "MB",
"qty": 400.8
},
"rating": {
"price": 0.12
},
"groupby": {
"group_one": "one",
"group_two": "two"
},
"metadata": {
"attr_one": "one",
"attr_two": "two"
}
}
]
}
}
]
}