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. Links label objects to point objects. Also stores comments, tag associations, review flags, probability estimates, linked observations, etc...
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/annotation Create new annotation object. Expects JSON. Fields shown in Preprocessors:
|
GET |
/api/annotation Get list of annotation objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/annotation/<id> Get single annotation object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/annotation/<id> Delete single annotation object with pk field matching param Preprocessors:
|
PATCH |
/api/annotation Batch update annotation objects. Set 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:
|
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 annotation export endpoint. This can export annotations across multiple
annotation_sets. However, this endpoint is limited to a maximum of 200,000 annotations
in any single query. You can export more in separate queries using a combination of Export annotations matching query define in Querystring parameters are:
Where Metadata for the dataset is also returned in the response. Depending on the output
format, this could be as part of the response body in a Allowed fields include:
See annotation model columns, relations and attributes for more information on each of the included fields. 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 Additional allowed columns include:
These columns are ignored if no EXAMPLES
|
GET |
/api/annotation/tally/<group_by> Get a tally of annotations. The tally of annotations can be grouped by different properties. ^ NOTE: the counts in the TRANSLATING TO OTHER LABEL_SCHEMES When using
Where EXAMPLES
|
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 label object |
user | users |
MANYTOONE | Related owner user object |
point | point |
MANYTOONE | Related point object |
annotation_set | annotation_set |
MANYTOONE | Related annotation_set object |
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 annotation_tags associations |
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 pose relative to |
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 label assignment |
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 annotation_set |
observation_count | method | INT, denoting the number of linked observations of this object |
pose | method | |
pose_data | method | Properties for related pose item including any linked posedata fields |
suggested_tags | method | |
version_count | method | INT, denoting the number of changes in the version history of this object |
linked_observations | property | List of annotation objects (as dicts) linked with the same |
media | property | media object information for this annotation via |
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 point. Returns |
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 the media 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 annotation_set object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/annotation_set/<id> Update single annotation_set object with pk field matching param Preprocessors:
|
GET |
/api/annotation_set Get list of annotation_set objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/annotation_set/<id> Get single annotation_set object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/annotation_set/<id> Delete single annotation_set object with pk field matching param 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 annotations from annotation_set matching Export annotations matching query define in Querystring parameters are:
Where Metadata for the dataset is also returned in the response. Depending on the output
format, this could be as part of the response body in a Allowed fields include:
See annotation model columns, relations and attributes for more information on each of the included fields. 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 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>/annotations/validate Validate supplementary This endpoint utilises the
Where |
GET |
/api/annotation_set/<int:id>/media
None
|
GET |
/api/annotation_set/<int:id>/annotations Returns list of annotation objects contained in the |
GET |
/api/annotation_set/<int:id>/dashboards Get any shared |
GET |
/api/annotation_set/<int:id>/annotations/tally/<group_by> Get a tally of annotations for an The tally of annotations can be grouped by different properties. ^ NOTE: the counts in the TRANSLATING TO OTHER LABEL_SCHEMES When using
Where EXAMPLES
|
POST |
/api/annotation_set/<int:annotation_set_id>/media/<int:media_id> Add the media object with the ID |
DELETE |
/api/annotation_set/<int:annotation_set_id>/media/<int:media_id> Remove the media object with the ID |
POST |
/api/annotation_set/<int:id>/clone Clone the annotation_set matching 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 |
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 users model |
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 users model |
parent | annotation_set |
MANYTOONE | None |
usergroups | groups |
MANYTOMANY | List of groups objects that contain this resource |
points | point |
ONETOMANY | List of point objects |
annotations | annotation |
ONETOMANY | List of related annotation objects |
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 annotations this |
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 a annotation_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 annotation_set_file object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/annotation_set_file/<id> Update single annotation_set_file object with pk field matching param Preprocessors:
|
GET |
/api/annotation_set_file Get list of annotation_set_file objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/annotation_set_file/<id> Get single annotation_set_file object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/annotation_set_file/<id> Delete single annotation_set_file object with pk field matching param Preprocessors:
|
GET |
/api/annotation_set_file/<int:fid>/data Annotation Set File resource.
Get the data for the file resource matching
where 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 |
annotation_tags
Tag Annotation Associate resource: links tag objects to annotation objects.
campaign-deployment
A special resource for listing / querying campaigns in a different format.
ENDPOINTS
METHOD | ENDPOINT |
GET |
/api/campaign-deployment/<resource> Examples:
|
GET |
/api/campaign-deployment Examples:
|
campaign
Campaign resource: a group of deployments. Eg: a specific expedition, cruise or data collection initiative
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/campaign Create new campaign object. Expects JSON. Fields shown in Preprocessors:
Postprocessors:
|
PATCH |
/api/campaign/<id> Update single campaign object with pk field matching param Preprocessors:
Postprocessors:
|
GET |
/api/campaign Get list of campaign objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/campaign/<id> Get single campaign object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/campaign/<id> Delete single campaign object with pk field matching param 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 deployments contained in this |
media_count | property | - | Total number of media objects contained in this |
geom | property | - | The centroid |
timestamp | property | - | A |
total_annotation_count | property | - | Total number of labeled annotations linked to media objects from this |
public_annotation_count | property | - | Total number of publicly shared labeled annotations linked to media objects from this |
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 a campaign object.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/campaign_file Create new campaign_file object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/campaign_file/<id> Update single campaign_file object with pk field matching param Preprocessors:
|
GET |
/api/campaign_file Get list of campaign_file objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/campaign_file/<id> Get single campaign_file object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/campaign_file/<id> Delete single campaign_file object with pk field matching param Preprocessors:
|
GET |
/api/campaign_file/<int:fid>/data Get the data for the file resource matching
where |
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 campaigninfo object. Expects JSON. Fields shown in Preprocessors:
|
GET |
/api/campaigninfo Get list of campaigninfo objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/campaigninfo/<id> Get single campaigninfo object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/campaigninfo/<id> Delete single campaigninfo object with pk field matching param 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 the
Datasource Repository
and which Datasource Plugin
to use. Each platform must have at least one datasource.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/datasource Create new datasource object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/datasource/<id> Update single datasource object with pk field matching param Preprocessors:
|
GET |
/api/datasource Get list of datasource objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/datasource/<id> Get single datasource object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/datasource/<id> Delete single datasource object with pk field matching param 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 datasource_type objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/datasource_type/<id> Get single datasource_type object with pk field matching param
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 of media objects collected from an operation of the platform, eg: a survey, transect or mission
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/deployment Create new deployment object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/deployment/<id> Update single deployment object with pk field matching param Preprocessors:
|
GET |
/api/deployment Get list of deployment objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/deployment/<id> Get single deployment object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/deployment/<id> Delete single deployment object with pk field matching param 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 media from deployment matching Export media matching query define in Querystring parameters are:
Where Metadata for the dataset is also returned in the response. Depending on the output
format, this could be as part of the response body in a Allowed fields include:
See media model columns, relations and attributes for more information on each of the included fields. EXAMPLES
|
PATCH |
/api/deployment/<int:id>/finalise Finalise the deployment setting |
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 |
geom_line | Geometry(geometry_type='LINESTRING', srid=4326, from_text='ST_GeomFromEWKT', name='geometry') | None | True | None | - | - | None |
geom_start | Geometry(geometry_type='POINT', srid=4326, from_text='ST_GeomFromEWKT', name='geometry') | None | True | None | - | - | None |
geom_end | Geometry(geometry_type='POINT', srid=4326, from_text='ST_GeomFromEWKT', name='geometry') | None | True | None | - | - | None |
geom_centroid | Geometry(geometry_type='POINT', srid=4326, from_text='ST_GeomFromEWKT', name='geometry') | None | True | None | - | - | None |
dep_min | Float() | None | True | False | - | - | None |
dep_max | Float() | None | True | False | - | - | None |
alt_min | Float() | None | True | False | - | - | None |
alt_max | Float() | None | True | False | - | - | None |
timestamp_start | DateTime() | function | True | None | - | - | None |
timestamp_end | DateTime() | function | True | None | - | - | None |
pose_count | Integer() | 0 | True | None | - | - | None |
media_count | Integer() | 0 | 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 |
annotated_media_count | property | - | Number of media objects with one or more labeled annotations in this |
geom | property | - | The centroid |
timestamp | property | - | A |
total_annotation_count | property | - | Total number of labeled annotations linked to media objects from this |
public_annotation_count | property | - | Total number of publicly shared labeled annotations linked to media objects from this |
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 a pose and/or a media object.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/deployment_event Create new deployment_event object. Expects JSON. Fields shown in 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 deployment_event object with pk field matching param Preprocessors:
|
GET |
/api/deployment_event Get list of deployment_event objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/deployment_event/<id> Get single deployment_event object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/deployment_event/<id> Delete single deployment_event object with pk field matching param 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 to media and pose objects.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/deployment_event_type Create new deployment_event_type object. Expects JSON. Fields shown in 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 deployment_event_type object with pk field matching param Preprocessors:
|
GET |
/api/deployment_event_type Get list of deployment_event_type objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/deployment_event_type/<id> Get single deployment_event_type object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/deployment_event_type/<id> Delete single deployment_event_type object with pk field matching param 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 a deployment object. Can be used for batch importing / updating of media, pose and pose_data objects.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/deployment_file Create new deployment_file object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/deployment_file/<id> Update single deployment_file object with pk field matching param Preprocessors:
|
GET |
/api/deployment_file Get list of deployment_file objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/deployment_file/<id> Get single deployment_file object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/deployment_file/<id> Delete single deployment_file object with pk field matching param Preprocessors:
|
GET |
/api/deployment_file/<int:fid>/data Deployment file resource.
Get the data for the file resource matching
where Example1: convert CSV file into serialized, nested JSON expected for media resource and batch save rows to the related
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 group_types objects matching API query. See Making API search queries for instructions on making search queries Preprocessors:
|
GET |
/api/group_types/<id> Get single group_types object with pk field matching param 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 groups object. Expects JSON. Fields shown in Preprocessors:
Postprocessors:
|
PATCH |
/api/groups/<id> Update single groups object with pk field matching param Preprocessors:
|
GET |
/api/groups Get list of groups objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/groups/<id> Get single groups object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/groups/<id> Delete single groups object with pk field matching param 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 user for group custodian |
group_type | group_types |
MANYTOONE | related group_type object |
members | users |
MANYTOMANY | None |
usergroups | usergroups |
ONETOMANY | None |
dashboards | group_dashboard |
ONETOMANY | Dashboards for this Group |
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 a label_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 label object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/label/<id> Update single label object with pk field matching param Preprocessors:
|
GET |
/api/label Get list of label objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/label/<id> Get single label object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/label/<id> Delete single label object with pk field matching param 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 annotation objects |
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 label object in target label scheme.
Requires |
vocab_registry | property | Dictionary representation of |
label_info
Label Info resource. Attaches name-value information to label objects.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/label_info Create new label_info object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/label_info/<id> Update single label_info object with pk field matching param Preprocessors:
|
GET |
/api/label_info Get list of label_info objects matching API query. See Making API search queries for instructions on making search queries Preprocessors:
|
GET |
/api/label_info/<id> Get single label_info object with pk field matching param Preprocessors:
|
DELETE |
/api/label_info/<id> Delete single label_info object with pk field matching param 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 label_scheme object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/label_scheme/<id> Update single label_scheme object with pk field matching param Preprocessors:
|
GET |
/api/label_scheme Get list of label_scheme objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/label_scheme/<id> Get single label_scheme object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/label_scheme/<id> Delete single label_scheme object with pk field matching param 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 labels collection from label_scheme matching Querystring parameters are:
Where Metadata for the dataset is also returned in the response. Depending on the output
format, this could be as part of the response body in a Allowed fields include:
See label model columns, relations and attributes for more information on each of the included fields. 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 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 users model |
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 users model |
parent_label_scheme | label_scheme |
MANYTOONE | None |
annotation_sets | annotation_set |
ONETOMANY | None |
usergroups | groups |
MANYTOMANY | List of groups objects that contain this resource |
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 of label objects attached to label_scheme objects.
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/label_scheme_file Create new label_scheme_file object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/label_scheme_file/<id> Update single label_scheme_file object with pk field matching param Preprocessors:
|
GET |
/api/label_scheme_file Get list of label_scheme_file objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/label_scheme_file/<id> Get single label_scheme_file object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/label_scheme_file/<id> Delete single label_scheme_file object with pk field matching param Preprocessors:
|
GET |
/api/label_scheme_file/<int:fid>/data Get the data for the file resource matching
where |
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 suggested tag 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 interface
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/maplayer Create new maplayer object. Expects JSON. Fields shown in 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 maplayer object with pk field matching param Preprocessors:
|
GET |
/api/maplayer Get list of maplayer objects matching API query. See Making API search queries for instructions on making search queries Preprocessors:
|
GET |
/api/maplayer/<id> Get single maplayer object with pk field matching param Preprocessors:
|
DELETE |
/api/maplayer/<id> Delete single maplayer object with pk field matching param 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 interface
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/maplayer_group Create new maplayer_group object. Expects JSON. Fields shown in 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 maplayer_group object with pk field matching param Preprocessors:
|
GET |
/api/maplayer_group Get list of maplayer_group objects matching API query. See Making API search queries for instructions on making search queries Preprocessors:
|
GET |
/api/maplayer_group/<id> Get single maplayer_group object with pk field matching param Preprocessors:
|
DELETE |
/api/maplayer_group/<id> Delete single maplayer_group object with pk field matching param 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 media object with pk field matching param Preprocessors:
Postprocessors:
|
GET |
/api/media Get list of media objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/media/<id> Get single media object with pk field matching param
Included fields: Preprocessors:
Postprocessors:
|
DELETE |
/api/media/<id> Delete single media object with pk field matching param 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 media objects:
|
GET |
/api/media/<int:id>/poses The list of pose for the media item matching |
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=128) | 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 point objects |
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 media object contains unlabeled annotations from the
annotation_set with the id |
has_points | method | annotation_set_id | BOOL, whether or not the media object contains points from the
annotation_set with the id |
has_annotations | method | annotation_set_id | BOOL, whether or not the media object contains any annotations from the
annotation_set with the id |
distance | method | lat, lon | FLOAT, distance (in meters) of closest linked pose relative to |
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 |
event_count | property | BOOL, whether or not the media object contains any logged deployment_events |
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 of media 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 media_collection object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/media_collection/<id> Update single media_collection object with pk field matching param Preprocessors:
|
GET |
/api/media_collection Get list of media_collection objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/media_collection/<id> Get single media_collection object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/media_collection/<id> Delete single media_collection object with pk field matching param 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 media collection from media_collection matching Querystring parameters are:
Where Metadata for the dataset is also returned in the response. Depending on the output
format, this could be as part of the response body in a 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 media objects contained in the media_collection with an ID matching |
POST |
/api/media_collection/<int:media_collection_id>/media Add media objects matching the search query defined in the json post parameter |
GET |
/api/media_collection/<int:media_collection_id>/media/<int:media_id> Get the single media object with the ID |
POST |
/api/media_collection/<int:media_collection_id>/media/<int:media_id> Add the media object with the ID |
DELETE |
/api/media_collection/<int:media_collection_id>/media/<int:media_id> Remove the media object with the ID |
GET |
/api/media_collection/<int:id>/dashboards Get any shared |
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 users model |
RELATED MODELS FILTERABLE
FIELD | RELATION | DIRECTION | DESCRIPTION |
parent | media_collection |
MANYTOONE | The parent |
media | media |
MANYTOMANY | A list of |
user | users |
MANYTOONE | Related owner users model |
usergroups | groups |
MANYTOMANY | List of groups objects that contain this resource |
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 of media objects to a media_collection
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/media_collection_media Create new media_collection_media object. Expects JSON. Fields shown in Preprocessors:
|
GET |
/api/media_collection_media Get list of media_collection_media objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/media_collection_media/<media_collection_id> Get single media_collection_media object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/media_collection_media/<media_collection_id> Delete single media_collection_media object with pk field matching param 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 a media resource. This is associated with
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/media_type Create new media_type object. Expects JSON. Fields shown in Preprocessors:
|
GET |
/api/media_type Get list of media_type objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/media_type/<id> Get single media_type object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/media_type/<id> Delete single media_type object with pk field matching param 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 platform object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/platform/<id> Update single platform object with pk field matching param Preprocessors:
|
GET |
/api/platform Get list of platform objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/platform/<id> Get single platform object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/platform/<id> Delete single platform object with pk field matching param 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 parameters
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/platform_maplayer Create new platform_maplayer object. Expects JSON. Fields shown in 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 platform_maplayer object with pk field matching param Preprocessors:
|
GET |
/api/platform_maplayer Get list of platform_maplayer objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/platform_maplayer/<id> Get single platform_maplayer object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/platform_maplayer/<id> Delete single platform_maplayer object with pk field matching param 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 multiple annotations 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 point object with pk field matching param Preprocessors:
|
GET |
/api/point Get list of point objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/point/<id> Get single point object with pk field matching param
Included fields: Preprocessors:
Postprocessors:
|
DELETE |
/api/point/<id> Delete single point object with pk field matching param 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 media object |
annotation_set | annotation_set |
MANYTOONE | Parent/origin annotation_set object |
annotations | annotation |
ONETOMANY | List of annotation objects |
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 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 |
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 media object to the point annotation during batch annotation importing.
If the matched media object is not already in the associated media_collection,
it is added. Matching is done on Examples
|
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/pose Create new pose object. Expects JSON. Fields shown in Preprocessors:
|
GET |
/api/pose Get list of pose objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/pose/<id> Get single pose object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/pose/<id> Delete single pose object with pk field matching param 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 pose item including any linked posedata fields |
deployment | property | None |
platform | property | None |
timestamp_local | property | LOCAL datetime, converted using |
posedata
Pose Data resource: enables linking of name-value data to pose 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 posedata object. Expects JSON. Fields shown in Preprocessors:
|
GET |
/api/posedata Get list of posedata objects matching API query. See Making API search queries for instructions on making search queries Preprocessors:
|
GET |
/api/posedata/<id> Get single posedata object with pk field matching param Preprocessors:
|
DELETE |
/api/posedata/<id> Delete single posedata object with pk field matching param 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 roles object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/roles/<id> Update single roles object with pk field matching param Preprocessors:
|
GET |
/api/roles Get list of roles objects matching API query. See Making API search queries for instructions on making search queries Preprocessors:
|
GET |
/api/roles/<id> Get single roles object with pk field matching param Preprocessors:
|
DELETE |
/api/roles/<id> Delete single roles object with pk field matching param 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 labels label and tags can be assigned to annotations annotation
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/tag Create new tag object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/tag/<id> Update single tag object with pk field matching param Preprocessors:
|
GET |
/api/tag Get list of tag objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/tag/<id> Get single tag object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/tag/<id> Delete single tag object with pk field matching param 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 annotation_tags associations |
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 tag_type object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/tag_type/<id> Update single tag_type object with pk field matching param Preprocessors:
|
GET |
/api/tag_type Get list of tag_type objects matching API query. See Making API search queries for instructions on making search queries Preprocessors:
|
GET |
/api/tag_type/<id> Get single tag_type object with pk field matching param Preprocessors:
|
DELETE |
/api/tag_type/<id> Delete single tag_type object with pk field matching param 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 usergroups objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/usergroups/<group_id> Get single usergroups object with pk field matching param
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 users objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/users/<id> Get single users object with pk field matching param
Included fields: Preprocessors:
Postprocessors:
|
DELETE |
/api/users/<id> Delete single users object with pk field matching param 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 from vocab_registry
ENDPOINTS
METHOD | ENDPOINT |
POST |
/api/vocab_element Create new vocab_element object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/vocab_element/<id> Update single vocab_element object with pk field matching param Preprocessors:
|
GET |
/api/vocab_element Get list of vocab_element objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/vocab_element/<id> Get single vocab_element object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/vocab_element/<id> Delete single vocab_element object with pk field matching param 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 vocab_element_names object. Expects JSON. Fields shown in Preprocessors:
|
PATCH |
/api/vocab_element_names/<id> Update single vocab_element_names object with pk field matching param Preprocessors:
|
GET |
/api/vocab_element_names Get list of vocab_element_names objects matching API query. See Making API search queries for instructions on making search queries Preprocessors:
|
GET |
/api/vocab_element_names/<id> Get single vocab_element_names object with pk field matching param Preprocessors:
|
DELETE |
/api/vocab_element_names/<id> Delete single vocab_element_names object with pk field matching param 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 vocab_registry object. Expects JSON. Fields shown in 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 vocab_registry object with pk field matching param Preprocessors:
|
GET |
/api/vocab_registry Get list of vocab_registry objects matching API query. See Making API search queries for instructions on making search queries
Included fields: Preprocessors:
|
GET |
/api/vocab_registry/<key> Get single vocab_registry object with pk field matching param
Included fields: Preprocessors:
|
DELETE |
/api/vocab_registry/<key> Delete single vocab_registry object with pk field matching param 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.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"
.To create a filter from comparing fields within a table:
Where the first{"name": <fieldname>, "op": <operatorname>, "field": <fieldname>}
<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.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>,...,<argN>
) or key word arguments ({<key1>:<val1>,...,<keyN>:<valN>}
), the object can be defined as:{"name": {"method":<method_name>,"args":[<arg1>,...,<argN>],"kwargs":{<key1>:<val1>,...,<keyN>:<valN>}}, "op": <operatorname>, "val": <argument>}
For
JSON
typeMODEL COLUMNS
, you can define nested fields as follows:
Where the{"name": <fieldname>.<property1>.<property2>, "op": <operatorname>, "val": <argument>}
<property*>
are nested keys or properties in theJSON
column value.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
Geo-typed <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
Geo-typed <fieldname>
is within a closed polygon. Theval
takes the form:[p1,p2,...,pN,p1]
, which is a list containing points defining a polygon, wherep1,p2
are position objects of the form,{"lat":latitude,"lon":longitude}
andlatitude
andlongitude
are signed floating point numbers in decimal degrees.geo_in_poly_xy
Same as in geo_in_poly
, but the list of pointsp1-pN
are each a more compact 2-element list of the form[longitude, latitude]
wherelatitude
andlongitude
are signed floating point numbers in decimal degrees.geo_in_poly_yx
Same as in geo_in_poly_xy
, butp1-pN
are each of the form[latitude, longitude]
, as defined above.geo_in_mpoly_xy
Geo-typed <fieldname>
is within a multi-part polygon, without holes. Theval
is a list of polygons of the form:[poly1, poly2,...,polyN]
, where each polygonpoly1-polyN
is of the form[p1,p2,...,pN,p1]
, the pointsp1-pN
are each a 2-element list, as defined ingeo_in_poly_xy
, above.geo_in_polyh_xy
Geo-typed <fieldname>
is within a polygon, with holes. Theval
is a list of polygons of the form:[outer_ring, hole1, hole2,...,holeN]
, whereouter_ring
is the main polygon andhole1-holeN
are polygons defining the holes. Each polygon,outer_ring, hole1-holeN
are of the form[p1,p2,...,pN,p1]
, where the pointsp1-pN
are each a 2-element list, as defined ingeo_in_poly_xy
, above.geo_in_mpolyh_xy
Geo-typed <fieldname>
is within a multi-part polygon, each with holes. Theval
is a list of lists of polygons of the form:[polyh1,polyh2,...,polyhN]
, where each polygonpolyh1-polyhN
is a list of polygons, each of the form[outer_ring, hole1, hole2,...,holeN]
as defined ingeo_in_polyh_xy
, above.Filters can also exclude results, for example:
{"not": <filterobject>}
Filter objects can also be arbitrary Boolean formulas, for example:
{"or": [<filterobject>, {"and": [<filterobject>, ...]}, ...]}
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.