Get usage data
client.Admin.Usage.List(ctx, query) (*OpaqueCursorPage[AdminUsageListResponse], error)
GET/compute/v1/admin/usage
Retrieve aggregated usage data across the organization, optionally grouped by workspace and/or application.
Parameters
Returns
Get usage data
package main
import (
"context"
"fmt"
"time"
"github.com/boltz-bio/boltz-api-go"
"github.com/boltz-bio/boltz-api-go/option"
)
func main() {
client := boltzapi.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Admin.Usage.List(context.TODO(), boltzapi.AdminUsageListParams{
EndingAt: time.Now(),
StartingAt: time.Now(),
WindowSize: boltzapi.AdminUsageListParamsWindowSizeHour,
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"data": [
{
"end_time": "2019-12-27T18:11:19.117Z",
"quantity": 0,
"start_time": "2019-12-27T18:11:19.117Z",
"application": "structure_and_binding",
"workspace_id": "workspace_id"
}
],
"has_more": true,
"next_page": "next_page"
}Returns Examples
{
"data": [
{
"end_time": "2019-12-27T18:11:19.117Z",
"quantity": 0,
"start_time": "2019-12-27T18:11:19.117Z",
"application": "structure_and_binding",
"workspace_id": "workspace_id"
}
],
"has_more": true,
"next_page": "next_page"
}