GET /data/riskma-water-level
Metered riskma water-level detail (Catalog Item `riskma-water-level`)
- Request URL
https://api.daas.riskma.jp/v1/data/riskma-water-level- Authentication
- ApiKeyAuth — send your active API key in the x-ctie-api-key request header.
Parameters
| Name | In | Type | Requirement |
|---|---|---|---|
stationId | query | string | Required |
baseDate | query | string (date-time) | Optional |
start | query | string (date-time) | Optional |
end | query | string (date-time) | Optional |
pastDuration | query | string | Optional |
futureDuration | query | string | Optional |
stationId
The station you want data for, named by its osid — e.g. 99_20309_1_2. Required, and one of the station types this Catalog Item serves.
baseDate
The Anchor — the instant the served window is centred on. With no start/end span beside it, one metered call returns [baseDate − pastMinutes, baseDate + futureMinutes], and the served range rides data.window; widening it means shifting the baseDate, which costs another call. Blank or absent defaults to the request time.
It is an instant, not a day, despite the name. A bare date names no minute and this window is minute-precision, so send one of the two formats below.
Choosing the range one call serves — baseDate, or the start/end span. These are two separate ways to name that range, and each is complete on its own; a request sends one of them, not both.
baseDate alone serves the window named above and is charged one unit per point that window carries — floor((pastMinutes + futureMinutes) × 60 / baseTimeIncrement) + 1, which is three at the ±10-minute profile in force and not one. start and end together serve the clamped span [start, start + increments × increment] and are charged the points that span carries, one more than the increments it floors to — see start for the clamp, and X-Units-Charged for the count either path bills. Sending neither is a valid call rather than an omission: the baseDate defaults to the request time, so the window served is [now − pastMinutes, now + futureMinutes] and the call costs that window's point count, exactly as naming the instant does.
A blank baseDate beside a span is not "both". ?start=…&end=…&baseDate= is served as the span it names — blank is absent here, exactly as it is on a call with no span, and a client that renders every parameter it holds sends an empty one rather than omitting it.
Future baseDate values and coverage. A baseDate ahead of the request time is how forecast data is requested from a Catalog Item that publishes forecast coverage. Coverage is finite and per Catalog Item: read the maxFutureAnchorMinutes of the categoryQuotas[] entry whose catalogId is this Catalog Item, on GET /v1/plans (public, no auth), rather than assuming one — and treat an omitted field as *unknown*, not unlimited, and a published 0 as *known to be none*. Both Catalog Items publish 0 as of 2.0.0: neither serves forecast data, so a baseDate ahead of the request time cannot be satisfied on either. Size a request from that number — the operation's error table states what a baseDate past the horizon is answered with, and what it costs.
Accepts ISO-8601 (YYYY-MM-DDTHH:MM:SSZ, canonical) or datetime-local (YYYY-MM-DDTHH:MM); a naive value is read as UTC.
start
Span-metering window start. Paired with end, it selects the billed time-range: the server floors the span to whole increments (floor((end − start) / baseTimeIncrement), the Catalog Item's increment — 600 s today; read baseTimeIncrement from GET /v1/plans rather than assuming it, since it is per Catalog Item configuration), truncates the served range down to [start, start + increments × increment] (the grid is anchored at start, not the wall clock), and serves ONLY the clamped range. It is metered by the POINT: the clamped range is closed at both ends, so it carries increments + 1 points and is charged that many units — see X-Units-Charged.
Send it with end and without a baseDate: both bounds together name one range, and the span and the baseDate are separate ways to name the one range a call serves. The span must be at least one increment wide, and its floored increments must fit the Catalog Item's maxUnitsPerCall — read it from GET /v1/catalog as enforcedMaxUnitsPerCall and size the request from it. Absent (no start and no end) selects the baseDate bounded-window path instead.
Accepts ISO-8601 (YYYY-MM-DDTHH:MM:SSZ, the canonical SDK form); a datetime-local (YYYY-MM-DDTHH:MM) or YYYY/MM/DD HH:MM value is also tolerated, and a naive value is read as UTC.
end
Span-metering window end. Paired with start — see start for the clamp, the grammar and the charge. The served range truncates DOWN to the whole-increment grid, so a ragged end returns slightly less than requested; the served span rides the X-Query-Span-Seconds / X-Units-Charged response headers, so the correction is visible. Accepts the same ISO-8601 / datetime-local / YYYY/MM/DD HH:MM values as start. Send it together with start and without a baseDate. Absent together with start (no start and no end), the baseDate bounded-window path is used instead.
pastDuration
How far back of the baseDate you want, as an ISO-8601 duration. The served window becomes [baseDate − pastDuration, baseDate + futureDuration], closed at both ends.
Optional and independent of futureDuration: when omitted, the past half stays at the Catalog Item's default width, and when both are omitted the default window is served unchanged. PT0S is not the same as omitting it — it asks for a zero-width past half and receives one, so pastDuration=PT0S&futureDuration=PT0S serves the baseDate alone, one point, one unit.
The window is what you are charged for. The served range carries one point per baseTimeIncrement and is billed one unit per point, so widening this parameter widens the bill — count data.series against X-Units-Charged to check it.
Two bounds apply to that width, and the smaller one wins. The first is the Catalog Item's own maxUnitsPerCall — read it from GET /v1/catalog as enforcedMaxUnitsPerCall. The second is a fixed ceiling of 24 hours on pastDuration + futureDuration, the same ceiling the server holds a configured window to; against a Catalog Item with a small baseTimeIncrement it is the tighter of the two. Size a request from both — the operation's error table states what a window past the applicable bound is answered with, and error.message carries the number that applied.
Accepts the fixed-length ISO-8601 forms — weeks, days, hours and minutes (PT30M, PT2H, P1D, P1DT2H30M) — and must resolve to a whole number of minutes. The seconds field is declared for PT0S alone, because that is the only seconds value the whole-minute rule admits that is not spelled more plainly in minutes. Years and months are outside the grammar: neither names a fixed number of seconds, so the same request would buy a different window in different months. Each quantity is at most nine digits.
Ignored when a start/end span is present: the span names the range outright and is what the call is billed by.
futureDuration
How far ahead of the baseDate you want, as an ISO-8601 duration — the forward half of the window pastDuration opens backwards. See pastDuration for the grammar, the charge and the two bounds on the width; the two parameters are read identically and independently.
When omitted, the future half stays at the Catalog Item's default width; PT0S asks for no future half and receives none. It does not extend a Catalog Item's forecast coverage, which is bounded by maxFutureAnchorMinutes and reached through the baseDate; a Catalog Item that publishes no forecast answers a forward half with null measurements.
Ignored when a start/end span is present.
Request
Worked requests taken from the specification. Send them with your own active API key in place of the placeholder.
cURL — baseDate query
curl --request GET \
--get \
--header 'x-ctie-api-key: YOUR_API_KEY' \
--data-urlencode 'stationId=99_20309_1_2' \
--data-urlencode 'baseDate=2026-08-11T06:10:00Z' \
'https://api.daas.riskma.jp/v1/data/riskma-water-level'Generated client — baseDate query
// Generate a client from this document (orval, openapi-generator, …): each
// operationId becomes a function, and its parameters become the argument.
import { getWaterLevelObservatoryData } from './daas-client'
const response = await getWaterLevelObservatoryData(
{ stationId: '99_20309_1_2', baseDate: '2026-08-11T06:10:00Z' },
{ headers: { 'x-ctie-api-key': process.env.DAAS_API_KEY } },
)cURL — start/end span query
# The alternative to `baseDate`: name the span you want rather than the instant it
# is centred on. A span request is charged one unit per POINT the clamped range
# serves, reported back in `X-Units-Charged`. `maxUnitsPerCall: 1` caps the
# INCREMENTS a call may buy, so the widest span one call may buy is a single
# ten-minute increment — served closed at both ends, so it carries two points and
# costs TWO units. A wider span is refused
# `400 SPAN_CAP_EXCEEDED`.
curl --request GET \
--get \
--header 'x-ctie-api-key: YOUR_API_KEY' \
--data-urlencode 'stationId=99_20309_1_2' \
--data-urlencode 'start=2026-08-11T06:00:00Z' \
--data-urlencode 'end=2026-08-11T06:10:00Z' \
'https://api.daas.riskma.jp/v1/data/riskma-water-level'Generated client — start/end span query
import { getWaterLevelObservatoryData } from './daas-client'
const response = await getWaterLevelObservatoryData(
{
stationId: '99_20309_1_2',
start: '2026-08-11T06:00:00Z',
end: '2026-08-11T06:10:00Z',
},
{ headers: { 'x-ctie-api-key': process.env.DAAS_API_KEY } },
)Response
Every response uses the canonical WaterLevelEnvelope envelope, on success and on failure alike.
| Field | Type |
|---|---|
success | booleanMachine-readable outcome flag: true on success, false on failure. Readable without parsing the HTTP status line. |
data | WaterLevelObservation | nullThe water-level payload on success, null on error. One branch beside null, so no discriminator is needed or declared. |
error | ResourceApiError | nullThe canonical error on failure, null on success. Its code is drawn from the closed Resource-API error taxonomy — see ResourceApiError for the set, which a client can switch on exhaustively. |
meta | CanonicalMeta |
What data carries
On success, data carries WaterLevelObservation. Its own fields are below, followed by the schemas it references.
Nested schemas are expanded 2 levels deep. A field whose schema sits deeper shows its type name without a link.
WaterLevelObservation
Sold water-level payload for one Serving Window over one Station.
| Field | Type | Requirement | Description |
|---|---|---|---|
station | StationRef | Required | |
window | ServedWindow | Required | |
series | WaterLevelPoint[] | Required | Points ascending by timestamp, one resolution apart. Every point is a gauge reading taken at the station. Dense: the array carries one point per resolution across the whole window, always — floor((window.end − window.start) / resolution) + 1 of them, the fencepost included because the window is inclusive of both bounds. A station that reported nothing still returns that many points, each with null measurements, rather than an empty array — the count is never zero, because window.start is itself an increment. The length is therefore a function of the window and never of station behaviour, so a caller may index by offset. Bounded by window: every timestamp falls inside [window.start, window.end]. |
StationRef
The station a served payload describes. Carries only the echoed identifier: the station name and coordinates are served by GET /v1/observatory/master rather than repeated on every reading, so a caller that needs labels reads that once and joins.
| Field | Type | Requirement | Description |
|---|---|---|---|
id | string | Required | The station osid the request named. |
ServedWindow
The time range this payload was read for. Present on every successful response, including one whose series is empty, so a caller can always tell what was asked for as distinct from what was found.
series is bounded by this window: every point carries a timestamp inside [start, end]. One metered call buys one window, so data outside the range is read by moving the baseDate, and each move is another call.
One window spans ±10 minutes around the requested baseDate — start and end state it per response, but that is the width to size a read against. The span form (start/end) states its own bounds instead.
| Field | Type | Requirement | Description |
|---|---|---|---|
start | string (date-time) | Required | Inclusive lower bound of the window, ISO-8601 UTC. No series point carries a timestamp below it. |
end | string (date-time) | Required | Inclusive upper bound of the window, ISO-8601 UTC. No series point carries a timestamp above it — a later instant belongs to a later baseDate's window, and to the call that asks for it. |
resolution | string | Required | Spacing between consecutive points, as an ISO-8601 duration. Distinct from the billing grid: the per Catalog Item baseTimeIncrement on GET /v1/plans is what one unit buys, while this is how far apart two points sit. The two carry equal values today and are not the same quantity. |
WaterLevelPoint
One water-level reading. Measurement members are required and nullable: a present number is a measurement, 0.0 included — it means the gauge was operating and read zero — and null means no observation exists for that interval. A gauge that reports stage and not discharge carries null for discharge on every point rather than omitting the member, so a client is forced to handle the absence it will certainly meet. See RainfallPoint for the rule.
| Field | Type | Requirement | Description |
|---|---|---|---|
timestamp | string (date-time) | Required | The Time Increment this point describes, ISO-8601 UTC — window.start advanced by a whole number of resolution steps, never the instant the source's own reading carried. A point reports the observation recorded in [timestamp, timestamp + resolution), so a reading published off the window's phase is attributed to the increment that holds it rather than dropped: the grid is phased on window.start, and an baseDate may name any instant. Where the window sits on the publication cadence — the ordinary case — the two instants are the same value. |
waterLevel | number | null | Required | Gauge stage at timestamp, in metres (m), or null where no observation exists for the interval. May be negative — readings are relative to the station's own gauge datum (量水標零点高), not to sea level and not to zero. What varies between station kinds is the datum, not the unit, so two stations' readings are not comparable as absolute heights. |
discharge | number | null | Required | Volumetric flow at timestamp, in cubic metres per second (m³/s). Corroborated, not confirmed: the stations that carry it publish discharge in that unit, but the data owner has not confirmed it. Expect null often — it has been seen only on gauges that measure it, and there at a coarser cadence than waterLevel on the same rows, so most points of most stations carry no value. Both are observations rather than stated guarantees, so handle the null on any point. |
power | number | null | Required | Carried through under its original name. Both its unit and its meaning remain unconfirmed: no source states what this attribute measures, and no station observed so far carries a value for it — so in practice every point published to date carries null here. It is published rather than dropped so that the contract does not silently discard something the source produces; renaming it would assert an understanding nobody has. |
What the envelope’s named types carry
The envelope members typed as a named schema — ResourceApiError, CanonicalMeta — are documented below, each as its own table.
Nested schemas are expanded 2 levels deep. A field whose schema sits deeper shows its type name without a link.
ResourceApiError
| Field | Type | Requirement | Description |
|---|---|---|---|
code | stringOne of: VALIDATION_ERROR, AUTH_REQUIRED, KEY_INVALID, SUBSCRIPTION_REQUIRED, USAGE_CAP_EXCEEDED, CATALOG_NOT_IN_PLAN, NO_ACTIVE_KEY, NOT_FOUND, FORBIDDEN, BASE_DATE_BEYOND_HORIZON, SPAN_BELOW_MINIMUM, SPAN_CAP_EXCEEDED, SPAN_INVALID, RATE_LIMITED, UNAVAILABLE, UPSTREAM_ERROR, INTERNAL_ERROR | Required | SPAN_BELOW_MINIMUM / SPAN_CAP_EXCEEDED / SPAN_INVALID are the ADR-044 span-metering boundary rejections (#756), refused before any read or charge. BASE_DATE_BEYOND_HORIZON (1.0.0, #1515) is the future-baseDate rejection and is the one code on this surface that is charged — the authorizer debits before the Data Plane can evaluate the horizon. RATE_LIMITED (429) and UNAVAILABLE (503) are the metering-contention and outage renders relocated off the authorizer-deny layer to the Data Plane (#1105, ADR-055). KEY_INVALID (403) is the authorizer's invalid-Active-Key denial; FORBIDDEN (403) is the floor of the authorizer-deny layer — the code a Deny that attaches none is answered with, so a denied caller always reads a switchable code (#1048, #1419). |
message | string | Required | Human-readable explanation. Not a stable contract — switch on code, display message. |
requestId | string | Required | |
docsUrl | string (uri) | Optional | Documentation for this code (1.0.0, ADR-065). Lets an SDK point a developer at the fix without shipping its own copy of the error catalogue. Omitted where no page exists — this deployment publishes none, for any code, so a client must not depend on its presence. |
details | ErrorDetail[] | Optional | Field-level detail, omitted (not empty) when there is nothing field-level to report. Typed as an array of entries at 1.0.0 — it was previously a free-form object, which meant a caller could not enumerate what failed. This is what replaces regexing a sentence: before 1.0.0 a rejected request carried only message: "id is required", so the failing parameter was recoverable from prose alone. |
CanonicalMeta
Envelope metadata (ADR-028, reshaped at 1.0.0 by ADR-065). Transport concerns only — meta carries what identifies and dates the *response*, never what describes the *payload*.
The split it implements: the body carries what application code branches on; headers carry what infrastructure acts on without parsing JSON. This extends ADR-028's own reasoning for putting success in the body — anything a client must still have after the response is logged, cached, or replayed belongs here, because headers do not survive those. Billing is the deliberate exception and stays in X-Units-Charged / X-Query-Span-Seconds, which is why those headers must be named in Access-Control-Expose-Headers for a browser caller to read them at all.
Removed at 1.0.0. source named the upstream a payload was normalized from (riskma); ADR-062 internalized the read path and left no proxied Catalog Item, so the field became false as well as a vendor disclosure to a paying customer. window moved into data.window as ServedWindow — it describes the payload, not the transport, and its pre-1.0.0 shape (pastMinutes / futureMinutes / points) described the request's window rather than the served range.
| Field | Type | Requirement | Description |
|---|---|---|---|
requestId | string | Required | Correlates the call end-to-end. Also emitted as the X-Request-Id response header and duplicated onto error.requestId — the duplication is deliberate, so a consumer holding only one of the three stays correlatable. |
servedAt | string (date-time) | Optional | The Served Instant — when this response was generated, ISO-8601 UTC. Distinct from every instant inside data: a replayed call returns the same window and a later servedAt, which is what makes staleness computable client-side. Optional at 1.0.0, and present on everything a handler renders. It is absent on exactly one class of response: the authorizer denials the gateway renders from the 403 examples the metered GET /data/* operations share (and the keyless 401 beside them; one gateway response serves the whole API, which is why both bands are declared once in components/responses — #1548). A static gateway response template may carry one $context variable, the request id, and cannot format an ISO-8601 instant from the epoch milliseconds it has — so a required servedAt there could only ever be a frozen literal, which is a fabricated instant rather than a Served Instant. This is PRD-016's open question; the resolution taken is its own recommendation and #1517's, *optional-and-absent*, so that the schema and the renderer agree. #1517 carries the reshape into the deployed templates and records the resolution in PRD-016. Requiring it later — if those responses move to templated rendering — is a breaking change and so belongs to a later major version, which is the cost this resolution accepts in exchange for a contract the deployment does not violate on every denial. |
apiVersion | string | Required | The contract version that produced this response — the value of info.version at the time it was served. Added at 1.0.0 so a stored payload identifies its own shape — precisely what pre-1.0.0 responses cannot do, which is why they cannot be migrated retroactively. Also emitted as the X-DaaS-Api-Version response header for consumers that dimension metrics without parsing a body. Examples throughout this document carry the current info.version and are checked against it (test_canonical_envelope_spec.py, #1517). The deployed renders derive the value the same way — a handler from API_VERSION, an authorizer denial from info.version at synth time — so an example that stated a different MAJOR.MINOR pair would contradict a component this schema tells clients to branch on. Branch on MAJOR.MINOR; treat PATCH as informational, since it moves for description-only corrections and for bugfixes inside the frozen shape — never adding, removing or renaming a member, so a client compiled against the previous PATCH still compiles. Informational is not a promise that nothing observable moved: a bugfix can change a served value or the number of points a call returns (1.3.7 did both, #1542). |
pagination | Pagination | null | Optional | Present on list/paged responses; null otherwise. |
ErrorDetail
One field-level failure inside CanonicalError.details.
| Field | Type | Requirement | Description |
|---|---|---|---|
field | string | Required | The request member that failed — a query parameter or a body path. |
code | string | Required | Machine-readable reason, scoped to the field. Deliberately not enumerated: reasons are per-field and per-feature, and the switchable contract is the envelope-level code. Treat an unrecognised value as a generic failure. |
message | string | Required | Human-readable explanation for this field. |
Pagination
The cursor-page envelope the six admin directories and the audit read compose. Both keys are always present: nextCursor is the opaque token of the next page while more rows remain and an explicit null on the last one, and limit echoes the applied (clamped) page size. A console reads nextCursor === null as "drained" — it is never absent, so an undefined value is a bug, not an end.
CanonicalMeta.pagination composes it too, so the required pair binds any ADR-028 list envelope that reports a page. No producer sets that field today (the dataplane envelope carries source alone), and it is the one composer the route drift guard cannot reach — the guard reads page response_models off the mounted routes, and CanonicalMeta is not one.
CatalogItemPage deliberately does not compose this envelope: GET /catalog is served with response_model_exclude_none, which drops a null cursor before it reaches the wire, so its terminal page omits the key instead (#1479). One schema cannot describe both without permitting, for either route, a body that route can never send.
| Field | Type | Requirement | Description |
|---|---|---|---|
nextCursor | string | null | Required | Opaque next-page token; null on the last page. Treat the cursor — never the item count — as the signal that more remains: a page may come back shorter than limit while still carrying one. |
limit | integer | Required | The applied (clamped) page size, echoed back. |
Example 200 response
{
"success": true,
"data": {
"station": {
"id": "99_20309_1_2"
},
"window": {
"start": "2026-08-11T05:50:00Z",
"end": "2026-08-11T06:10:00Z",
"resolution": "PT10M"
},
"series": [
{
"timestamp": "2026-08-11T05:50:00Z",
"waterLevel": 0.46,
"discharge": null,
"power": null
},
{
"timestamp": "2026-08-11T06:00:00Z",
"waterLevel": 0.52,
"discharge": null,
"power": null
},
{
"timestamp": "2026-08-11T06:10:00Z",
"waterLevel": null,
"discharge": null,
"power": null
}
]
},
"error": null,
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-08-11T06:02:44Z",
"apiVersion": "3.0.6"
}
}Errors
Each declared failure, with the error.code a caller branches on and a worked body from the spec.
400 VALIDATION_ERROR VALIDATION_ERROR SPAN_BELOW_MINIMUM SPAN_CAP_EXCEEDED SPAN_INVALID SPAN_INVALID
Your request was rejected before any data was read. You are not billed for it. error.code is one of:
VALIDATION_ERROR — stationId is missing or malformed, or you sent a retired parameter. In the second case error.details[].field names it. A parameter is retired either because *this operation* withdrew it or because the *release* did: id and anchor were retired catalog-wide at 2.0.0 and are refused on every operation, including one that never declared them. Any other name the operation does not declare is ignored, not rejected.
SPAN_BELOW_MINIMUM — the start/end span is shorter than one billable increment.
SPAN_CAP_EXCEEDED — the span's floored increments exceed this product's maxUnitsPerCall, which bounds the increments a call may buy rather than the units it is billed. error.message names the bound that applied, which for a pastDuration/futureDuration window is the smaller of that cap and the 24-hour ceiling.
SPAN_INVALID — only one of start/end was sent, one of them could not be parsed, or a baseDate was sent alongside the span. The third cause is new at 3.0.0: baseDate and start/end are separate ways to name the one range a call serves, so a request carrying both names two and is refused rather than served one of them. Until 3.0.0 the span was served and the baseDate silently ignored. Send one time query.
A VALIDATION_ERROR may briefly appear on your balance as a charge and its reversal rather than as no charge at all; the reversal is automatic and the net cost is zero. The span rejections are never charged in the first place.
An unrecognised product in the path is not this response. Each sold product is its own declared path, so an undeclared one is a 404 rather than a 400 — this code answers a malformed argument on a path that exists.
{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_ERROR",
"message": "id is required",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_ERROR",
"message": "includeForecast is no longer accepted by this product",
"requestId": "req_01HXYZ",
"details": [
{
"field": "includeForecast",
"code": "RETIRED_PARAMETER",
"message": "includeForecast is no longer accepted by this product"
}
]
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}{
"success": false,
"data": null,
"error": {
"code": "SPAN_BELOW_MINIMUM",
"message": "the requested span is shorter than one billable increment",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}{
"success": false,
"data": null,
"error": {
"code": "SPAN_CAP_EXCEEDED",
"message": "The requested time span exceeds this product's cap of 144 increments per call.",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}{
"success": false,
"data": null,
"error": {
"code": "SPAN_INVALID",
"message": "start and end must be sent together as parsable instants",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}{
"success": false,
"data": null,
"error": {
"code": "SPAN_INVALID",
"message": "a baseDate and a start/end span cannot be combined; send one time query",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}401 AUTH_REQUIRED
No API key was sent — error.code: AUTH_REQUIRED. Send your key in the x-ctie-api-key header. Nothing is billed.
This response carries no meta.servedAt and no X-Request-Id header: it is answered at the edge, before the request reaches anything that could produce either. Every other response on this operation carries both.
{
"success": false,
"data": null,
"error": {
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"apiVersion": "3.0.6"
}
}402 USAGE_CAP_EXCEEDED
Your account is past its configured monthly Usage Cap — error.code: USAGE_CAP_EXCEEDED. The call is refused before any data is read and nothing is billed. Raise or clear the cap in the console to resume; by default an account has no cap.
The cap applies to your whole account, not to one product, so every metered call answers this until it is raised. It is the only 402 this API produces.
{
"success": false,
"data": null,
"error": {
"code": "USAGE_CAP_EXCEEDED",
"message": "Usage cap exceeded",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}403 FORBIDDEN SUBSCRIPTION_REQUIRED CATALOG_NOT_IN_PLAN KEY_INVALID
Your key was recognised but the call was not permitted. Refused before any data is read; nothing is billed.
error.message is the same single line for every cause — branch on error.code, which is what names the cause:
SUBSCRIPTION_REQUIRED — the key is valid but the account has no live subscription. There is no free tier on this API; the Try-It sandbox on the website is where a product is evaluated without one.
CATALOG_NOT_IN_PLAN — the account is subscribed, but this product is not one the plan covers. The plan lists its products; add this one to call it.
KEY_INVALID — the x-ctie-api-key value sent does not resolve to an active key: unknown, or revoked past its rotation grace window. Sending NO key is a 401, not this.
FORBIDDEN — denied with no more specific code. Treat it as the floor of the list rather than as a distinct cause.
A code not listed here may still arrive; handle it by its error.code string rather than by assuming this list is closed. Like the 401, this response carries no meta.servedAt and no X-Request-Id header.
{
"success": false,
"data": null,
"error": {
"code": "FORBIDDEN",
"message": "Access to this resource was denied",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"apiVersion": "3.0.6"
}
}{
"success": false,
"data": null,
"error": {
"code": "SUBSCRIPTION_REQUIRED",
"message": "Access to this resource was denied",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"apiVersion": "3.0.6"
}
}{
"success": false,
"data": null,
"error": {
"code": "CATALOG_NOT_IN_PLAN",
"message": "Access to this resource was denied",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"apiVersion": "3.0.6"
}
}{
"success": false,
"data": null,
"error": {
"code": "KEY_INVALID",
"message": "Access to this resource was denied",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"apiVersion": "3.0.6"
}
}404 NO_ACTIVE_KEY
The account has no active API key — error.code: NO_ACTIVE_KEY. Issue one in the console. Nothing is billed. This is an account-level state, so every metered call answers it until a key is active.
{
"success": false,
"data": null,
"error": {
"code": "NO_ACTIVE_KEY",
"message": "No active API key for the caller",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}422 BASE_DATE_BEYOND_HORIZON
The baseDate you sent is ahead of the request time, and this product serves no future data at all — error.code: BASE_DATE_BEYOND_HORIZON. The request is well-formed, so it is not a 400; it asks for a window no data can exist for.
This response is charged, and it is the only error on this operation that is. The call is metered before the baseDate can be checked, so the unit is spent by the time the answer is known. Every other error here costs you nothing.
Water-level publishes 0 for categoryQuotas[].maxFutureAnchorMinutes on GET /v1/plans, which is *known to be none* — so a caller who reads that value never meets this error. It was omitted before 2.0.0, meaning *unknown*, while the product still served the predicted levels a river basin published; those left the product at 2.0.0, and the published bound moved with them rather than a release later. error.details still names the horizon and the furthest baseDate that would have succeeded.
This response carries no docsUrl.
{
"success": false,
"data": null,
"error": {
"code": "BASE_DATE_BEYOND_HORIZON",
"message": "baseDate is beyond the forecast horizon for riskma-water-level",
"requestId": "req_01HXYZ",
"details": [
{
"field": "baseDate",
"code": "BEYOND_HORIZON",
"message": "furthest satisfiable baseDate is 2026-08-11T09:00:00Z"
}
]
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-08-11T06:02:44Z",
"apiVersion": "3.0.6"
}
}429 RATE_LIMITED
Too many of your calls are being metered at once — error.code: RATE_LIMITED. Nothing is billed, and the request is safe to retry: wait the interval the Retry-After header names, then send it again.
This is contention on your own account's billing record, not a quota you have exhausted, so it clears on its own. It is not the same as the throttle a plan's request-rate limit produces, which also answers 429.
{
"success": false,
"data": null,
"error": {
"code": "RATE_LIMITED",
"message": "Too many concurrent requests; please retry",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}502 UPSTREAM_ERROR
The data source failed to answer — error.code: UPSTREAM_ERROR. Your request was well-formed and authorised; the fault is on our side of the call. The call is charged at the point of metering and then refunded automatically, so the net cost is zero. Retrying is reasonable.
No request of your own reaches this code any more. Until 2.0.0 one did: a boolean annotation flag — includeForecast on rainfall, includeFloodIndex on water-level — sent with a value no boolean reading accepts answered 502 rather than 400, because serving the un-annotated payload with a 200 would have answered a question you did not ask and billed for it. Both flags are now retired and refused 400 VALIDATION_ERROR at the request boundary, so the parameter itself is gone rather than its value being unreadable.
A source answering in a shape this contract cannot sell renders here too: an unreadable instant, a reading whose name no member of this product's schema carries, or two readings falling in one Time Increment when the source publishes one per resolution. Serving the remainder would silently discard a measurement you were charged for, so the whole answer is refused and the charge is refunded.
{
"success": false,
"data": null,
"error": {
"code": "UPSTREAM_ERROR",
"message": "Upstream observatory provider unavailable",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}503 UNAVAILABLE
The service is temporarily unable to meter your call — error.code: UNAVAILABLE. Nothing is billed and no data is served. Retry with your own backoff: unlike the 429, this response carries no Retry-After, because an outage has no bounded estimate to give you.
It affects every metered call while it lasts, not one product.
{
"success": false,
"data": null,
"error": {
"code": "UNAVAILABLE",
"message": "The service is temporarily unavailable; please retry",
"requestId": "req_01HXYZ"
},
"meta": {
"requestId": "req_01HXYZ",
"servedAt": "2026-06-01T00:03:12Z",
"apiVersion": "3.0.6"
}
}