OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
186 stars 88 forks source link

Add API documentation and a script to make HMAC signed requests via cURL #3299

Closed jwalgran closed 4 years ago

jwalgran commented 4 years ago

We add API documentation covering available, active endpoints and poviding JSON request and response examples for third-party developers who would like to integrate OTM data into other systems.

We also add a command line tool (scripts/hmaccurl.py) to make HMAC signed requests via cURL with support for a small subset of cURL options, suitable for testing API endpoints from the command line.

Connects #3298

Testing

To conserve development time this does not need a full interactive test. I used hmaccurl.py to generate the JSON responses throughout the document.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 83.784% when pulling 294a2facd0c4b4be45a55927cdbaf5664c25d020 on feature/jcw/api-docs-and-tool into 053e5c17322719a80ee93c190c05df285890bc58 on develop.

jwalgran commented 4 years ago

The build failure was in Update APT Cache

TASK [Update APT Cache] ********************************************************
Monday 27 July 2020  18:10:56 -0400 (0:00:03.628)       0:00:03.772 *********** 
[WARNING]: Updating cache and auto-installing missing dependency: python3-apt
fatal: [services]: FAILED! => {"changed": false, "msg": "Could not import python modules: apt, apt_pkg. Please install python3-apt package."}

Perhaps related to the end of Python 2.7 support. We need to fix the build in general, but this documentation and non-runtime tool update PR is not exercised by CI.

jwalgran commented 4 years ago

Thanks for the thoughtful review. I address the comments with fixups.