Skip to content

akvo/akvo-flow-api-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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