Skip to content

Latest commit

 

History

History
233 lines (153 loc) · 6.17 KB

BillingEventsApi.md

File metadata and controls

233 lines (153 loc) · 6.17 KB

\BillingEventsApi

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.

GetCostSummary

BillingCostsReport GetCostSummary(ctx).TenantId(tenantId).FromDate(fromDate).ToDate(toDate).GroupBy(groupBy).Execute()

Retrieve a summary for tenant cost.

Example

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)
}

Path Parameters

Other Parameters

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

Return type

BillingCostsReport

Authorization

No authorization required

HTTP request headers

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

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

GetEvent

BillingEvent GetEvent(ctx, id).Execute()

Get an Event.

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiGetEventRequest struct via the builder pattern

Name Type Description Notes

Return type

BillingEvent

Authorization

No authorization required

HTTP request headers

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

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

GetEventsPage

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.

Example

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)
}

Path Parameters

Other Parameters

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

Return type

BillingEventsPage

Authorization

No authorization required

HTTP request headers

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

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