Update role
PATCH
/api/v1/users/{email}Roles required:
Update a user's role.
Parameters
Path Parameters
email*
Typestring
RequiredExample
user@example.com
Request Body
JSON
{
"role": "annotator"
}
Responses
OK
PATCH
/api/v1/users/{email}Samples
cURL
curl -X PATCH https://openfish.appspot.com/api/v1/users/{email}
JavaScript
fetch("https://openfish.appspot.com/api/v1/users/{email}", { method: "PATCH" })
.then(response => response.json())
.then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://openfish.appspot.com/api/v1/users/{email}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.patch("https://openfish.appspot.com/api/v1/users/{email}")
print(response.json())