Create annotation
POST
/api/v1/annotationsRoles required:
Creates a new annotation from provided JSON body.
Request Body
JSON
{
"keypoints": [
{
"box": {
"x1": 10,
"x2": 50,
"y1": 25,
"y2": 75
},
"time": "01:56:05.500"
}
],
"observation": {
"common_name": "Zebrafish",
"species": "Girella Zebra"
},
"videostreamId": 1234567890
}
Responses
Created
JSON
{
"id": 1234567890
}
POST
/api/v1/annotationsSamples
cURL
curl -X POST https://openfish.appspot.com/api/v1/annotations
JavaScript
fetch("https://openfish.appspot.com/api/v1/annotations", { method: "POST" })
.then(response => response.json())
.then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://openfish.appspot.com/api/v1/annotations");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("https://openfish.appspot.com/api/v1/annotations")
print(response.json())