Skip to content

Serve the Identifiers API under /identifiers/v1 rather than /v1/identifiers - #985

Merged
kenoir merged 1 commit into
mainfrom
identifiers-path-prefix
Sep 15, 2026
Merged

kenoir merged 1 commit into
mainfrom
identifiers-path-prefix

Conversation

@kenoir

@kenoir kenoir commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

What does this change?

Renames the Identifiers API path prefix from /v1/identifiers/... to /identifiers/v1/... in the spec, the handler, run_local, the contract tests and the README. The README opener also stops claiming the API is not deployed.

api.wellcomecollection.org is a CloudFront distribution that routes on the first path segment and passes the full path through to the origin, so every service sits at /{service}/{version}/... (for example /catalogue/v2/works). The /v1/identifiers shape came over from the prototype unexamined and would not be routable by the planned /identifiers/* behaviour. There are no consumers, API keys or published docs yet, so the rename is cheap now and awkward later.

No terraform change, but a terraform apply in terraform/identifiers is needed after merge: the Lambda image deploys from GitHub Actions, while the gateway resources only move when the spec-hash deployment trigger is applied. Until both have moved, lookups 404 on the mismatched path. Nothing can observe that today because the stage gateway has no keys and answers 403 to everything.

Related issue: wellcomecollection/platform#6578, under the tracker wellcomecollection/platform#6403. RFC 089 and RFC 085 are updated to match in wellcomecollection/docs#171.

Checklist

  • Does this patch need a change to the documentation? The Identifiers README is updated here.
  • Does this change the API surface? If so, update the OpenAPI spec. identifiers/spec/openapi.yaml is updated here.

How to test

Locally the 43 pytest tests, ruff check/format, mypy and yarn lint:openapi all pass.

Once stage has redeployed, identifiers.api-stage.wellcomecollection.org/identifiers/v1/jzzpxqtu should return {"message":"Forbidden"}, meaning the route exists and no key has been issued yet, and the old /v1/identifiers/jzzpxqtu should return "Missing Authentication Token".

How can we measure success?

Nothing to measure: the API has no traffic yet.

Have we considered potential risks?

Low risk. Only stage is deployed and nothing calls the API, so there is no client to break.

…ifiers

api.wellcomecollection.org routes by first path segment, so the origin
has to answer on /identifiers/... for the CloudFront behaviour to work.
@kenoir
kenoir force-pushed the identifiers-path-prefix branch from f7ee8b3 to b6ce9eb Compare September 15, 2026 10:38
@kenoir
kenoir merged commit 87e250e into main Sep 15, 2026
10 checks passed
@kenoir
kenoir deleted the identifiers-path-prefix branch September 15, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants