1.3 KiB
1.3 KiB
API Contract
Envelope Invariant
All API responses under /api/v1 use one of these envelopes:
- Success:
{"data": ..., "meta": {"request_id": "..."}} - Error:
{"error": {"code": "...", "message": "...", "details": ...}, "meta": {"request_id": "..."}}
meta.request_id must be present for success and error responses.
Binary media assets are served outside /api/v1 (for example, GET /scholar-images/{scholar_profile_id}/upload).
Publications Semantics
GET /api/v1/publicationssupportsmode=all|unread|latest.mode=newis currently accepted as a compatibility alias forlatest.- Pagination controls:
page,page_size(with backward-compatiblelimit/offsetsupport). - Pagination fields in response:
page,page_size,has_prev,has_next,total_count. unreadrepresents read-state (is_read=false).latestrepresents discovery-state (first seen in the latest completed run).
Publication payloads expose:
pub_url(canonical scholar detail URL)doi(normalized DOI)pdf_url(resolved OA PDF when available)
Scholar Portability
GET /api/v1/scholars/exportexports tracked scholars and scholar-publication link state.POST /api/v1/scholars/importimports that payload while preserving global publication deduplication.