urn

Urn Resolve

Parse a fojin URN and return its resolution target.

Returns 422 if the URN is syntactically invalid (parse error), so clients distinguish "you sent bad input" from "I can't find the referenced work". A valid-but-unknown URN returns 200 with exists=false rather than 404 so external tools can detect the miss without parsing an error body.

get/api/urn/resolve

Request

  • Base URL: https://fojin.app (the document declares no server; this is the origin it was published from)
  • URL: https://fojin.app/api/urn/resolve
  • Auth: none declared

Query parameters

urnstring required

fojin URN, e.g. fojin:cbeta/T0001.1#p0001a01.

Anchor (the part after #) must be URL-encoded as %23 in HTTP clients, otherwise the browser or curl will treat # as a fragment delimiter and strip everything after it before sending the request — the server then sees an anchor-less URN and silently returns anchor: null.

Example (anchor preserved): /api/urn/resolve?urn=fojin:cbeta/T0001.1%23p0001a01

Response

Successful Response

urnstring required
schemestring required
work_idstring required
juaninteger nullable
anchorstring nullable
text_idinteger nullable
reader_urlstring nullable
reader_url_absolutestring nullable
existsboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.