All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GetCostSummary | Get /billing/api/v8/events/costs | Retrieve a summary for tenant cost. |
GetEvent | Get /billing/api/v8/events/{id} | Get an Event. |
GetEventsPage | Get /billing/api/v8/events | Retrieve a page of events for tenant. |
BillingCostsReport GetCostSummary(ctx).TenantId(tenantId).FromDate(fromDate).ToDate(toDate).GroupBy(groupBy).Execute()
Retrieve a summary for tenant cost.
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "./openapi"
)
func main() {
tenantId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
fromDate := time.Now() // time.Time | (optional)
toDate := time.Now() // time.Time | (optional)
groupBy := "type, subtype or service" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingEventsApi.GetCostSummary(context.Background()).TenantId(tenantId).FromDate(fromDate).ToDate(toDate).GroupBy(groupBy).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingEventsApi.GetCostSummary``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCostSummary`: BillingCostsReport
fmt.Fprintf(os.Stdout, "Response from `BillingEventsApi.GetCostSummary`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetCostSummaryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
tenantId | string | ||
fromDate | time.Time | ||
toDate | time.Time | ||
groupBy | string |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BillingEvent GetEvent(ctx, id).Execute()
Get an Event.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingEventsApi.GetEvent(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingEventsApi.GetEvent``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetEvent`: BillingEvent
fmt.Fprintf(os.Stdout, "Response from `BillingEventsApi.GetEvent`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiGetEventRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BillingEventsPage GetEventsPage(ctx).TenantId(tenantId).Page(page).PageSize(pageSize).FromDate(fromDate).ToDate(toDate).Type_(type_).Subtype(subtype).Execute()
Retrieve a page of events for tenant.
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "./openapi"
)
func main() {
tenantId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
page := int32(0) // int32 |
pageSize := int32(10) // int32 |
fromDate := time.Now() // time.Time | (optional)
toDate := time.Now() // time.Time | (optional)
type_ := "type__example" // string | (optional)
subtype := "subtype_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingEventsApi.GetEventsPage(context.Background()).TenantId(tenantId).Page(page).PageSize(pageSize).FromDate(fromDate).ToDate(toDate).Type_(type_).Subtype(subtype).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingEventsApi.GetEventsPage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetEventsPage`: BillingEventsPage
fmt.Fprintf(os.Stdout, "Response from `BillingEventsApi.GetEventsPage`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetEventsPageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
tenantId | string | ||
page | int32 | ||
pageSize | int32 | ||
fromDate | time.Time | ||
toDate | time.Time | ||
type_ | string | ||
subtype | string |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]