libs/billing-api-client/src/docs/UsageApi.md
All URIs are relative to http://localhost:6100
| Method | HTTP request | Description |
|---|---|---|
| getCurrentUsage | GET /organization/{organizationId}/usage | Get organization usage |
| getPastUsage | GET /organization/{organizationId}/usage/past | Get organization usage |
| getV2CurrentUsage | GET /v2/organization/{organizationId}/usage | Get organization usage |
| getV2PastUsage | GET /v2/organization/{organizationId}/usage/past | Get organization usage |
OrganizationUsage getCurrentUsage()
Get organization usage
import {
UsageApi,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new UsageApi(configuration);
let organizationId: string; //Organization ID (default to undefined)
const { status, data } = await apiInstance.getCurrentUsage(
organizationId
);
| Name | Type | Description | Notes |
|---|---|---|---|
| organizationId | [string] | Organization ID | defaults to undefined |
OrganizationUsage
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationUsage getPastUsage()
Get organization usage
import {
UsageApi,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new UsageApi(configuration);
let organizationId: string; //Organization ID (default to undefined)
let periods: number; //Periods (optional) (default to undefined)
const { status, data } = await apiInstance.getPastUsage(
organizationId,
periods
);
| Name | Type | Description | Notes |
|---|---|---|---|
| organizationId | [string] | Organization ID | defaults to undefined |
| periods | [number] | Periods | (optional) defaults to undefined |
OrganizationUsage
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationUsage getV2CurrentUsage()
Get organization usage from v2 billing
import {
UsageApi,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new UsageApi(configuration);
let organizationId: string; //Organization ID (default to undefined)
const { status, data } = await apiInstance.getV2CurrentUsage(
organizationId
);
| Name | Type | Description | Notes |
|---|---|---|---|
| organizationId | [string] | Organization ID | defaults to undefined |
OrganizationUsage
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Array<OrganizationUsage> getV2PastUsage()
Get historical organization usage from v2 billing
import {
UsageApi,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new UsageApi(configuration);
let organizationId: string; //Organization ID (default to undefined)
let periods: number; //Periods (optional) (default to undefined)
const { status, data } = await apiInstance.getV2PastUsage(
organizationId,
periods
);
| Name | Type | Description | Notes |
|---|---|---|---|
| organizationId | [string] | Organization ID | defaults to undefined |
| periods | [number] | Periods | (optional) defaults to undefined |
Array<OrganizationUsage>
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]