Create species
POST
/api/v1/speciesRoles required:
Creates a new species from provided JSON body.
Request Body
JSON
{
"common_name": "Southern Reef Squid",
"images": [
{
"attribution": "Tiffany Kosch, CC BY-NC-SA 4.0",
"src": "https://inaturalist-open-data.s3.amazonaws.com/photos/340064435/medium.jpg"
}
],
"species": "Sepioteuthis australis"
}
Responses
Created
JSON
{
"id": 1234567890
}
POST
/api/v1/speciesSamples
cURL
curl -X POST https://openfish.appspot.com/api/v1/species
JavaScript
fetch("https://openfish.appspot.com/api/v1/species", { 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/species");
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/species")
print(response.json())