Revamp the API
Created by: frankduncan
This does a wholesale rebuild of the API. It establishes new api endpoints for external users, which are now standard:
- api/sheets - list all sheets available
- api/search - search all sheets
- api/sheets/<sheet_name>A - see information about a sheet
- api/sheets/<sheet_name>/rows - list all row ids available
- api/sheets/<sheet_name>/rows/ - retrieve a row
- also accepts POST for users with permission
- api/sheets/<sheet_name>/rows//fields/ - retrieve a field
- api/sheets/<sheet_name>/search - search within a sheet
In addition, some internal endpoints were reworked to use the new api routes:
- api/sheets/<sheet_name>/tocs/<toc_name>
- api/sheets/<sheet_name>/rows//attachments/
All of these endpoints were duplicated for a new configuration SHEETS_ALIAS and ROWS_ALIAS variables, so that the endpoints are customizable as so:
- api/competitions/<sheet_name>/proposals/
The edit functionality also uses these endpoints now, instead of custom api.
Lastly, a last_updated flag was added to sheets in order return that information with the sheet so that api users can see if they need to refresh their cached data.
This resolves torque-sites issue #84: Feedback on Grants API