https://github.com/akvo/akvo-flow-api-examples
Akvo Flow API examples
https://github.com/akvo/akvo-flow-api-examples
akvo akvo-flow-api example-code java php python
Last synced: about 2 months ago
JSON representation
Akvo Flow API examples
- Host: GitHub
- URL: https://github.com/akvo/akvo-flow-api-examples
- Owner: akvo
- License: apache-2.0
- Created: 2014-08-14T14:10:04.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2022-11-16T08:53:55.000Z (over 3 years ago)
- Last Synced: 2024-07-24T04:58:26.692Z (almost 2 years ago)
- Topics: akvo, akvo-flow-api, example-code, java, php, python
- Language: Java
- Homepage:
- Size: 2.48 MB
- Stars: 0
- Watchers: 20
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Akvo FLOW API client examples
=============================
## Bash example
If you want to do a quick test, use this _one liner_
example in [Bash](https://www.gnu.org/software/bash/).
It assumes that [curl](http://curl.haxx.se/) and
[openssl](https://www.openssl.org/) 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
````