Skip to content

Openportal Allocation User Usage

Operations Summary

Method Endpoint Description
GET /api/openportal-allocation-user-usage/ List Openportal Allocation User Usage
GET /api/openportal-allocation-user-usage/{id}/ Retrieve

List Openportal Allocation User Usage

1
2
3
4
http \
  GET \
  https://api.example.com/api/openportal-allocation-user-usage/ \
  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.openportal_allocation_user_usage import openportal_allocation_user_usage_list # (1)

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

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

try {
  const response = await openportalAllocationUserUsageList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
allocation string
allocation_uuid string (uuid)
month integer
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
user string
user_uuid string (uuid)
year integer

200 -

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

Field Type
node_usage string (decimal)
month integer
year integer
allocation string (uri)
user string (uri)
username string
full_name string

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/openportal-allocation-user-usage/123/ \
  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.openportal_allocation_user_usage import openportal_allocation_user_usage_retrieve # (1)

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

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

try {
  const response = await openportalAllocationUserUsageRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "id": 123
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required Description
id integer A unique integer value identifying this allocation user usage.

200 -

Field Type
node_usage string (decimal)
month integer
year integer
allocation string (uri)
user string (uri)
username string
full_name string