Skip to content
Go to Boltz API

Get a workspace spending limit

client.Admin.Workspaces.GetSpendingLimit(ctx, workspaceID) (*AdminWorkspaceGetSpendingLimitResponse, error)
GET/compute/v1/admin/workspaces/{workspace_id}/spending-limit

Get a workspace spending limit

ParametersExpand Collapse
workspaceID string
ReturnsExpand Collapse
type AdminWorkspaceGetSpendingLimitResponse struct{…}

Configured lifetime workspace spending limit, or null if unset. Unset workspaces have no workspace-level cap and continue to use organization-level billing.

Limit AdminWorkspaceGetSpendingLimitResponseLimit
Amount int64

Workspace spending limit amount in milli-USD. Tracking starts when the limit is configured; prior or already-committed unreserved work is not counted in this workspace cap ledger.

minimum0
maximum9007199254740991
Currency MilliUsd

Workspace spending limits currently support milli-USD only.

Type Lifetime

Get a workspace spending limit

package main

import (
  "context"
  "fmt"

  "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"),
  )
  response, err := client.Admin.Workspaces.GetSpendingLimit(context.TODO(), "workspace_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Limit)
}
{
  "limit": {
    "amount": 5000,
    "currency": "MILLI_USD"
  },
  "type": "lifetime"
}
Returns Examples
{
  "limit": {
    "amount": 5000,
    "currency": "MILLI_USD"
  },
  "type": "lifetime"
}