The website interface of the Freedom of Information Archive (FOIArchive) is available through the History Lab website at http://history-lab.org/search
Development version of the FOIArchive API, implemented in Python3 and Flask
Clone the repo, install the requirements and run run.py.
- use modern python
- secure DB credentials (from user input)
- reorganize + modularize components
- pin down and monitor dependencies
- write and use unit tests for BDD/CI
- re-add and fix
probe_request()
function - document!!!
- http://127.0.0.1:5001/declass/v0.4/fields
- http://127.0.0.1:5001/declass/v0.4/visualizations/doc_cnts/
- http://127.0.0.1:5001/declass/v0.4/visualizations/doc_collection/
- http://127.0.0.1:5001/declass/v0.4/visualizations/doc_cnts_year/
- http://127.0.0.1:5001/declass/v0.4/visualizations/overview/
- http://127.0.0.1:5001/declass/v0.4/visualizations/frus/classification_topics/
- http://127.0.0.1:5001/declass/v0.4/visualizations/frus/classification_persons/
- http://127.0.0.1:5001/declass/v0.4/random/
- http://127.0.0.1:5001/declass/v0.4/topics/frus/topic/1001
- http://127.0.0.1:5001/declass/v0.4/topics/doc/frus1969-76ve14p1d26
- http://127.0.0.1:5001/declass/v0.4/collections
- http://127.0.0.1:5001/declass/v0.4/?ids=frus1945-50Inteld105,1974STATE085546
- http://127.0.0.1:5001/declass/v0.4/classification/collection/frus
{"apiErrors":"Please contact administrator if this issue persists","error":{"code":404,"message":"Service raised an exception"}}
- http://127.0.0.1:5001/declass/v0.4/?date=1945-10-02 hangs and returns:
{"apiErrors":"Please contact administrator if this issue persists","error":{"code":404,"message":"Service raised an exception"}}
{"apiErrors":"Please contact administrator if this issue persists","error":{"code":404,"message":"Service raised an exception"}}
{"apiErrors":[{"KeyError":"invalid request;"}],"error":{"code":404,"message":"Invalid API parameters"}}
{"apiErrors":[{"KeyError":"invalid parameters; try one of the following: start_date,total_pages,end_date,page,collections,search,page_size"}],"error":{"code":404,"message":"Invalid API parameters"}}
Not implemented yet
{"apiErrors":[{"KeyError":"invalid parameter value(s)"}],"error":{"code":404,"message":"Invalid API parameters"}}