Download the PHP package survos/nara-php-api without Composer
On this page you can find all versions of the php package survos/nara-php-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nara-php-api
NARA Catalog PHP API
A PHP client for the National Archives Catalog API v2.
Installation
This library requires Symfony HTTP Client (included as a dependency).
Quick Start
Contributing data (write)
The Catalog API can also write contributions — transcriptions, tags, and comments — back to the National Archives. This is how you give OCR or human-keyed text a permanent home in the national record.
These map to POST /api/v2/{transcriptions,tags,comments} with a JSON body of
{ <text field>, targetNaId, userId } — transcriptions also require
targetObjectId (the specific digital object the text belongs to).
Finding the targetObjectId
A record (naId) can hold many digital objects (pages/images), each with its own
objectId. To transcribe page by page, list the objects first and submit one
transcription per object:
To discover your Catalog user UUID (or check an object's current transcription before overwriting), search existing contributions:
Enabling write access
Write access is not enabled on a standard read key. Email
[email protected] with your email and Catalog
username to have contributions enabled for your key. You also need your Catalog
user UUID — find it in the userId field of any of your existing
contributions (e.g. GET /api/v2/contributions/search).
CLI: bin/contribute.php
A safe demo command — dry-run by default, it only writes when you pass --force:
API Key
To get an API key, email [email protected].
Demo
A CLI demo is included:
Bulk Data
For large-scale data access, NARA provides bulk downloads on AWS S3:
See NARA Developer Docs for more.
License
MIT License - see LICENSE file.