Get the interval limits for the metrics endpoint.
Scopes: metrics:read
metrics:read
Go
package main import( "context" "os" polargo "github.com/polarsource/polar-go" "log" ) func main() { ctx := context.Background() s := polargo.New( polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), ) res, err := s.Metrics.Limits(ctx) if err != nil { log.Fatal(err) } if res.MetricsLimits != nil { // handle response } }
{ "min_date": "2023-12-25", "intervals": { "hour": { "max_days": 123 }, "day": { "max_days": 123 }, "week": { "max_days": 123 }, "month": { "max_days": 123 }, "year": { "max_days": 123 } } }
You can generate an Organization Access Token from your organization's settings.
Successful Response
Date limits to get metrics.
Minimum date to get metrics.
Limits for each interval.
Show child attributes
Limits for the hour interval.
Maximum number of days for this interval.
Limits for the day interval.
Limits for the week interval.
Limits for the month interval.
Limits for the year interval.
Was this page helpful?