CloudKitty REST API (v1)

Collector

GET /v1/collector

Unused function, hack to let pecan route requests to subcontrollers.

GET /v1/collector/mappings

Return the list of every services mapped to a collector.

Parameters:
  • collector (str) – Filter on the collector name.

Return:

Service to collector mappings collection.

Return type:

ServiceToCollectorMappingCollection

GET /v1/collector/mappings/(service)

Return a service to collector mapping.

Parameters:
  • service (str) – Name of the service to filter on.

Return type:

ServiceToCollectorMapping

POST /v1/collector/mappings

Create a service to collector mapping.

Parameters:
  • collector (str) – Name of the collector to apply mapping on.

  • service (str) – Name of the service to apply mapping on.

Return type:

ServiceToCollectorMapping

DELETE /v1/collector/mappings

Delete a service to collector mapping.

Parameters:
  • service (str) – Name of the service to filter on.

GET /v1/collector/states

Query the enable state of a collector.

Parameters:
  • name (str) – Name of the collector.

Return:

State of the collector.

Return type:

CollectorInfos

PUT /v1/collector/states

Set the enable state of a collector.

Parameters:
  • name (str) – Name of the collector.

  • infos (CollectorInfos) – New state informations of the collector.

Return:

State of the collector.

Return type:

CollectorInfos

Info

GET /v1/info/config

Return current configuration.

Return type:

dict(str: None)

GET /v1/info/metric

Get the metric list.

Return:

List of every metrics.

Return type:

CloudkittyMetricInfoCollection

GET /v1/info/metric/(metric_name)

Return a metric.

Parameters:
  • metric_name (str) – name of the metric.

Return type:

CloudkittyMetricInfo

GET /v1/info/service

Get the service list (deprecated).

Return:

List of every services.

Return type:

CloudkittyMetricInfoCollection

GET /v1/info/service/(service_name)

Return a service (deprecated).

Parameters:
  • service_name (str) – name of the service.

Return type:

CloudkittyMetricInfo

Rating

GET /v1/rating/modules

return the list of loaded modules.

Return:

name of every loaded modules.

Return type:

CloudkittyModuleCollection

GET /v1/rating/modules/(module_id)

return a module

Return:

CloudKittyModule

Return type:

CloudkittyModule

PUT /v1/rating/modules

Change the state and priority of a module.

Parameters:
  • module_id (str) – name of the module to modify

  • module (CloudkittyModule) – CloudKittyModule object describing the new desired state

Return type:

CloudkittyModule

POST /v1/rating/quote

Get an instant quote based on multiple resource descriptions.

Parameters:
  • res_data (CloudkittyResourceCollection) – List of resource descriptions.

Return:

Total price for these descriptions.

Return type:

float

GET /v1/rating/reload_modules

Trigger a rating module list reload.

Report

GET /v1/report/summary

Return the summary to pay for a given period.

Return type:

SummaryCollectionModel

GET /v1/report/tenants

Return the list of rated tenants.

Return type:

list(str)

GET /v1/report/total

Return the amount to pay for a given period.

Return type:

Decimal

Storage

GET /v1/storage/dataframes

Return a list of rated resources for a time period and a tenant.

Parameters:
  • begin (datetime) – Start of the period

  • end (datetime) – End of the period

  • tenant_id (str) – UUID of the tenant to filter on.

  • resource_type (str) – Type of the resource to filter on.

Return:

Collection of DataFrame objects.

Return type:

DataFrameCollection