Skip to content

Commit

Permalink
Changed query param to POST for export
Browse files Browse the repository at this point in the history
Changed query param to POST for export
  • Loading branch information
ericdrosas87 authored and blnkt committed Mar 19, 2024
1 parent 1cf3c25 commit 5c5b526
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ db-list:
cd db && docker exec --workdir / investigations-api-postgres-1 psql -U craft -c "SELECT (pg_stat_file('base/'||oid ||'/PG_VERSION')).modification, datname FROM pg_database;"

cloud-db-list:
curl https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?action\=list\&project\=investigations
curl https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?project\=investigations

# Requires argument `dbname` to specify the name of the DB to be exported, usage: `make cloud-db-export dbname=prod_db`
cloud-db-export:
curl https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?action\=export\&database\=$(dbname)\&project\=investigations
curl --header "Content-Type: application/json" \
--request POST \
--data '{"project":"investigations"}' \
https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?action\=export\&database\=$(dbname)

0 comments on commit 5c5b526

Please sign in to comment.