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
Was this page helpful?