Skip to content

REST API for Freedom of Information Archive (FOIArchive)

Notifications You must be signed in to change notification settings

history-lab/foiarchive-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

foiarchive-api

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

installation instructions

Clone the repo, install the requirements and run run.py.

to do:

  • 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!!!

current results

works, i.e., returns data (with probe_request() removed)

does not work

{"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":"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"}}

About

REST API for Freedom of Information Archive (FOIArchive)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages