An interval defines permitted numerical values between lower and upper constraints. Bounds can be inclusive, exclusive, or open-ended, making intervals useful for API filters and data validation. section 9.6.2 section 19.3.1
Filtering transactions by amount
A request such as amount.gte=100&amount.lt=400 selects amounts satisfying 100 ≤ amount < 400. Equivalent designs can use from/to or min/max names, but those names should document whether bounds are strict. section 9.6.2
Use intervals deliberately when designing APIs:
- Represent fixed validation limits with JSON Schema: minimum, exclusiveMinimum, maximum, or exclusiveMaximum. section 19.3.1
- Describe business- or configuration-dependent limits textually, or expose an operation that returns current range values. section 19.3.1
Figure 19.7 JSON Schema allows us to define numerical ranges and array and string lengths. These ranges can be open-ended.
Use the figure to compare inclusive, exclusive, and open-ended numeric intervals alongside array and string size limits. section 19.3.1






