The SDDT Public API allows external systems to retrieve published dataset records using an operator-issued API key. It supports paginated dataset discovery, metadata filters, and full dataset detail retrieval with associated files.

Public API Workflow

1
Operator

Create API key

An operator issues an API key for an external customer or partner integration. Keys may include an optional expiration date.

node scripts/manage-api-keys.js create --name="Acme Corp Integration"
node scripts/manage-api-keys.js create --name="Partner Portal" --expiresAt="2027-01-01"
2
Customer app

Call list endpoint

The customer app sends the API key in the request header and lists published datasets, optionally using filters.

GET /api/public/datasets?ecosystem=Estuary&page=1&limit=20
X-API-Key: snsddt_<key>
3
Public API

Validate and respond

The API validates the key, restricts results to published non-archived datasets, applies filters, and returns pagination metadata.

{
  "data": [ ...dataset objects... ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "totalCount": 84,
    "totalPages": 5
  }
}
4
Customer app

Open dataset details

The customer selects a dataset ID from the list response and retrieves the full dataset record with associated files.

GET /api/public/datasets/[id]
X-API-Key: snsddt_<key>

Endpoints

MethodPathDescription
GET/api/public/datasetsPaginated list of published datasets with optional filters.
GET/api/public/datasets/[id]Full detail for a single published dataset including files.

Supported Query Parameters

ParameterTypeDescription
pagenumber1-based page number. Default: 1.
limitnumberResults per page. Default: 20. Maximum: 100.
ecosystemstringFilter by ecosystem name using partial match.
speciesstringFilter by species name using partial match.
esuDpsstringFilter by ESU/DPS name using partial match.
populationstringFilter by population name using partial match.
fisherymgmtareastringFilter by fishery management area using partial match.
keywordsstringFilter by keyword or keywords using partial match.
contentTypestringFilter by content type using partial match.

Only published, non-archived datasets are returned.

API Key Management

Operator lifecycle

node scripts/manage-api-keys.js list
node scripts/manage-api-keys.js revoke --keyId=3

The full API key is printed only once at creation. It cannot be recovered later, so it should be stored securely and sent to the customer out-of-band.

Customer integration pattern

1. Receive API key out-of-band
2. Store the key securely
3. Add X-API-Key on every request
4. Page through /api/public/datasets
5. Fetch /api/public/datasets/[id] for selected records

Keys are not scoped to individual SDDT user accounts, and there is no web UI for key management.