HTTP request
GET https://api.wevoteusa.org/apis/v1/backupOneTableToS3 (Jump to "Try It Now")
Required Parameters
Parameter name | Value | Description |
table_name | string | the name of the table to save to s3 |
api_key | string (from post, cookie, or get (in that order)) | The unique key provided to any organization using the WeVoteServer APIs |
Response
{ "success": boolean, "status": string, "temp_file_name": string, "dump_table_to_tmp_completed": string, "tmp_file_to_s3_completed": string, "aws_s3_file_url": string, }]
Response Status Codes
Code | Description |
VALID_VOTER_DEVICE_ID_MISSING | Cannot proceed. A valid voter_device_id parameter was not included. |
VALID_VOTER_ID_MISSING | Cannot proceed. A valid voter_id was not found. |
Try It Now: API Variables
Uses pg_dump to save a backup image of a postgres file to a tmp file, and copies that temp file as an AWS s3 file for use by the local instance of server (on a developers Mac).
This allows the developer to populate their local postgres database with a limited set of files from the master server (see allowable_tables in retrieve_tables/controllers_master.py)
The response contains an s3 URL to the file for use from the local server instance. This is a part of the "Fast Load" developer's tool