Skip to content

Get users

GET
/api/v1/users

Gets paginated users. When invoked by an admin, the full user object is returned, otherwise the public user only.

Parameters

Query Parameters

limit

Number of results to return.

Typeinteger
default20
minimum1
offset

Number of results to skip.

Typeinteger
minimum0

Responses

OK
application/json
JSON
{
"limit": 20,
"offset": 0,
"results": [
{
"display_name": "Coral Fischer",
"email": "coral.fischer@example.com",
"id": 1234567890,
"role": "annotator"
}
],
"total": 1
}
Variables
Key
Value
limit
offset

Samples

cURL
curl https://openfish.appspot.com/api/v1/users \
  --header 'Content-Type: application/json'
JavaScript
fetch('https://openfish.appspot.com/api/v1/users', {
  headers: {
    'Content-Type': 'application/json'
  }
})
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://openfish.appspot.com/api/v1/users",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
Python
import http.client

conn = http.client.HTTPSConnection("openfish.appspot.com")

headers = { 'Content-Type': "application/json" }

conn.request("GET", "/api/v1/users", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))