Skip to content

Marketplace Component User Usages

Operations Summary

Method Endpoint Description
GET /api/marketplace-component-user-usages/ List Marketplace Component User Usages
GET /api/marketplace-component-user-usages/{uuid}/ Retrieve

List Marketplace Component User Usages

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-component-user-usages/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.marketplace_component_user_usages import marketplace_component_user_usages_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = marketplace_component_user_usages_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: marketplace_component_user_usages_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { marketplaceComponentUserUsagesList } from 'waldur-js-client';

try {
  const response = await marketplaceComponentUserUsagesList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
billing_period_month number
billing_period_year number
component_usage__billing_period string (date)
customer_uuid string (uuid)
date_after string (date)
date_before string (date)
field array
o array Ordering

offering_uuid string (uuid)
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
project_uuid string (uuid)
resource string Resource URL
resource_uuid string (uuid)
type string
username string

200 -

The response body is an array of objects, where each object has the following structure:

Field Type Description
uuid string (uuid)
user string (uri)
username string
component_usage string (uri)
usage integer
measured_unit string Unit of measurement, for example, GB.
description string
created string (date-time)
modified string (date-time)
backend_id string
resource_name string
resource_uuid string (uuid)
offering_name string
offering_uuid string (uuid)
project_name string
project_uuid string (uuid)
customer_name string
customer_uuid string (uuid)
component_type string Unique internal name of the measured unit, for example floating_ip.
date string (date-time)
billing_period string (date)

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/marketplace-component-user-usages/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.marketplace_component_user_usages import marketplace_component_user_usages_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = marketplace_component_user_usages_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: marketplace_component_user_usages_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { marketplaceComponentUserUsagesRetrieve } from 'waldur-js-client';

try {
  const response = await marketplaceComponentUserUsagesRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Name Type
field array

200 -

Field Type Description
uuid string (uuid)
user string (uri)
username string
component_usage string (uri)
usage integer
measured_unit string Unit of measurement, for example, GB.
description string
created string (date-time)
modified string (date-time)
backend_id string
resource_name string
resource_uuid string (uuid)
offering_name string
offering_uuid string (uuid)
project_name string
project_uuid string (uuid)
customer_name string
customer_uuid string (uuid)
component_type string Unique internal name of the measured unit, for example floating_ip.
date string (date-time)
billing_period string (date)