---
title: "Get Constraint Intervals"
method: GET
path: "/constraints/{constraint_id}/intervals"
tags: ["Constraints"]
---

# Get Constraint Intervals

`GET /constraints/{constraint_id}/intervals`

Year/month/day-level statistics on binding intervals in ISO local time.

## Path parameters

- `constraint_id` string, required — GS entity ID of the constraint to query

## Query parameters

- `dataset_id` string, required
- `contingency_id` string, nullable — Optional contingency GS entity ID filter. Applied only when the dataset contains contingency_gs_entity_id.
- `api_key` string, nullable — API key for authentication (query)

## Headers

- `x-api-key` string, nullable — API key for authentication (header)

## Response `200`

Successful Response

- ConstraintIntervalResponse[]
  - `year` integer, required
  - `count` integer, required
  - `months` ConstraintIntervalMonthResponse[], nullable
    - `month` integer, required
    - `count` integer, required
    - `days` ConstraintIntervalDayResponse[], nullable
      - `day` integer, required
      - `count` integer, required
      - `times` string[], nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/gridstatus/apis/grid-status-api.md) · [All operations](https://skmtc.net/gridstatus/apis/grid-status-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gridstatus/grid-status-api/versions/fa1f094be2d4/schema)
