UKWA Access API
This Flask RESTPlus application acts as a front-end for our access-time API services.
All APIs are documented using Swagger, and the system includes Swagger UI. e.g. when running in dev mode, you can go to:
and you'll get a UI that describes the APIs. (This may not be directly visible in production, i.e. when running behind a proxy.)
Currently, it provides the ARK and URL resolution services.
This looks up ARKs in a simple text file. See api-data/arks.txt for an example.
<ARK> <TIMESTAMP> <URL>
It just maps an ARK to a timestamp and URL, which is then passed to the Wayback Resolver.
The file should be generated from W3ACT in a separate process, see python-shepherd for details.
This takes the timestamp and URL of interest, and redirects to the appropriate Wayback instance.
Development & Deployment
For development, you can run it (in a suitable
$ pip install -f requirements.txt $ python api.py
For testing/production, it's designed to run under Docker, using
gunicorn as the runtime engine.