Update role
PATCH
/api/v1/users/{id}Roles required:
Update a user's role.
Parameters
Path Parameters
id*
ID
Typestring
RequiredExample
1234567890
Request Body
JSON
{
"display_name": "Coral Fischer",
"email": "coral.fischer@example.com",
"role": "annotator"
}
Responses
OK
PATCH
/api/v1/users/{id}Samples
cURL
curl -X PATCH https://openfish.appspot.com/api/v1/users/{id}
JavaScript
fetch("https://openfish.appspot.com/api/v1/users/{id}", { 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/{id}");
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/{id}")
print(response.json())