API Endpoints & Documentation

WARNING: API STILL UNDER CONSTRUCTION! The API is still in development and is not yet completely documented or functional. The documentation below is auto-generated from comments and parameters in the code. Privacy, user-level & group-level permissions for API resources are still being set up.

 Show/hide endpoints

Endpoints:

 Show/hide examples

Examples:

Get all deployments
/api/deployment
Get stats on specific deployment (in this case, deployment_id=132)
/api/deployment-stats/132
Get a list of all user groups of grouptye "project" from a specific user
/api/usergroups?q={"filters":[{"name":"user_id","op":"eq","val":2},{"name":"group","op":"has","val":{"name":"grouptype","op":"eq","val":"project"}}]}
Get all media (eg: images) for a given deployment (in this case, deployment_id=132)
/api/media?q={"filters":[{"name":"deployment_id","op":"==","val":132}]}
Get a list of media (eg: images) that are from a list of deployments, with altitude < 2m and depth > 40m. Show 500 results per page.
/api/media?q={"filters":[{"name":"deployment_id","op":"in","val":[131,132]},{"name":"poses","op":"any","val":{"name":"alt","op":"lt","val":2}},{"name":"poses","op":"any","val":{"name":"dep","op":"gt","val":40}}]}&results_per_page=500
Get poses from a specific deployment (id=131), with altitude < 2m and depth > 40m
/api/pose?q={"filters":[{"name":"deployment_id","op":"==","val":131},{"name":"alt","op":"lt","val":2},{"name":"dep","op":"gt","val":40}]}
Get list of media (eg: images) that belong to a specific media_collection
/api/media?q={"filters":[{"name":"media_collections","op":"any","val":{"name":"id","op":"eq","val":1}}]}&page=1&results_per_page=100
Add media items (eg: images) to specific media_collection
/api/media_collection/1/media?q={"filters":[{"name":"deployment_id","op":"in","val":[131,132]},{"name":"poses","op":"any","val":{"name":"alt","op":"lt","val":2}},{"name":"poses","op":"any","val":{"name":"dep","op":"gt","val":30}}]}
Add media items to media_collection, and append to existing
/api/media_collection/1/media?q={"filters":[{"name":"deployment_id","op":"in","val":[131]}]}&mode=append