fathomnet / community-feedback

1 stars 0 forks source link

Add endpoints to support Squiddle integration #90

Closed hohonuuli closed 1 year ago

hohonuuli commented 1 year ago

Ari requested the following ... add the following API endpoints in FathomNet:

hohonuuli commented 1 year ago

Find annotations by userdefinedkey

When registering localizations in FathomNet as described here, add a column named userdefinedkey or user_defined_key. This can be any string value up to 56 characters long. They can then be queried via

https://fathomnet.org/api/boundingboxes/query/userdefinedkey/<user_defined_key>

Examples:

hohonuuli commented 1 year ago

return changes by annotation

I added 2 endpoints to fetch the audit history. This returned histories are ordered from oldest to more recent. Both are listed in the swagger docs at http://fathomnet.org:8080/swagger-ui

Audit history by User defined key

https://fathomnet.org/api/boundingboxes/audit/userdefinedkey/<user_defined_key>

Example: https://fathomnet.org/api/boundingboxes/audit/userdefinedkey/285aa889-f771-46c0-6763-c0398712ba1e

Audit history by bounding box UUID

https://fathomnet.org/api/boundingboxes/audit/uuid/<bounding_box_uuid>

Examples: https://fathomnet.org/api/boundingboxes/audit/uuid/9f31b626-b118-4819-860c-3c1cfc04be3f

kevinsbarnard commented 1 year ago

Added support to fathomnet-py in v0.6.0.

Examples:

from fathomnet.api import boundingboxes

audit_history = boundingboxes.audit_by_user_defined_key('285aa889-f771-46c0-6763-c0398712ba1e')
...
audit_history = boundingboxes.audit_by_uuid('9f31b626-b118-4819-860c-3c1cfc04be3f')