GET /managers – REST API

List Managers: GET /managers

Retrieve a list of all existing managers on your site – including the owner.

JSON Result Details

  • total: The total managers on an account – includes the owner
  • managers: A list of each manager’s details – first_name, last_name, email, role
<?php
$curl = curl_init();
 
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.libib.com/managers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_CONNECTTIMEOUT => 5,
  CURLOPT_TIMEOUT => 15,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "x-api-key: YOUR_API_KEY",
    "x-api-user: YOUR_API_USER"
  ),
));
 
$response = curl_exec($curl);
$err = curl_error($curl);
 
curl_close($curl);
 
if ($err) {
  echo "cURL Error #:" . $err;
} else {
  $obj = json_decode($response);
}
{
    "total": 3,
    "managers": [
        {
            "first_name": "Larry",
            "last_name": "McMurtry",
            "email": "lonesome@example.com",
            "role": "owner"
        },
        {
            "first_name": "Samwise",
            "last_name": "Gamgee",
            "email": "samthewise@example.com",
            "role": "lender"
        },
        {
            "first_name": "Anaïs",
            "last_name": "Nin",
            "email": "angela@example.com",
            "role": "admin"
        }
    ]
}
Updated on February 17, 2023

Was this article helpful?

Related Articles