Encounter endpoints
Encounter object prototype:
Context is an enum with four possible values: UNKNOWN
, WILDLIFE_TOUR
, OPPORTUNISTIC_SIGHTING
, RESEARCH_EFFORT
.
Permissions is an enum with three possible values: LIMITED
, PRIVATE
, and PUBLIC
.
Region can be any region specified in the site settings object, as well as unknown
.
Species can be any species specified in the site settings object, as well as unknown
.
Status is an enum with 6 possible values: IN_DISCOVERY_QUEUE
, DISCOVERING
, IN_IDENTIFICATION_QUEUE
, IDENTIFYING
, PENDING_REVIEW
, COMPLETE
, and ERROR
.
Sample encounter object:
The annotation object must have an asset_id
and coordinates to draw a bounding box inside that image (x1
, y1
, x2
, y2
). The asset_id
must match one of the images in the encounter's assets
array. The other properties are optional.
The candidates property is populated by the backend after identification has been performed. When a candidate match is selected, the selected_candidate_id
and selected_annotation_id
fields will be set.
#
Create encounterPOST /api/v0/encounters
This action can be performed when authenticated as any user.
#
Read encounterGET /api/v0/encounters/encounter-id
This action can be performed without authentication. Some attributes will be left out if authentication is not provided, or if the authenticated user doesn't have permission to view those attributes.
#
Update encounterPUT /api/v0/encounters/encounter-id
This action can only be performed when authenticated as an administrator or the user who submitted the encounter.
#
Delete encounterDELETE /api/v0/encounters/encounter-id
This action can only be performed when authenticated as an administrator or the user who submitted the encounter.