Get the interval limits for the metrics endpoint.
Scopes: metrics:read
metrics:read
Go
package main import( "context" "os" spairego "github.com/spairehq/spaire-go" "log" ) func main() { ctx := context.Background() s := spairego.New( spairego.WithSecurity(os.Getenv("SPAIRE_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": { "min_days": 123, "max_days": 123 }, "day": { "min_days": 123, "max_days": 123 }, "week": { "min_days": 123, "max_days": 123 }, "month": { "min_days": 123, "max_days": 123 }, "year": { "min_days": 123, "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