Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 665 Bytes

README.md

File metadata and controls

22 lines (16 loc) · 665 Bytes

Akvo FLOW API client examples

Bash example

If you want to do a quick test, use this one liner example in Bash. It assumes that curl and openssl are installed.

  • Fetching the Survey definitions from http://localhost:8888
  • Change the values for access_key and secret
access_key="mykey"; \
secret="134"; \
d=$(date +%s); \
sig=$(printf "GET\n${d}\n/api/v1/surveys" | openssl sha1 -binary -hmac "${secret}" | base64); \
curl -H "Date: ${d}" -H "Authorization: ${access_key}:${sig}" http://localhost:8888/api/v1/surveys