Coastal Intelligence
Issued not yet
Assistant LLM provider: LLM …

Integrators, security reviewers

Authentication and keys

The request and approval flow, the Authorization and X-API-Key headers, what a key's scope means, revocation, the exact meaning of 401, 403, 404, 422 and 429, and what the access log records.

Last reviewed

Request and approval

  1. Sign in with a work e-mail. The account must not be linked to a farm or co-op profile: those accounts cannot request agency access.
  2. On Request data access name the organisation, the purpose (what the data is for and who will see it), the bays, the products, the aggregation (bay or site) and the date range. At most five requests may wait for review at once.
  3. An administrator approves or declines the request. On approval the account becomes an agency account and the administrator receives the first key, shown once, which they send to you over a secure channel. Only the SHA-256 hash of a key is stored; its first characters (ci_agency_ and six more) are kept to tell keys apart in lists.
  4. An administrator can issue another key for the same request (rotation, a second system) and revoke any one of them.

Sending the key

Send the key with every request, in either header:

  • Authorization: Bearer <key>
  • X-API-Key: <key>

The same key works for REST (https://coastal-intelligence.triskelionaisystems.com/api/agency/..., the signed export) and for MCP (https://coastal-intelligence.triskelionaisystems.com/api/mcp). Keep it in an environment variable or a secret store, never in a file you share or commit.

Scope

A key reads exactly its approved request, along four dimensions. A call outside any of them is refused, not narrowed:

DimensionRule
BaysA tool naming another bay, or a site in another bay, is refused.
ProductsThe derived families (signals, events, skill, backtest, risk_index) and, for time series, each dataset key. Operator records are never a product.
Aggregationbay: bay aggregates only; a site argument must be a ground-truth station (buoy, tide gauge). site: per-site series too.
Date rangeExplicit from / to values must lie inside it. Omitted bounds default to the last 30 days up to today plus the 10-day forecast horizon, clipped to the range. One call covers at most 366 days.

Every result echoes the scope it was answered under (scope: request id, organisation, bays, products, aggregation, from, to), so a client can check what it is reading.

Revocation

An administrator can revoke one key or the whole request at any time; the next call with it is answered 401. A request that is no longer approved (declined, revoked) disables all its keys at once. To change a scope, send a new request; keys are never widened in place.

Status codes

StatusMeaningNotes
401No key, an unknown key, a revoked key, or a key whose request is no longer approved.The answer does not say which. Header WWW-Authenticate: Bearer realm="coastal-intelligence-agency". Over MCP this is an HTTP 401 before the protocol starts.
403Outside the key's scope: another bay, a product not approved, site data under bay aggregation, a date outside the range.REST only. Over MCP the same refusal is a tool result with isError true and the reason as text.
404Unknown bay or site id, unknown tool, or no back-test exists for the bay.Over MCP: a tool error.
422A bad parameter: an unknown signal kind or variable, from after to, a window above the maximum, or a result above the row limit.Narrow from / to or the filters. Over MCP: a tool error; an argument the tool does not declare is refused too.
429More than the rate limit (60 calls per minute per key by default), REST and MCP together.Header Retry-After gives the seconds to wait.

REST error bodies are {"detail": "..."}. The MCP tool-error shape is on the MCP server page.

What the log records

Every call writes one access-log row, refused calls included:

  • time, key id and key prefix, access request id, account id;
  • channel (rest or mcp), tool, the tool's own arguments (bay, site, product, dates);
  • outcome (ok, denied, not_found, invalid, error, unauthorized, rate_limited), status code, row count, a short detail for refusals;
  • the client IP, truncated.

The key itself is never logged: only its id and prefix. Requests, approvals, denials, revocations and key issues are recorded in the administrators' audit log too. Administrators read the access log in the app.

Authentication and keys · Developers · Coastal Intelligence