← Documentation home

Canonical Markdown source · Oct 20, 2018

Princeton University Art Museum API Integration Plan

providers/princeton-art-museum.md · 92 lines · SHA-256 c8823f65ee41

Status: Planned (B5 provider slice)

Updated: May 30, 2026

Official source

  • API base/docs: <https://data.artmuseum.princeton.edu>

Key platform facts (from official docs)

  • Base API host: `https://data.artmuseum.princeton.edu`
  • No authentication currently required (explicitly subject to change in future API versions).
  • Primary resources:
  • Objects
  • Makers
  • Packages
  • Search
  • All responses are JSON.
  • Static full dataset downloads are offered and refreshed weekly (recommended for non-dynamic bulk workflows).
  • Media payloads include IIIF 3-style URIs, e.g.:
  • `https://media.artmuseum.princeton.edu/iiif/3/collection/...`

Integration goals

  • Add Princeton as a first-class B5 provider through `provider-interface`.
  • Preserve rich object context (makers, texts, exhibitions, geography, terms, classifications, media) in `_source.raw` while mapping stable Linked Art boundary fields.
  • Preserve IIIF media/service references for downstream deep-zoom/manifest work.

Proposed implementation slice

Adapter

  • `src/adapters/princeton.ts`
  • profile descriptor
  • object fetch + search helpers
  • normalizer to `SourceRecord` + `Artwork` boundary DTO
  • IIIF media URL extraction helpers

Routes

  • `GET /api/princeton/profile`
  • `POST /api/princeton/search`
  • `POST /api/princeton/object`
  • `POST /api/princeton/import`

UI

  • add `princeton` source toggle in `/explore`
  • show source attribution + image/reuse status + media links in detail views

Env configuration

  • `PRINCETON_API_BASE` (default: `https://data.artmuseum.princeton.edu`)
  • `PRINCETON_API_AUTH_MODE` (default: `none`; supports future token/header mode without refactor)

Operational guardrails

  • Since static weekly exports are available, avoid naive high-frequency crawling for large-scale bulk ingest.
  • Keep route-layer pagination caps and timeouts to protect request budgets.
  • Preserve provenance and attribution data from Princeton payloads.

Standards mapping + tests

Required rounds (minimum): object/provenance/shared-structure + protocol/search rounds.

Required tests (failing-first):

  • `tests/adapters/princeton.test.ts`
  • `tests/api/princeton/profile.test.ts`
  • `tests/api/princeton/search.test.ts`
  • `tests/api/princeton/object.test.ts`
  • `tests/api/princeton/import.test.ts`

Provider-specific conformance tests:

  • rich nested field passthrough safety (`texts`, `media`, `exhibitions`, `geography`, `terms`)
  • IIIF URI extraction and canonical media-link mapping
  • no-auth default mode + forward-compatible auth-mode branching

Protocol checks (B8):

  • OPTIONS/CORS behavior on Princeton routes
  • response shape conformance
  • URI opacity + array-cardinality safety where applicable

Exit criteria

  • Adapter + routes + tests green.
  • `/explore` can search/import Princeton records.
  • PR includes Standards Mapping note with round + fixture anchor coverage.