Back to Daytona

UsageApi

libs/billing-api-client/src/docs/UsageApi.md

0.178.05.4 KB
Original Source

UsageApi

All URIs are relative to http://localhost:6100

MethodHTTP requestDescription
getCurrentUsageGET /organization/{organizationId}/usageGet organization usage
getPastUsageGET /organization/{organizationId}/usage/pastGet organization usage
getV2CurrentUsageGET /v2/organization/{organizationId}/usageGet organization usage
getV2PastUsageGET /v2/organization/{organizationId}/usage/pastGet organization usage

getCurrentUsage

OrganizationUsage getCurrentUsage()

Get organization usage

Example

typescript
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
);

Parameters

NameTypeDescriptionNotes
organizationId[string]Organization IDdefaults to undefined

Return type

OrganizationUsage

Authorization

JwtAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getPastUsage

OrganizationUsage getPastUsage()

Get organization usage

Example

typescript
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
);

Parameters

NameTypeDescriptionNotes
organizationId[string]Organization IDdefaults to undefined
periods[number]Periods(optional) defaults to undefined

Return type

OrganizationUsage

Authorization

JwtAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getV2CurrentUsage

OrganizationUsage getV2CurrentUsage()

Get organization usage from v2 billing

Example

typescript
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
);

Parameters

NameTypeDescriptionNotes
organizationId[string]Organization IDdefaults to undefined

Return type

OrganizationUsage

Authorization

JwtAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getV2PastUsage

Array<OrganizationUsage> getV2PastUsage()

Get historical organization usage from v2 billing

Example

typescript
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
);

Parameters

NameTypeDescriptionNotes
organizationId[string]Organization IDdefaults to undefined
periods[number]Periods(optional) defaults to undefined

Return type

Array<OrganizationUsage>

Authorization

JwtAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-

[Back to top] [Back to API list] [Back to Model list] [Back to README]