Billing Data

Navigation:  Billing Integration (Supported Systems) > Billing API >

Billing Data

Previous pageReturn to chapter overviewNext page

Capture billing data requests:

 

get billable data by user

 

request:

 

GET https://kuberdock.master/api/usage/<username>

 

response:

 

array of user containers usage

 

{ “data”: {

 “ip_usage”:[

{

“end”: end_time,

“ip_address”: “address_here”,

“pod_id”: “pod_id”

“start”: start_time

 }, …

 ],

 “pd_usage”: [

         {

         “end”: end_time,

“pd_name”: “persistent_drive_name”,

“size”: “size”, // number in GB

“start”: start_time

         }, …

 ]

 “pods_usage”: [

         {

         “id”: “pod_id”,

“kube_id”: “kube_id”,

“kubes”: pod_kube_count,

“name” : “pod_name”,

“time”: {

“id”: [{ //container_id

“kubes”: “conatainer_kube_count”,

“start”: “timestamp”,

“end”: “timestamp”,

}, {...}], // each time period

“id”: [{...}],

… },

…},

“status”: “OK”

}

 

get all billable data

 

request:

 

GET https://kuberdock.master/api/usage

 

response:

 

array of users and their container` usage

 

“data”:{

 “username”:[{

“ip_usage”:[

 {

“end”: end_time,

“ip_address”: “address_here”,

“pod_id”: “pod_id”

“start”: start_time

 }, …

 ],

 “pd_usage”: [

         {

         “end”: end_time,

“pd_name”: “persistent_drive_name”,

“size”: “size”, // number in GB

“start”: start_time

         }, …

 ]

 “pods_usage”: [

         {

         “id”: “pod_id”,

“kube_id”: “kube_id”,

“kubes”: pod_kube_count,

“name” : “pod_name”,

“time”: {

“id”: [{ //container_id

“kubes”: “conatainer_kube_count”,

“start”: “timestamp”,

“end”: “timestamp”,

}, {...}], // each time period

“id”: [{...}],

… },

…}],

“next_username”:[{...}],

…},

“status”: “OK”

}