API reference
Contents
API Authentication
API_TOKEN
for your account and set it in the HTTP header for requests made to the API:
X-auth-token="YOUR-API-TOKEN"
YOUR-API-TOKEN
is the value of your API TOKEN
.
You are not logged in. You need to log in to view/manage your API TOKEN.
Resource collections & API endpoints
annotation
Annotation resource. Linkslabel
objects to point
objects.
Also stores comments, tag
associations, review flags, probability estimates, linked observations, etc...
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/annotation Create new Preprocessors:
|
GET |
/api/annotation Get list of
Included fields: Preprocessors:
|
GET |
/api/annotation/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/annotation/<id> Delete single Preprocessors:
|
PATCH |
/api/annotation Batch update CAUTION: this endpoint can batch update many annotations in a single request! If used incorrectly, you can
loose your annotations and any annotations that have been shared with you for which you have been granted edit
access. Please use with caution.
TIP: Test your search query ( PATCH request data must be JSON with the following fields:
Where label_id is the id of the label object that you would like to assign to the list of matched
annotations . Setting label_id to false will reset the label and any assigned tags.
tags is a list of and comment is a string that can be assigned to each annotation.
|
PATCH |
/api/annotation/<int:id> None |
DELETE |
/api/annotation/<int:annotation_id>/tag/<int:tag_id> None |
PATCH |
/api/annotation/<int:id>/link/<int:link_id> Updates |
GET |
/api/annotation/<int:id>/versions View all previous versions of this annotation, i.e.: a change log. |
DELETE |
/api/annotation/<int:id>/link Unlink this annotation from the observation group. If it is a group parent, the first child will be set as the new parent. An observation group is used to link observations of the same object that has been annotated multiple times. |
PATCH |
/api/annotation/<int:id>/link Set this annotation as the parent of the observation group. An observation group is used to link observations of the same object that has been annotated multiple times. |
GET |
/api/annotation/export General
Export Querystring parameters are:
Where Metadata for the Allowed fields include:
See TRANSLATING TO OTHER LABEL_SCHEMES This endpoint also supports the translation of labels from a source to a target label_scheme.
another label_scheme using the semantic translation framework. In order to do this, you need to specify the
additional
Where target_label_scheme_id [required] is an INT with the id of the target label scheme,
vocab_registry_keys [optional] is a list containing the priority order of keys for vocab_registries for
which to perform the semantic translation and mapping_override defines a set of key-value pairs containing
source label.id : target label.id for which to override the translation.
Note: for extended schemes, labels are translated through tree_traversal and no semantic translation is
required. With translation parameters you will also need to specify additional columns in the include_columns
parameter to obtain the translation output.Additional allowed columns include:
These columns are ignored if no EXAMPLES
|
GET |
/api/annotation/tally/<group_by> Get a tally of ^ NOTE: the counts in the TRANSLATING TO OTHER LABEL_SCHEMES When using
Where target_label_scheme_id [required] is an INT with the id of the target label scheme,
vocab_registry_keys [optional] is a list containing the priority order of keys for vocab_registries for
which to perform the semantic translation and mapping_override defines a set of key-value pairs containing
source label.id : target label.id for which to override the translation.
Note: for extended schemes, labels are translated through tree_traversal and no semantic translation is
required. When passing translation parameters, there will the following additional output columns:
label_lineage_names , translated_id , translated_lineage_names , translated_name ,
translated_label_scheme_name , translated_info .
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
data | JSON() | {} | True | None | - | - | Text field containing JSON properties for this resource |
label_id | Integer() | None | True | None | - | label.id | Foreign key |
likelihood | Float() | 1.0 | True | None | - | - | (Optional) likelihood/probability of the label assignment |
needs_review | Boolean() | False | True | None | - | - | Whether or not this annotation requires review |
created_at | DateTime() | function | True | None | - | - | Creation time (UTC) |
updated_at | TIMESTAMP() | function | True | None | - | - | Updated time (UTC) |
user_id | Integer() | None | False | None | - | users.id | Foriegn key |
point_id | Integer() | None | False | None | - | point.id | Foriegn key |
annotation_set_id | Integer() | None | False | None | - | annotation_set.id | Foriegn key |
comment | Text() | None | True | None | - | - | User comment |
parent_id | Integer() | None | True | None | - | annotation.id |
|
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
label | label |
MANYTOONE | Related |
user | users |
MANYTOONE | Related owner |
point | point |
MANYTOONE | Related |
annotation_set | annotation_set |
MANYTOONE | Related |
parent | annotation |
MANYTOONE | Parent annotation in a linked set of observations |
children | annotation |
ONETOMANY | Collection of linked child observations |
annotation_tags | annotation_tags |
ONETOMANY | Collection of |
versions | annotation_version |
ONETOMANY | None |
ASSOCIATION PROXIES FILTERABLE
ATTRIBUTE | MODEL | COLLECTION | DESCRIPTION |
tags | tag |
annotation_tags | Proxy attribute that presents the linked tag objects from the annotation_tags collection |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
is_child | property | - | BOOLEAN, whether or not this annotation has a linked parent annotation (queryable) |
timestamp | property | - | The in-situ timestamp for when the annotated object was captured/sampled in the media frame.
Returns |
timestamp_proximity | method | ts | Absolute difference in seconds of the in-situ timestamp and input |
distance | method | lat, lon | FLOAT, distance (in meters) of closest linked |
xy_distance | method | x, y | FLOAT, euclidean distance to |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
color | method | Implied color code for this annotation based on |
current_user_can_edit | method | BOOLEAN, whether or not the current user has edit rights for this annotation as implied by the permissions of the parent |
observation_count | method | INT, denoting the number of linked observations of this object |
pose | method | |
pose_data | method | Properties for related |
suggested_tags | method | |
version_count | method | INT, denoting the number of changes in the version history of this object |
linked_observations | property | List of |
media | property |
|
object_id | property | ID of observation group: ID of primary observation (parent annotation) if linked, otherwise own ID. |
supplementary_label | property | Selected fiedls of supplementary labels for relates |
tag_names | property | Comma-delimited names of applied tags. Can also be used to set tags using comma-delimited tags when creating annotaions |
translated_label_id | property | Returns |
annotation_set
Annotation Set resource: defines how themedia
objects contained in a media_collection
should be annotated /
analysed. Each media_collection
can have multiple annotation_sets
attached to it.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/annotation_set Create new Preprocessors:
|
PATCH |
/api/annotation_set/<id> Update single Preprocessors:
|
GET |
/api/annotation_set Get list of
Included fields: Preprocessors:
|
GET |
/api/annotation_set/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/annotation_set/<id> Delete single Preprocessors:
|
POST |
/api/annotation_set/<int:instance_id>/group/<int:group_id> Add object with id |
DELETE |
/api/annotation_set/<int:instance_id>/group/<int:group_id> Remove resource with id |
GET |
/api/annotation_set/<int:id>/export Export Export Querystring parameters are:
Where Metadata for the Allowed fields include:
See TRANSLATING TO OTHER LABEL_SCHEMES This endpoint also supports the translation of labels from a source to a target label_scheme.
another label_scheme using the semantic translation framework. In order to do this, you need to specify the
additional
Where target_label_scheme_id [required] is an INT with the id of the target label scheme,
vocab_registry_keys [optional] is a list containing the priority order of keys for vocab_registries for
which to perform the semantic translation and mapping_override defines a set of key-value pairs containing
source label.id : target label.id for which to override the translation.
Note: for extended schemes, labels are translated through tree_traversal and no semantic translation is
required. With translation parameters you will also need to specify additional columns in the include_columns
parameter to obtain the translation output.Additional allowed columns include:
These columns are ignored if no EXAMPLES
NB: the UI contains an "ADVANCED" option which can help build more complex export queries. |
GET |
/api/annotation_set/<int:id>/media None |
GET |
/api/annotation_set/<int:id>/annotations Returns list of |
GET |
/api/annotation_set/<int:id>/annotations/<group_by> THIS ENDPOINT IS DEPRECATED! USE Returns lists of the labels used in the |
POST |
/api/annotation_set/<int:annotation_set_id>/media/<int:media_id> Add the |
DELETE |
/api/annotation_set/<int:annotation_set_id>/media/<int:media_id> Remove the |
POST |
/api/annotation_set/<int:id>/clone Clone the This endpoint also supports the translation of labels from a source to a target label_scheme using the semantic
translation framework. In order to do this, you need to specify the additional
Where target_label_scheme_id [required] is an INT with the id of the target label scheme,
vocab_registry_keys [optional] is a list containing the priority order of keys for vocab_registries for
which to perform the semantic translation and mapping_override defines a set of key-value pairs containing
source label.id : target label.id for which to override the translation.
Note: for extended schemes, labels are translated through tree_traversal and no semantic translation is
required.
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
data | JSON() | {} | True | None | - | - | Text field containing JSON properties for this resource |
name | String(length=80) | None | False | None | - | - | None |
description | Text() | None | True | None | - | - | None |
media_collection_id | Integer() | None | False | None | - | media_collection.id | None |
label_scheme_id | Integer() | None | False | None | - | label_scheme.id | None |
user_id | Integer() | None | False | None | - | users.id | Foreign key reference for ID of related owner |
created_at | DateTime() | function | False | None | - | - | None |
parent_id | Integer() | None | True | None | - | annotation_set.id | None |
is_exemplar | Boolean() | False | True | None | - | - | None |
is_full_bio_score | Boolean() | False | True | None | - | - | whether or not the intent was full biodiversity scoring, or just targeted scoring |
is_real_science | Boolean() | False | True | None | - | - | whether or not this is for science, or was for education / training / testing |
is_qaqc | Boolean() | False | True | None | - | - | whether or not the annotation set has been QA/QC'd |
is_final | Boolean() | False | True | None | - | - | whether or not the annotator has completed annotating |
type | String(length=80) | base | True | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
media_collection | media_collection |
MANYTOONE | None |
label_scheme | label_scheme |
MANYTOONE | None |
user | users |
MANYTOONE | Related owner |
parent | annotation_set |
MANYTOONE | None |
usergroups | groups |
MANYTOMANY | List of |
points | point |
ONETOMANY | List of |
annotations | annotation |
ONETOMANY | List of related |
children | annotation_set |
ONETOMANY | None |
files | annotation_set_file |
ONETOMANY | None |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
media_count | property | - | Number of media items in the media_collection |
annotation_count | property | - | Total number of labeled |
is_child | property | - | BOOLEAN, whether or not this annotation has a linked parent annotation |
is_public | property | - | Whether or not this object is public (i.e. shared in a public group) |
current_user_is_owner | property | - | Whether or not the currently logged in user is the owner of this object |
current_user_is_member | property | - | Whether or not the current logged in user is a member of a group that includes this object |
current_user_is_edit_member | property | - | Whether or not the current logged in user is a member with edit permission of a group that includes this object |
current_user_can_view | property | - | Whether or not the current user has permission to view this object |
current_user_can_edit | property | - | Whether or not the current logged in user has edit permission (owner or edit_member) |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
point_count | method | None |
unannotated_point_count | method | None |
usergroup_count | method | None |
annotation_set_file
Annotation Set File resource: a file associated with aannotation_set
object. Can be used for
batch importing / updating of annotation
and point
objects, as well as batch adding
media
objects to a media_collection
.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/annotation_set_file Create new Preprocessors:
|
PATCH |
/api/annotation_set_file/<id> Update single Preprocessors:
|
GET |
/api/annotation_set_file Get list of
Included fields: Preprocessors:
|
GET |
/api/annotation_set_file/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/annotation_set_file/<id> Delete single Preprocessors:
|
GET |
/api/annotation_set_file/<int:fid>/data Annotation Set File resource.
Get the data for the file resource matching
where f is a JSON dictionary containing a sequence of operations for transforming the data
(see Data transformation API for more info),
disposition is optional and defines the download type which can be inline (default, displays in
the browser) or attachment (triggers a download) ,
template is optional depending on the output of the steps in f and can be used to define the export format,
save is a JSON dictionary that defines batch save operations. This can be used to save the file content or the
output of the operations in f to a related database model collection.Example1: TODO
|
POST |
/api/annotation_set_file/data Save file data to database. Use this if it is not possible to dynamically link the file using the |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
last_save | JSON() | None | True | None | - | - | Sequence of file operations performed at last save |
name | Text() | None | False | False | - | - | The name of the file (optional). Defaults to |
file_url | Text() | None | True | False | - | - | The URL of the file to be loaded dynamically (if |
description | Text() | None | True | None | - | - | The description of the file (optional) |
_rawfiledata | LargeBinary() | None | True | None | - | - | The raw file storage for the file. This is not directly accessible through the API |
iscompressed | Boolean() | False | True | None | - | - | Whether or not the file is compressed or not. If so, it will be automatically decompressed upon access. |
user_id | Integer() | None | False | None | - | users.id | None |
annotation_set_id | Integer() | None | False | None | - | annotation_set.id | None |
created_at | DateTime() | function | False | None | - | - | None |
updated_at | DateTime() | function | True | None | - | - | Updated time (UTC) |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
user | users |
MANYTOONE | None |
annotation_set | annotation_set |
MANYTOONE | None |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
data | property | None |
campaign-deployment
A special resource for listing / querying campaigns in a different format.ENDPOINTS
METHOD | ENDPOINT |
GET |
/api/campaign-deployment/<resource> :param resource: :return: Examples: # search campaign-deployments for "gbr" /api/campaign-deployment/deployment?q={"filters":[{"or":[{"name":"key","op":"ilike","val":"%gbr%"},{"name":"campaign","op":"has","val":{"name":"key","op":"ilike","val":"%gbr%"}}]}]} # match list of deployment keys (campaign-deployment) /api/campaign-deployment?q={"filters":[{"name":"key","op":"in","val":["r20071004_013437_gbr_05_noggin_grids","r20071010_230932_gbr_09_hydrographers_leg"]}]} # as above but for deployments /api/campaign-deployment/deployment?q={"filters":[{"name":"key","op":"in","val":["r20071004_013437_gbr_05_noggin_grids","r20071010_230932_gbr_09_hydrographers_leg"]}]} # as above but for IDs and not keys /api/campaign-deployment/deployment?q={"filters":[{"name":"id","op":"in","val":[9495,9491]}]} |
GET |
/api/campaign-deployment :param resource: :return: Examples: # search campaign-deployments for "gbr" /api/campaign-deployment/deployment?q={"filters":[{"or":[{"name":"key","op":"ilike","val":"%gbr%"},{"name":"campaign","op":"has","val":{"name":"key","op":"ilike","val":"%gbr%"}}]}]} # match list of deployment keys (campaign-deployment) /api/campaign-deployment?q={"filters":[{"name":"key","op":"in","val":["r20071004_013437_gbr_05_noggin_grids","r20071010_230932_gbr_09_hydrographers_leg"]}]} # as above but for deployments /api/campaign-deployment/deployment?q={"filters":[{"name":"key","op":"in","val":["r20071004_013437_gbr_05_noggin_grids","r20071010_230932_gbr_09_hydrographers_leg"]}]} # as above but for IDs and not keys /api/campaign-deployment/deployment?q={"filters":[{"name":"id","op":"in","val":[9495,9491]}]} |
campaign
Campaign resource: a group ofdeployments
. Eg: a specific expedition, cruise or data collection initiative
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/campaign Create new Preprocessors:
Postprocessors:
|
PATCH |
/api/campaign/<id> Update single Preprocessors:
Postprocessors:
|
GET |
/api/campaign Get list of
Included fields: Preprocessors:
|
GET |
/api/campaign/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/campaign/<id> Delete single Preprocessors:
|
GET |
/api/campaign/map Deployment resource Minimal Deployment Resource for map data - result is cached for fast loading. Cache is cleared when new deployments are saved. :param GET: json: q: restless search query. :returns GET: json: a json string containing the structure of stuff |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | None | - | - | Name of this |
key | String(length=80) | None | False | True | - | - | Key of this |
path | Text() | None | True | None | - | - | None |
color | String(length=10) | function | True | False | - | - | Hex colour code for this |
description | Text() | None | True | None | - | - | Description for this |
user_id | Integer() | None | False | None | - | users.id | ID of the [user][#users] who created this |
created_at | DateTime() | function | False | None | - | - | Datetime of creation |
media_path_pattern | Text() | None | True | None | - | - | None |
thm_path_pattern | Text() | None | True | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
user | users |
MANYTOONE | None |
campaign_mv | campaigns_mv |
ONETOMANY | None |
deployments | deployment |
ONETOMANY | None |
info | campaigninfo |
ONETOMANY | None |
files | campaign_file |
ONETOMANY | None |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
deployment_count | property | - | Total number of |
media_count | property | - | Total number of |
geom | property | - | The centroid |
timestamp | property | - | A |
total_annotation_count | property | - | Total number of labeled |
public_annotation_count | property | - | Total number of publicly shared labeled |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
extent | method | Compute spatial extent of Campaign :return: list with format [[SW_LAT, SW_LON],[NE_LAT,NE_LON]] |
file_count | method | None |
platforms | method | None |
stats | method | None |
timestamp_range | method | None |
latlon | property | None |
campaign_file
Campaign File resource: a file associated with acampaign
object.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/campaign_file Create new Preprocessors:
|
PATCH |
/api/campaign_file/<id> Update single Preprocessors:
|
GET |
/api/campaign_file Get list of
Included fields: Preprocessors:
|
GET |
/api/campaign_file/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/campaign_file/<id> Delete single Preprocessors:
|
GET |
/api/campaign_file/<int:fid>/data Get the data for the file resource matching
where f is a JSON dictionary containing a sequence of operations for transforming the data
(see Data transformation API for more info),
disposition is optional and defines the download type which can be inline (default, displays in
the browser) or attachment (triggers a download) ,
template is optional depending on the output of the steps in f and can be used to define the export format,
save is a JSON dictionary that defines batch save operations. This can be used to save the file content or the
output of the operations in f to a related database model collection.
|
POST |
/api/campaign_file/data Save file data to database. Use this if it is not possible to dynamically link the file using the |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
last_save | JSON() | None | True | None | - | - | Sequence of file operations performed at last save |
name | Text() | None | False | False | - | - | The name of the file (optional). Defaults to |
file_url | Text() | None | True | False | - | - | The URL of the file to be loaded dynamically (if |
description | Text() | None | True | None | - | - | The description of the file (optional) |
_rawfiledata | LargeBinary() | None | True | None | - | - | The raw file storage for the file. This is not directly accessible through the API |
iscompressed | Boolean() | False | True | None | - | - | Whether or not the file is compressed or not. If so, it will be automatically decompressed upon access. |
user_id | Integer() | None | False | None | - | users.id | None |
campaign_id | Integer() | None | False | None | - | campaign.id | None |
created_at | DateTime() | function | True | None | - | - | None |
updated_at | DateTime() | function | True | None | - | - | Updated time (UTC) |
RELATED MODELS FILTERABLE
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
data | property | None |
campaigninfo
Deprecated.ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/campaigninfo Create new Preprocessors:
|
GET |
/api/campaigninfo Get list of
Included fields: Preprocessors:
|
GET |
/api/campaigninfo/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/campaigninfo/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | None | - | - | None |
description | Text() | None | False | None | - | - | None |
created_at | DateTime() | function | False | None | - | - | None |
campaign_id | Integer() | None | False | None | - | campaign.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
campaign | campaign |
MANYTOONE | None |
datasource
Datasource resource: the parameters that define the structure and format of the data on theDatasource Repository
and which Datasource Plugin
to use. Each platform
must have at least one datasource
.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/datasource Create new Preprocessors:
|
PATCH |
/api/datasource/<id> Update single Preprocessors:
|
GET |
/api/datasource Get list of
Included fields: Preprocessors:
|
GET |
/api/datasource/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/datasource/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | True | - | - | None |
campaign_search | Text() | None | True | None | - | - | None |
datafile_pattern | Text() | None | True | None | - | - | None |
datafile_search | Text() | None | True | None | - | - | None |
deployment_search | Text() | None | True | None | - | - | None |
media_pattern | Text() | None | True | None | - | - | None |
mediadir_search | Text() | None | True | None | - | - | None |
thumb_pattern | Text() | None | True | None | - | - | None |
thumbdir_search | Text() | None | True | None | - | - | None |
urlbase_browse | Text() | None | True | None | - | - | None |
credential_key | Text() | None | True | None | - | - | None |
datafile_operations | JSON() | None | True | None | - | - | None |
datasource_type_id | Integer() | None | False | None | - | datasource_type.id | None |
platform_id | Integer() | None | False | None | - | platform.id | None |
user_id | Integer() | None | False | None | - | users.id | None |
created_at | DateTime() | function | False | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
datasource_type | datasource_type |
MANYTOONE | None |
platform | platform |
MANYTOONE | None |
user | users |
MANYTOONE | None |
deployments | deployment |
ONETOMANY | None |
datasource_type
Datasource Type resource: defines mapping to a datasource plugin.ENDPOINTS
METHOD | ENDPOINT |
GET |
/api/datasource_type Get list of
Included fields: Preprocessors:
|
GET |
/api/datasource_type/<id> Get single
Included fields: Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | True | - | - | None |
created_at | DateTime() | function | False | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
datasources | datasource |
ONETOMANY | None |
deployment
Deployment resource: a dataset containing a group ofmedia
objects collected from an operation of the platform
, eg: a survey, transect or mission
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/deployment Create new Preprocessors:
|
PATCH |
/api/deployment/<id> Update single Preprocessors:
|
GET |
/api/deployment Get list of
Included fields: Preprocessors:
|
GET |
/api/deployment/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/deployment/<id> Delete single Preprocessors:
|
GET |
/api/deployment/map Deployment resource Minimal Deployment Resource for map data - result is cached for fast loading. Cache is cleared when new deployments are saved. :param GET: json: q: restless search query. :returns GET: json: a json string containing the structure of stuff |
GET |
/api/deployment/<int:id>/export Export deployment information for a deployment matching
Where:
EXAMPLES
WARNING!: this endpoint will be changed in a future update to be more consistent with other export endpoints. For now, feel free to use it, with the caveat that any third-party integrations may require updating the query format / parameters (reminder: this project is still in active development mode). |
GET |
/api/deployment/<int:id>/ecoregion Get ecoregion info from ESRI API Marine Ecoregions Of the World (MEOW) feature layer. Uses |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | None | - | - | None |
key | String(length=80) | None | False | None | - | - | None |
path | Text() | None | True | None | - | - | None |
campaign_id | Integer() | None | False | None | - | campaign.id | None |
user_id | Integer() | None | False | None | - | users.id | None |
description | Text() | None | True | None | - | - | None |
created_at | DateTime() | function | False | None | - | - | None |
platform_id | Integer() | None | False | None | - | platform.id | None |
datasource_id | Integer() | None | False | None | - | datasource.id | None |
is_valid | Boolean() | True | True | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
campaign | campaign |
MANYTOONE | None |
user | users |
MANYTOONE | None |
platform | platform |
MANYTOONE | None |
datasource | datasource |
MANYTOONE | None |
deployment_mv | deployments_mv |
ONETOMANY | None |
media | media |
ONETOMANY | None |
events | deployment_event |
ONETOMANY | None |
files | deployment_file |
ONETOMANY | None |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
media_count | property | - | Total number of |
annotated_media_count | property | - | Number of |
geom | property | - | The centroid |
timestamp | property | - | A |
total_annotation_count | property | - | Total number of labeled |
public_annotation_count | property | - | Total number of publicly shared labeled |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
color | method | None |
extent | method | Compute spatial extent of Campaign :return: list with format [[SW_LAT, SW_LON],[NE_LAT,NE_LON]] |
layers | method | None |
pose_stats | method | None |
timestamp_range | method | None |
latlon | property | None |
pose | property | None |
deployment_event
Deployment Event resource: a freeform text log that can be associated with apose
and/or a media
object.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/deployment_event Create new Sets attributes on the constructed instance using the names and
values in Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships. Preprocessors:
|
PATCH |
/api/deployment_event/<id> Update single Preprocessors:
|
GET |
/api/deployment_event Get list of
Included fields: Preprocessors:
|
GET |
/api/deployment_event/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/deployment_event/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
description | Text() | None | False | None | - | - | None |
user_id | Integer() | None | False | None | - | users.id | None |
created_at | DateTime() | function | False | None | - | - | None |
timestamp | DateTime() | function | False | None | - | - | None |
pose_id | Integer() | None | True | None | - | pose.id | None |
media_id | Integer() | None | True | None | - | media.id | None |
deployment_event_type_id | Integer() | None | False | None | - | deployment_event_type.id | None |
deployment_id | Integer() | None | False | None | - | deployment.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
user | users |
MANYTOONE | None |
pose | pose |
MANYTOONE | None |
media | media |
MANYTOONE | None |
deployment_event_type | deployment_event_type |
MANYTOONE | None |
deployment | deployment |
MANYTOONE | None |
deployment_event_type
Deployment Event resource: timestamped freeform text observation with optional link tomedia
and pose
objects.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/deployment_event_type Create new Sets attributes on the constructed instance using the names and
values in Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships. Preprocessors:
|
PATCH |
/api/deployment_event_type/<id> Update single Preprocessors:
|
GET |
/api/deployment_event_type Get list of
Included fields: Preprocessors:
|
GET |
/api/deployment_event_type/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/deployment_event_type/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
data | JSON() | {} | True | None | - | - | Text field containing JSON properties for this resource |
name | String(length=80) | None | False | True | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
deployment_events | deployment_event |
ONETOMANY | None |
deployment_file
Deployment File resource: a file associated with adeployment
object. Can be used for batch importing / updating
of media
, pose
and pose_data
objects.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/deployment_file Create new Preprocessors:
|
PATCH |
/api/deployment_file/<id> Update single Preprocessors:
|
GET |
/api/deployment_file Get list of
Included fields: Preprocessors:
|
GET |
/api/deployment_file/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/deployment_file/<id> Delete single Preprocessors:
|
GET |
/api/deployment_file/<int:fid>/data Deployment file resource.
Get the data for the file resource matching
where f is a JSON dictionary containing a sequence of operations for transforming the data
(see Data transformation API for more info),
disposition is optional and defines the download type which can be inline (default, displays in
the browser) or attachment (triggers a download) ,
template is optional depending on the output of the steps in f and can be used to define the export format,
save is a JSON dictionary that defines batch save operations. This can be used to save the file content or the
output of the operations in f to a related database model collection.Example1: convert CSV file into serialized, nested JSON expected for
Example 2: similar to above, but perform an update rather than an insert. Can optinally create missing. This is slower.
|
POST |
/api/deployment_file/data Save file data to database. Use this if it is not possible to dynamically link the file using the |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
last_save | JSON() | None | True | None | - | - | Sequence of file operations performed at last save |
name | Text() | None | False | False | - | - | The name of the file (optional). Defaults to |
file_url | Text() | None | True | False | - | - | The URL of the file to be loaded dynamically (if |
description | Text() | None | True | None | - | - | The description of the file (optional) |
_rawfiledata | LargeBinary() | None | True | None | - | - | The raw file storage for the file. This is not directly accessible through the API |
iscompressed | Boolean() | False | True | None | - | - | Whether or not the file is compressed or not. If so, it will be automatically decompressed upon access. |
user_id | Integer() | None | False | None | - | users.id | None |
deployment_id | Integer() | None | False | None | - | deployment.id | None |
created_at | DateTime() | function | False | None | - | - | None |
updated_at | DateTime() | function | True | None | - | - | Updated time (UTC) |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
user | users |
MANYTOONE | None |
deployment | deployment |
MANYTOONE | None |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
data | property | None |
group_types
Group Type resource.ENDPOINTS
METHOD | ENDPOINT |
GET |
/api/group_types Get list of Preprocessors:
|
GET |
/api/group_types/<id> Get single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=128) | None | False | None | - | - | None |
groups
Group resource: user groups for managing shared resources and permissions.ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/groups Create new Preprocessors:
Postprocessors:
|
PATCH |
/api/groups/<id> Update single Preprocessors:
|
GET |
/api/groups Get list of
Included fields: Preprocessors:
|
GET |
/api/groups/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/groups/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=128) | None | False | None | - | - | Name of Group |
is_public | Boolean() | False | True | None | - | - | Whether or not contents are publicly viewable |
is_restricted | Boolean() | True | True | None | - | - | Whether or not members can see other member's datasets |
requires_approval | Boolean() | True | True | None | - | - | Whether or not custodian approval is required |
requires_agreement | Boolean() | False | True | None | - | - | Whether or not members need to agree to Data Usage Agreement (DUA) |
description | Text() | None | True | None | - | - | Extra information about the Group |
dua_link | Text() | None | True | None | - | - | Data Usage Agreement (DUA) link. Must be an HTTP accessible, embeddable document |
user_id | Integer() | None | True | None | - | users.id |
|
group_type_id | Integer() | None | False | None | - | group_types.id |
|
groupinfo | Text() | None | True | None | - | - | Shorter description / tagline of Group |
created_at | DateTime() | function | False | None | - | - | Datetime of creation |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
user | users |
MANYTOONE | Related |
group_type | group_types |
MANYTOONE | related |
members | users |
MANYTOMANY | None |
usergroups | usergroups |
ONETOMANY | None |
shared_label_schemes | label_scheme |
MANYTOMANY | None |
shared_annotation_sets | annotation_set |
MANYTOMANY | None |
shared_media_collections | media_collection |
MANYTOMANY | None |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
current_user_is_owner | property | - | :return: |
current_user_is_pending_approval | property | - | :return: |
current_user_is_member | property | - | :return: |
current_user_is_edit_member | property | - | :return: |
current_user_can_share_data | property | - | BOOL, whether current_user has permission to share |
current_user_can_add_member | property | - | BOOL, whether current_user has permission to share |
current_user_has_agreed | property | - | BOOL, whether current_user has permission to share |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
dataset_counts | method | the number of different datasets that are shared in this group |
member_count | method | None |
pending_member_count | method | None |
label
Label resource. This defines the list of labels contained in alabel_scheme
and the labels to be applied to
annotation
objects. Each label can also have suggested tag
objects linked to it.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/label Create new Preprocessors:
|
PATCH |
/api/label/<id> Update single Preprocessors:
|
GET |
/api/label Get list of
Included fields: Preprocessors:
|
GET |
/api/label/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/label/<id> Delete single Preprocessors:
|
DELETE |
/api/label/<int:id>/tag/<int:tag_id> None |
POST |
/api/label/<int:id>/tag/<int:tag_id> None |
GET |
/api/label/<int:id>/exemplars Get list of exemplar images for the label_scheme with the ID matching |
GET |
/api/label/<int:id>/exemplars/<int:annotation_set_id> Get list of exemplar images for the label_scheme with the ID matching |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
uuid | UUID(as_uuid=True) | None | True | True | - | - | A universally unique identifier for this object |
name | String(length=160) | None | False | False | - | - | The name of this class label |
color | String(length=10) | function | True | False | - | - | The colour of this class label (hex code, including #) |
user_id | Integer() | None | False | None | - | users.id | The |
label_scheme_id | Integer() | None | False | None | - | label_scheme.id | The |
parent_id | Integer() | None | True | None | - | label.id |
|
is_approved | Boolean() | False | True | None | - | - | Whether this class label has been approved by the custodian |
created_at | DateTime() | function | True | None | - | - | Creation time (UTC) |
updated_at | TIMESTAMP() | function | True | None | - | - | Updated time (UTC) |
origin_code | String(length=80) | None | True | False | - | - | None |
parent_origin_code | String(length=80) | None | True | False | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
user | users |
MANYTOONE | The user who owns or created this class label |
label_scheme | label_scheme |
MANYTOONE | The annotation scheme containing this class label |
parent | label |
MANYTOONE | The parent class label (linked observation) |
vocab_elements | vocab_element |
MANYTOMANY | A list of |
children | label |
ONETOMANY | None |
label_tags | label_tags |
ONETOMANY | None |
info | label_info |
ONETOMANY | None |
label_vocab_element | label_vocab_element |
ONETOMANY | None |
annotations | annotation |
ONETOMANY | List of related |
ASSOCIATION PROXIES FILTERABLE
ATTRIBUTE | MODEL | COLLECTION | DESCRIPTION |
tags | tag |
label_tags | Proxy attribute that presents the linked tag objects from the label_tags collection |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
is_child | property | - | BOOLEAN, whether or not this class label has a parent class label |
is_mapped | property | - | BOOLEAN, whether this label has one or more vocab_element mappings |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
annotation_count | method | Number of annotations that have been assigned with this label |
descendant_count | method | Number of direct children labels nested under this label |
exemplar_annotation_sets | method | None |
label_scheme_custodian | method | None |
current_user_can_edit | property | None |
current_user_is_custodian | property | None |
name_path | property | None |
tag_names | property | Comma-delimited names of applied tags. Can also be used to set tags using comma-delimited tags when creating annotaions |
translated | property | Special API property returns |
vocab_registry | property | Dictionary representation of |
label_info
Label Info resource. Attaches name-value information tolabel
objects.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/label_info Create new Preprocessors:
|
PATCH |
/api/label_info/<id> Update single Preprocessors:
|
GET |
/api/label_info Get list of Preprocessors:
|
GET |
/api/label_info/<id> Get single Preprocessors:
|
DELETE |
/api/label_info/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | False | - | - | None |
value | Text() | None | True | None | - | - | None |
label_id | Integer() | None | True | None | - | label.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
label | label |
MANYTOONE | None |
label_scheme
Label Scheme resource. This resource is for managing and define label schemes otherwise known as (annotation scheme, taxonomic hierarchy, category lists, label lists, classification scheme)ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/label_scheme Create new Preprocessors:
|
PATCH |
/api/label_scheme/<id> Update single Preprocessors:
|
GET |
/api/label_scheme Get list of
Included fields: Preprocessors:
|
GET |
/api/label_scheme/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/label_scheme/<id> Delete single Preprocessors:
|
POST |
/api/label_scheme/<int:instance_id>/group/<int:group_id> Add object with id |
DELETE |
/api/label_scheme/<int:instance_id>/group/<int:group_id> Remove resource with id |
PATCH |
/api/label_scheme/<int:label_scheme_id>/reset_label_parents |
GET |
/api/label_scheme/<int:label_scheme_id>/export Export Querystring parameters are:
Where Metadata for the Allowed fields include:
See TRANSLATING TO OTHER LABEL_SCHEMES This endpoint also supports the translation of labels from a source to a target label_scheme.
another label_scheme using the semantic translation framework. In order to do this, you need to specify the
additional
Where target_label_scheme_id [required] is an INT with the id of the target label scheme,
vocab_registry_keys [optional] is a list containing the priority order of keys for vocab_registries for
which to perform the semantic translation and mapping_override defines a set of key-value pairs containing
source label.id : target label.id for which to override the translation.
Note: for extended schemes, labels are translated through tree_traversal and no semantic translation is
required.NOTE: you also need to add the EXAMPLES
|
GET |
/api/label_scheme/<int:label_scheme_id>/labels None |
GET |
/api/label_scheme/<int:label_scheme_id>/labels/<int:label_parent_id> None |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | False | - | - | None |
description | Text() | None | True | None | - | - | None |
user_id | Integer() | None | False | None | - | users.id | Foreign key reference for ID of related owner |
is_hierarchy | Boolean() | False | True | None | - | - | None |
created_at | DateTime() | function | True | None | - | - | Creation time (UTC) |
updated_at | TIMESTAMP() | function | True | None | - | - | Updated time (UTC) |
parent_label_scheme_id | Integer() | None | True | None | - | label_scheme.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
user | users |
MANYTOONE | Related owner |
parent_label_scheme | label_scheme |
MANYTOONE | None |
annotation_sets | annotation_set |
ONETOMANY | None |
usergroups | groups |
MANYTOMANY | List of |
label_scheme_files | label_scheme_file |
ONETOMANY | None |
children | label_scheme |
ONETOMANY | None |
labels | label |
ONETOMANY | None |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
is_child | property | - | BOOLEAN, whether or not this class label has a parent class label |
is_public | property | - | Whether or not this object is public (i.e. shared in a public group) |
current_user_is_owner | property | - | Whether or not the currently logged in user is the owner of this object |
current_user_is_member | property | - | Whether or not the current logged in user is a member of a group that includes this object |
current_user_is_edit_member | property | - | Whether or not the current logged in user is a member with edit permission of a group that includes this object |
current_user_can_view | property | - | Whether or not the current user has permission to view this object |
current_user_can_edit | property | - | Whether or not the current logged in user has edit permission (owner or edit_member) |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
annotation_set_count | method | None |
exemplar_annotation_set_count | method | None |
label_count | method | None |
usergroup_count | method | None |
label_scheme_file
Label Scheme File resource. Files that can be used for batch update / creation oflabel
objects attached
to label_scheme
objects.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/label_scheme_file Create new Preprocessors:
|
PATCH |
/api/label_scheme_file/<id> Update single Preprocessors:
|
GET |
/api/label_scheme_file Get list of
Included fields: Preprocessors:
|
GET |
/api/label_scheme_file/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/label_scheme_file/<id> Delete single Preprocessors:
|
GET |
/api/label_scheme_file/<int:fid>/data Get the data for the file resource matching
where f is a JSON dictionary containing a sequence of operations for transforming the data
(see Data transformation API for more info),
disposition is optional and defines the download type which can be inline (default, displays in
the browser) or attachment (triggers a download) ,
template is optional depending on the output of the steps in f and can be used to define the export format,
save is a JSON dictionary that defines batch save operations. This can be used to save the file content or the
output of the operations in f to a related database model collection.
|
POST |
/api/label_scheme_file/data Save file data to database. Use this if it is not possible to dynamically link the file using the |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
last_save | JSON() | None | True | None | - | - | Sequence of file operations performed at last save |
name | Text() | None | False | False | - | - | The name of the file (optional). Defaults to |
file_url | Text() | None | True | False | - | - | The URL of the file to be loaded dynamically (if |
description | Text() | None | True | None | - | - | The description of the file (optional) |
_rawfiledata | LargeBinary() | None | True | None | - | - | The raw file storage for the file. This is not directly accessible through the API |
iscompressed | Boolean() | False | True | None | - | - | Whether or not the file is compressed or not. If so, it will be automatically decompressed upon access. |
label_scheme_id | Integer() | None | False | None | - | label_scheme.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
label_scheme | label_scheme |
MANYTOONE | None |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
data | property | None |
label_tags
Label tag associations. Links suggestedtag
objects to label
objects. Provides convenience for quickly
assigning tags to certain labels
maplayer
Map Layer resource: defines properties of additional map layers for integration into explore interfaceENDPOINTS
METHOD | ENDPOINT |
POST |
/api/maplayer Create new Sets attributes on the constructed instance using the names and
values in Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships. Preprocessors:
|
PATCH |
/api/maplayer/<id> Update single Preprocessors:
|
GET |
/api/maplayer Get list of Preprocessors:
|
GET |
/api/maplayer/<id> Get single Preprocessors:
|
DELETE |
/api/maplayer/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=255) | None | False | None | - | - | None |
baseurl | String(length=255) | None | False | None | - | - | None |
layertype | String(length=128) | None | False | None | - | - | None |
properties | JSON(astext_type=Text()) | None | True | None | - | - | None |
filters | JSON(astext_type=Text()) | None | True | None | - | - | None |
is_active | Boolean() | False | True | None | - | - | None |
disabled | Boolean() | False | True | None | - | - | None |
maplayer_group_id | Integer() | None | False | None | - | maplayer_group.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
maplayer_group | maplayer_group |
MANYTOONE | None |
maplayer_group
Map Layer Group resource: defines properties of additional map layer groups for integration into explore interfaceENDPOINTS
METHOD | ENDPOINT |
POST |
/api/maplayer_group Create new Sets attributes on the constructed instance using the names and
values in Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships. Preprocessors:
|
PATCH |
/api/maplayer_group/<id> Update single Preprocessors:
|
GET |
/api/maplayer_group Get list of Preprocessors:
|
GET |
/api/maplayer_group/<id> Get single Preprocessors:
|
DELETE |
/api/maplayer_group/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=255) | None | False | None | - | - | None |
pane | String(length=255) | None | True | None | - | - | None |
zindex | Integer() | None | False | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
maplayers | maplayer |
ONETOMANY | None |
media
Media resource: a generic media object definition that can be used to link in media in a variety of formats, including images, videos, photo-mosaics and other media formats. Note that at the moment only images and video framegrabs have annotation support. Annotation viewers for video and mosaics coming soon.ENDPOINTS
METHOD | ENDPOINT |
PATCH |
/api/media/<id> Update single Preprocessors:
Postprocessors:
|
GET |
/api/media Get list of
Included fields: Preprocessors:
|
GET |
/api/media/<id> Get single
Included fields: Preprocessors:
Postprocessors:
|
DELETE |
/api/media/<id> Delete single Preprocessors:
|
GET |
/api/media/<int:media_id>/annotations/<int:annotation_set_id> None |
POST |
/api/media/save Media UPLOAD resource. Used to upload Media to predefined location set out in server config file.
|
POST |
/api/media In addition to the Here are some example payloads for creating
|
GET |
/api/media/<int:id>/poses The list of |
GET |
/api/media/<int:id>/thumbnail Dynamically create thumbnail. If user is logged in, then they can request different sizes |
GET |
/api/media/<int:id>/download Download media object with associated metadata as a zip file |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
data | JSON() | {} | True | None | - | - | Text field containing JSON properties for this resource |
key | String(length=80) | None | False | None | - | - | None |
path | Text() | None | True | None | - | - | None |
path_thm | Text() | None | True | None | - | - | None |
is_valid | Boolean() | True | True | None | - | - | None |
deployment_id | Integer() | None | False | None | - | deployment.id | None |
media_type_id | Integer() | None | False | None | - | media_type.id | None |
timestamp_start | DateTime() | function | True | None | - | - | None |
created_at | DateTime() | function | True | None | - | - | None |
parent_id | Integer() | None | True | None | - | media.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
deployment | deployment |
MANYTOONE | None |
media_type | media_type |
MANYTOONE | None |
parent | media |
MANYTOONE | None |
annotations | point |
ONETOMANY | List of |
poses | pose |
ONETOMANY | None |
children | media |
ONETOMANY | None |
media_collection_media | media_collection_media |
ONETOMANY | None |
events | deployment_event |
ONETOMANY | None |
ASSOCIATION PROXIES FILTERABLE
ATTRIBUTE | MODEL | COLLECTION | DESCRIPTION |
media_collections | media_collection |
media_collection_media | Proxy attribute that presents the linked media_collection objects from the media_collection_media collection |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
geom | property | - | None |
is_child | property | - | BOOLEAN, whether or not this has a parent |
has_unlabeled_annotations | method | annotation_set_id | BOOL, whether or not the |
has_annotations | method | annotation_set_id | BOOL, whether or not the |
distance | method | lat, lon | FLOAT, distance (in meters) of closest linked |
timestamp_proximity | method | ts | Absolute difference in seconds of the in-situ timestamp and input |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
current_user_can_edit | method | Whether or not the current user owns the deployment and can edit this media item |
event_log | method | None |
color | property | None |
path_best | property | None |
path_best_thm | property | None |
pixel_height | property | Height of media item in pixels. Not implemented yet... |
pixel_width | property | Width of media item in pixels. Not implemented yet... |
pose | property | The first pose from related |
timestamp_start_local | property | LOCAL datetime, converted using |
media_collection
Media Collection resource: a user-defined collection ofmedia
objects grouped for further analysis.
Can be a subset of media
objects from one or more deployments
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/media_collection Create new Preprocessors:
|
PATCH |
/api/media_collection/<id> Update single Preprocessors:
|
GET |
/api/media_collection Get list of
Included fields: Preprocessors:
|
GET |
/api/media_collection/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/media_collection/<id> Delete single Preprocessors:
|
POST |
/api/media_collection/<int:instance_id>/group/<int:group_id> Add instance with ID of |
DELETE |
/api/media_collection/<int:instance_id>/group/<int:group_id> Remove instance with ID of |
GET |
/api/media_collection/<int:id>/export Export Querystring parameters are:
Where Metadata for the
Allowed columns include:
NB: the UI contains an "ADVANCED" option which can help build more complex export queries. |
GET |
/api/media_collection/<int:media_collection_id>/media Get list of |
POST |
/api/media_collection/<int:media_collection_id>/media Add |
GET |
/api/media_collection/<int:media_collection_id>/media/<int:media_id> Get the single |
POST |
/api/media_collection/<int:media_collection_id>/media/<int:media_id> Add the |
DELETE |
/api/media_collection/<int:media_collection_id>/media/<int:media_id> Remove the |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
data | JSON() | {} | True | None | - | - | Text field containing JSON properties for this resource |
name | String(length=80) | None | False | None | - | - | The name of the |
description | Text() | None | True | None | - | - | A concise description of the |
parent_collection_id | Integer() | None | True | None | - | media_collection.id | A reference to the ID of a parent |
created_at | DateTime() | function | False | None | - | - | The creation date-time |
user_id | Integer() | None | True | None | - | users.id | Foreign key reference for ID of related owner |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
parent | media_collection |
MANYTOONE | The parent |
media | media |
MANYTOMANY | A list of |
user | users |
MANYTOONE | Related owner |
usergroups | groups |
MANYTOMANY | List of |
annotation_sets | annotation_set |
ONETOMANY | None |
children | media_collection |
ONETOMANY | A list of childen |
media_collection_media | media_collection_media |
ONETOMANY | None |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
media_count | property | - | Number of Media objects in this MediaCollection |
is_public | property | - | Whether or not this object is public (i.e. shared in a public group) |
current_user_is_owner | property | - | Whether or not the currently logged in user is the owner of this object |
current_user_is_member | property | - | Whether or not the current logged in user is a member of a group that includes this object |
current_user_is_edit_member | property | - | Whether or not the current logged in user is a member with edit permission of a group that includes this object |
current_user_can_view | property | - | Whether or not the current user has permission to view this object |
current_user_can_edit | property | - | Whether or not the current logged in user has edit permission (owner or edit_member) |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
extent | method | Compute spatial extent of Media Collection :return: list with format [[SW_LAT, SW_LON],[NE_LAT,NE_LON]] |
usergroup_count | method | None |
media_collection_media
Media Collection Media Associate resource: a model for associating a subset ofmedia
objects to a
media_collection
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/media_collection_media Create new Preprocessors:
|
GET |
/api/media_collection_media Get list of
Included fields: Preprocessors:
|
GET |
/api/media_collection_media/<media_collection_id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/media_collection_media/<media_collection_id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
media_id | Integer() | None | False | None | True | media.id | None |
media_collection_id | Integer() | None | False | None | True | media_collection.id | None |
created_at | DateTime() | function | False | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
media | media |
MANYTOONE | None |
media_collection | media_collection |
MANYTOONE | None |
media_type
Media Type resource: a modifier denoting the type for amedia
resource. This is associated with
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/media_type Create new Preprocessors:
|
GET |
/api/media_type Get list of
Included fields: Preprocessors:
|
GET |
/api/media_type/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/media_type/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | None | - | - | The name of the media type |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
media | media |
ONETOMANY | None |
platform
Platform resource: the equipment/method used to collect the imagery data (eg: a specific AUV, ROV or camera platform)ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/platform Create new Preprocessors:
|
PATCH |
/api/platform/<id> Update single Preprocessors:
|
GET |
/api/platform Get list of
Included fields: Preprocessors:
|
GET |
/api/platform/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/platform/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
data | JSON() | {} | True | None | - | - | Text field containing JSON properties for this resource |
name | String(length=80) | None | False | None | - | - | None |
key | String(length=80) | None | False | True | - | - | None |
description | Text() | None | True | None | - | - | None |
reference | Text() | None | True | None | - | - | None |
user_id | Integer() | None | True | None | - | users.id | None |
created_at | DateTime() | function | False | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
user | users |
MANYTOONE | None |
deployments | deployment |
ONETOMANY | None |
datasources | datasource |
ONETOMANY | None |
layers | platform_maplayer |
ONETOMANY | None |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
current_user_is_owner | method | None |
platform_maplayer
Platform Map Layer resource: defines properties of additional map layers for each platform filtered by configurable parametersENDPOINTS
METHOD | ENDPOINT |
POST |
/api/platform_maplayer Create new Sets attributes on the constructed instance using the names and
values in Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships. Preprocessors:
|
PATCH |
/api/platform_maplayer/<id> Update single Preprocessors:
|
GET |
/api/platform_maplayer Get list of
Included fields: Preprocessors:
|
GET |
/api/platform_maplayer/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/platform_maplayer/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=255) | None | False | None | - | - | None |
baseurl | String(length=255) | None | False | None | - | - | None |
layertype | String(length=128) | None | False | None | - | - | None |
minzoom | Integer() | None | True | None | - | - | None |
properties | JSON(astext_type=Text()) | None | True | None | - | - | None |
platform_id | Integer() | None | True | None | - | platform.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
platform | platform |
MANYTOONE | None |
point
Annotation Point resource: an annotatable object on a media frame, captures x,y,t and can have multipleannotations
associated with it. A point
can also be associated with a bounding box,
polygon, pixel map, etc... Each point
can have one or more annotations
.
ENDPOINTS
METHOD | ENDPOINT |
PATCH |
/api/point/<id> Update single Preprocessors:
|
GET |
/api/point Get list of
Included fields: Preprocessors:
|
GET |
/api/point/<id> Get single
Included fields: Preprocessors:
Postprocessors:
|
DELETE |
/api/point/<id> Delete single Preprocessors:
|
POST |
/api/point Custom post endpoint |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
data | JSON() | {} | True | None | - | - | Text field containing JSON properties for this resource |
x | Float(precision=53) | None | True | False | - | - | X location of point as a proportion across the frame width (0-1.0, measured from the left, positive right) or |
y | Float(precision=53) | None | True | False | - | - | Y location of point as a proportion across the frame height (0-1.0, measured from the top, positive down) or |
t | Float(precision=53) | None | True | False | - | - | Number of seconds of annotation relative to |
media_id | Integer() | None | False | None | - | media.id | |
annotation_set_id | Integer() | None | False | None | - | annotation_set.id | Foreign key |
updated_at | TIMESTAMP() | function | True | None | - | - | Updated time (UTC) |
is_targeted | BOOLEAN() | False | True | None | - | - | Flag denoting whether the Point was manually created to target a specific object |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
media | media |
MANYTOONE | Related |
annotation_set | annotation_set |
MANYTOONE | Parent/origin |
annotations | annotation |
ONETOMANY | List of |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
timestamp | property | - | The in-situ timestamp for when the annotated object was captured/sampled in the media frame.
Returns |
has_xy | property | - | BOOLEAN, whether or not the point has x-y coordinates. If |
has_polygon | property | - | BOOLEAN, whether or not the point has a polygon defined |
xy_distance | method | x, y | FLOAT, euclidean distance to |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
annotation_label | property | Returns list of dicts SETTER used to set a label based on lookup condition / parameters during batch annotation importing.
Parameters are passed by scalar value with query string properties or by setting value as dict.
The property value can be Examples
where comment , likelihood and needs_review are optional. Label search can be done using origin_code ,
uuid , id and/or defining filters , which is a list of filter objects for the label resource.
See Making API search queries .Coming soon: setting labels using semantic translation (or vocab elements) |
pixels | property | Use to convert between native normalised Returns SETTER convert from pixel coordinates Examples
where col and row are the point coordinates in pixels from the top-left of the frame.
polygon is optional and defines a list of lists containing x-y coordinates of polygon in pixels from top-left
of the frame. |
polygon | property | List of lists containing coordinated of vertices for polygons. Coordinates are in proportions of the image (0-1.0). For point annotations, measurements are relative to point's xy location. For whole-frame annotations, they are absolute. When setting this property, it can be a list of lists or a JSON string which will automatically be converted to a list of lists. |
pose | property | Get closest linked pose to timestamp |
set_media | property | Returns SETTER used to link the Examples
|
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/pose Create new Preprocessors:
|
GET |
/api/pose Get list of
Included fields: Preprocessors:
|
GET |
/api/pose/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/pose/<id> Delete single Preprocessors:
|
GET |
/api/pose/stats None |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
lat | Float(precision=53) | None | True | False | - | - | None |
lon | Float(precision=53) | None | True | False | - | - | None |
alt | Float() | None | True | False | - | - | None |
dep | Float() | None | True | False | - | - | None |
timestamp | DateTime() | function | False | None | - | - | None |
media_id | Integer() | None | False | None | - | media.id | None |
geom | Geometry(geometry_type='POINT', srid=4326, from_text='ST_GeomFromEWKT', name='geometry') | None | True | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
media | media |
MANYTOONE | None |
_data | posedata |
ONETOMANY | None |
events | deployment_event |
ONETOMANY | None |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
distance | method | lat, lng | FLOAT, distance (in meters) to |
proximity | method | lat, lon | None |
timestamp_proximity | method | ts | Absolute difference in seconds of the in-situ timestamp and input |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
campaign | property | None |
color | property | None |
data | property | Properties for related |
deployment | property | None |
platform | property | None |
timestamp_local | property | LOCAL datetime, converted using |
posedata
Pose Data resource: enables linking of name-value data topose
objects. This can be used to attach additional
sensor information to each pose
object (and by proxy to each media
object)
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/posedata Create new Preprocessors:
|
GET |
/api/posedata Get list of Preprocessors:
|
GET |
/api/posedata/<id> Get single Preprocessors:
|
DELETE |
/api/posedata/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | None | - | - | None |
value | Float() | None | True | False | - | - | None |
pose_id | Integer() | None | False | None | - | pose.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
pose | pose |
MANYTOONE | None |
roles
Not implemented yet. Not in use.ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/roles Create new Preprocessors:
|
PATCH |
/api/roles/<id> Update single Preprocessors:
|
GET |
/api/roles Get list of Preprocessors:
|
GET |
/api/roles/<id> Get single Preprocessors:
|
DELETE |
/api/roles/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | True | - | - | None |
tag
Tag resource. Suggested tags can linked to class labelslabel
and tags can be assigned to annotations annotation
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/tag Create new Preprocessors:
|
PATCH |
/api/tag/<id> Update single Preprocessors:
|
GET |
/api/tag Get list of
Included fields: Preprocessors:
|
GET |
/api/tag/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/tag/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | None | - | - | None |
user_id | Integer() | None | False | None | - | users.id | None |
type_id | Integer() | None | True | None | - | tag_type.id | None |
description | Text() | None | True | None | - | - | None |
synonym_tag_id | Integer() | None | True | None | - | tag.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
user | users |
MANYTOONE | None |
type | tag_type |
MANYTOONE | None |
synonym_tag | tag |
MANYTOONE | None |
synonyms | tag |
ONETOMANY | None |
label_tags | label_tags |
ONETOMANY | None |
annotation_tags | annotation_tags |
ONETOMANY | Collection of |
ASSOCIATION PROXIES FILTERABLE
ATTRIBUTE | MODEL | COLLECTION | DESCRIPTION |
labels | label |
label_tags | Proxy attribute that presents the linked label objects from the label_tags collection |
HYBRID ATTRIBUTES FILTERABLE
HYBRID METHODS
may require input parameters.
NAME | TYPE | ARGS | DESCRIPTION |
is_synonym | property | - | None |
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/tag_type Create new Preprocessors:
|
PATCH |
/api/tag_type/<id> Update single Preprocessors:
|
GET |
/api/tag_type Get list of Preprocessors:
|
GET |
/api/tag_type/<id> Get single Preprocessors:
|
DELETE |
/api/tag_type/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=80) | None | False | True | - | - | None |
description | Text() | None | True | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
tags | tag |
ONETOMANY | None |
usergroups
User / Group Association resource.ENDPOINTS
METHOD | ENDPOINT |
GET |
/api/usergroups Get list of
Included fields: Preprocessors:
|
GET |
/api/usergroups/<group_id> Get single
Included fields: Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
user_id | Integer() | None | False | None | True | users.id | None |
group_id | Integer() | None | False | None | True | groups.id | None |
created_at | DateTime() | function | True | None | - | - | None |
approved | Boolean() | False | True | None | - | - | None |
can_edit | Boolean() | False | True | None | - | - | None |
can_add_members | Boolean() | False | True | None | - | - | None |
can_share_data | Boolean() | False | True | None | - | - | None |
has_agreed | Boolean() | False | True | None | - | - | None |
added_by_user_id | Integer() | None | True | None | - | users.id | None |
RELATED MODELS FILTERABLE
users
User resource: captures all user information which is linked to most objects and resources.ENDPOINTS
METHOD | ENDPOINT |
GET |
/api/users Get list of
Included fields: Preprocessors:
|
GET |
/api/users/<id> Get single
Included fields: Preprocessors:
Postprocessors:
|
DELETE |
/api/users/<id> Delete single Preprocessors:
|
GET |
/api/users/api_token Manage API token |
PATCH |
/api/users/api_token Manage API token |
DELETE |
/api/users/api_token Manage API token |
POST |
/api/users/<int:user_id>/group/<int:group_id> Manage group membership |
DELETE |
/api/users/<int:user_id>/group/<int:group_id> Manage group membership |
PATCH |
/api/users/<int:user_id>/group/<int:group_id> Manage group membership |
POST |
/api/users/login Log in. Requires form parameters |
DELETE |
/api/users/login Log out the current session |
GET |
/api/users/login Get information about current logged in user |
POST |
/api/users Update user information |
PATCH |
/api/users/<int:user_id> Update user information |
POST |
/api/users/reset_password None |
GET |
/api/users/reset_password None |
POST |
/api/users/reset_password/<token> None |
GET |
/api/users/reset_password/<token> None |
POST |
/api/users/<int:user_id>/email Send an email to the user. Requires json post body containing |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
username | String(length=80) | None | False | True | - | - | None |
String(length=80) | None | False | True | - | - | None |
|
password | String(length=128) | None | False | None | - | - | None |
created_at | DateTime() | function | False | None | - | - | None |
last_login | DateTime() | now() | True | None | - | - | None |
first_name | String(length=30) | None | False | None | - | - | None |
last_name | String(length=30) | None | False | None | - | - | None |
active | Boolean() | True | True | None | - | - | None |
is_admin | Boolean() | False | True | None | - | - | None |
info | Text() | None | True | None | - | - | None |
role_id | Integer() | None | True | None | - | roles.id | None |
api_token | String(length=80) | None | True | True | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
role | roles |
MANYTOONE | None |
affiliations_usergroups | usergroups |
ONETOMANY | None |
usergroups | usergroups |
ONETOMANY | None |
ASSOCIATION PROXIES FILTERABLE
ATTRIBUTE | MODEL | COLLECTION | DESCRIPTION |
affiliations | group |
affiliations_usergroups | Proxy attribute that presents the linked group objects from the affiliations_usergroups collection |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
affiliations_names | method | None |
full_name | method | None |
get_id | method | None |
is_active | method | None |
is_anonymous | method | None |
is_authenticated | method | None |
vocab_element
Vocab Element resource: locally cached version of element fromvocab_registry
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/vocab_element Create new Preprocessors:
|
PATCH |
/api/vocab_element/<id> Update single Preprocessors:
|
GET |
/api/vocab_element Get list of
Included fields: Preprocessors:
|
GET |
/api/vocab_element/<id> Get single
Included fields: Preprocessors:
|
DELETE |
/api/vocab_element/<id> Delete single Preprocessors:
|
GET |
/api/vocab_element/<registry_key>/<element_key> None |
POST |
/api/vocab_element/<registry_key>/<element_key> None |
PATCH |
/api/vocab_element/<registry_key>/<element_key> None |
POST |
/api/vocab_element/<registry_key>/<element_key>/label/<label_id> None |
DELETE |
/api/vocab_element/<registry_key>/<element_key>/label/<label_id> None |
GET |
/api/vocab_element/nested None |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=128) | None | False | False | - | - | None |
key | String(length=96) | None | False | None | - | - | None |
lineage | JSON() | None | True | None | - | - | None |
data | JSON() | None | True | None | - | - | None |
mapped_registries | JSON() | None | True | None | - | - | None |
description | Text() | None | True | None | - | - | None |
parent_key | String(length=96) | None | True | None | - | - | None |
vocab_registry_key | String(length=96) | None | False | None | - | vocab_registry.key | The |
user_id | Integer() | None | False | None | - | users.id | The |
created_at | DateTime() | function | True | None | - | - | None |
updated_at | TIMESTAMP() | function | True | None | - | - | Updated time (UTC) |
origin_updated_at | DateTime() | None | True | None | - | - | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
vocab_registry | vocab_registry |
MANYTOONE | The |
user | users |
MANYTOONE | The user who owns or created and owns this record |
labels | label |
MANYTOMANY | A list of |
other_names | vocab_element_names |
ONETOMANY | None |
label_vocab_element | label_vocab_element |
ONETOMANY | None |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
mapped_labels | method | None |
reference_url | method | None |
reference_url_parent | method | None |
vocab_element_names
VocabElement Names resource.ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/vocab_element_names Create new Preprocessors:
|
PATCH |
/api/vocab_element_names/<id> Update single Preprocessors:
|
GET |
/api/vocab_element_names Get list of Preprocessors:
|
GET |
/api/vocab_element_names/<id> Get single Preprocessors:
|
DELETE |
/api/vocab_element_names/<id> Delete single Preprocessors:
|
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
id | Integer() | None | False | None | True | - | Primary key |
name | String(length=128) | None | False | False | - | - | None |
vocab_element_id | Integer() | None | False | None | - | vocab_element.id | None |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
vocab_element | vocab_element |
MANYTOONE | None |
vocab_registry
Vacab Registry resource: defines a mapping to a vocab registry module and handles interactions with them.ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/vocab_registry Create new Sets attributes on the constructed instance using the names and
values in Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships. Preprocessors:
|
PATCH |
/api/vocab_registry/<key> Update single Preprocessors:
|
GET |
/api/vocab_registry Get list of
Included fields: Preprocessors:
|
GET |
/api/vocab_registry/<key> Get single
Included fields: Preprocessors:
|
DELETE |
/api/vocab_registry/<key> Delete single Preprocessors:
|
GET |
/api/vocab_registry/<key>/match None |
GET |
/api/vocab_registry/<key>/get_element None |
GET |
/api/vocab_registry/<key>/get_all_elements None |
GET |
/api/vocab_registry/<key>/get_children None |
MODEL COLUMNS FILTERABLE
NAME | TYPE | DEFAULT | NULLABLE | UNIQUE | PRIM_KEY | FORGN_KEY | DESCRIPTION |
key | String(length=96) | None | False | True | True | - | None |
name | String(length=128) | None | False | True | - | - | None |
module | String(length=96) | None | False | None | - | - | None |
module_kwargs | JSON() | None | True | None | - | - | None |
vocab_element_key_name | String(length=96) | None | True | None | - | - | None |
description | Text() | None | True | None | - | - | None |
user_id | Integer() | None | False | None | - | users.id | The |
created_at | DateTime() | function | True | None | - | - | None |
updated_at | TIMESTAMP() | function | True | None | - | - | Updated time (UTC) |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
user | users |
MANYTOONE | The user who owns or created and owns this record |
vocab_elements | vocab_element |
ONETOMANY | None |
OTHER MODEL ATTRIBUTES FILTERABLE
NAME | TYPE | DESCRIPTION |
registry_urls | method | None |
registry_plugin | property | None |
Making API queries
Pagination
/api/resource?results_per_page=...&page=...
Responses to most GET
requests (with the exception of the export endpoints) are paginated by default, with at most ten objects per page. To request a specific page,
add a page=N
query parameter to the request URL, where N
is a positive integer (the first page is page one). If no
page query parameter is specified, the first page will be returned.
In order to specify the number of results per page, add the query parameter results_per_page=N
where N
is a
positive integer. If results_per_page
is greater than the maximum number of results per page as configured by
the server, then the query parameter will be ignored.
In addition to the "objects"
list, the response JSON object will have a "page"
key with the current
page number, a "num_pages"
key with total number of pages into which the set of matching instances is
divided, and a "num_results"
key with total number of instances which match the requested search.
Query format:
/api/resource?q={"filters":[...],"limit":...,"offset":...,"order_by":[...],"group_by":[...],"single":...}
The query parameter q
must be a JSON string. It can have the following mappings, all of which are optional:
-
filters
-
A list of
<filterobjects>
of one of the following forms:{"name": <fieldname>, "op": <operatorname>, "val": <argument>}
Where
<operatorname>
is one of the strings described below,<argument>
is a value to be used as the second argument to the given operator and<fieldname>
is the name of the field of the model to which to apply the operator, which can be either aMODEL COLUMN
,RELATED MODEL
,ASSOCIATION PROXY
orHYBRID ATTRIBUTE
for a resource.{"name": <fieldname>, "op": <operatorname>, "field": <fieldname>}
Where the first
<fieldname>
and<operatorname>
are as above and the second<fieldname>
is the field of the model that should be used as the second argument to the operator.The first
<fieldname>
may specify a field on a related model, if it is a string of the form<relationname>__<fieldname>
. Alternatively if the field name is the name of a relation and the operator is"has"
or"any"
, the"val"
argument can be a dictionary with the arguments representing another, nested filter to be applied as the argument for"has"
or"any"
.The
<operatorname>
strings recognized by the API include:==
,eq
,equals
,equals_to
"equal to" operator, where val
can be numeric or string!=
,neq
,does_not_equal
,not_equal_to
"not equal to" operator, where val
can be numeric or string>
,gt
,<
,lt
"less/greater than" operator, where val
is typically numeric>=
,ge
,gte
,geq
,<=
,le
,lte
,leq
"less/greater than or equal to" operator, where val
is typically numericin
,not_in
"is in" operator, where val
is typically a list of valuesis_null
,is_not_null
"is null" check, where there is no val
paramlike
,ilike
:"like" (case sensitive) or "ilike" (case insensitive) comparison, where val
is a string. Wildcards can be included as a%
symbol (or%25
url-encoded).has
for nesting operators on a relation that is a single object (i.e.: MANYTOONE
)any
for nesting operators on a relation that is a list of objects (i.e.: ONETOMANY/MANYTOMANY
)For geometry columns, there are also some spatial operators for
<operatorname>
, which include:geo_at
Geometry / Geography type <fieldname>
is close to a nominatedlat/lon
. Theval
takes the form:{"lat":...,"lon":...,"dist":...}
wheredist
is optional and defaults to0.00005
. For Geometry typesdist
is in srid units (eg: degrees), for Geography types it is meters. Hint: assume Geometry types most of the time.geo_in_bbox
Geometry / Geography type <fieldname>
is within a bounding box. Theval
takes the form:[p1,p2]
, which is a list containing two elements being two diagonal points defining the bounding box, eg:[bottom-left, top-right]
.p1,p2
are position objects of the form,{"lat":...,"lon":...}
geo_in_poly
Geometry / Geography type <fieldname>
is within a polygon. Theval
is a polygon list of points of the form:[p1,p2,p3,...,pn,p1]
, wherep1-pn
are position objects of the form{"lat":..., "lon":...}
. Note the polygon is closed, being that it starts and ends wthp1
.Filters can also exclude results, for example:
{"not": <filterobject>}
Filter objects can also be arbitrary Boolean formulas, for example:
{"or": [<filterobject>, {"and": [<filterobject>, ...]}, ...]}
Filter objects can also be defined on Hybrid Attributes of a model.
hybrid property
filter objects are defined in the same way as column fields, but to filter by ahybrid method
with one or more input arguments (<arg1>,<arg2>,...<argN>
), the object can be defined as:{"name": {"method":<method_name>,"args":[<arg1>,<arg2>,...<argN>]}, "op": <operatorname>, "val": <argument>}
The returned list of matching instances will include only those instances that satisfy all of the given filters.
If a filter is poorly formatted (for example, op is set to
'=='
but val is not set), the server responds with 400 Bad Request. limit
- A positive integer which specifies the maximum number of objects to return.
offset
- A positive integer which specifies the offset into the result set of the returned list of instances.
order_by
A list of objects of the form:
{"field": <fieldname>, "direction": <directionname>}
where
<fieldname>
is a string corresponding to the name of a field of the requested model and<directionname>
is either"asc"
for ascending order or"desc"
for descending order.<fieldname>
may alternately specify a field on a related model, if it is a string of the form<relationname>__<fieldname>
.Ordering can also be defined on Hybrid Attributes of a model.
hybrid property
order_by objects are defined in the same way as column fields, but to filter by ahybrid method
with one or more input arguments (<arg1>,<arg2>,...<argN>
), the object can be defined as:{"field": {"method":<method_name>,"args":[<arg1>,<arg2>,...<argN>]}, "direction": <directionname>}
group_by
A list of objects of the form:
{"field": <fieldname>}
where
<fieldname>
is a string corresponding to the name of a field of the requested model.<fieldname>
may alternately specify a field on a related model, if it is a string of the form<relationname>__<fieldname>
.single
- A Boolean representing whether a single result is expected as a result of the
search. If this is
true
and either no results or multiple results meet the criteria of the search, the server responds with an error message.
Data transformation and batch operations
/api/resource?f={...}&save={...}
Some endpoints support data transformation and manipulation of the output using the data transformation API. This allows users to define a sequence of operations that can be used to transform the output of the response in order to (i) export data in a desired format or (ii) perform batch import operations.