Retrieve a Manager: GET /managers/{id}
Retrieve a single manager by passing the manager’s username or email as an id.
Query Parameters
- id: A unique ID for the manager – parameter accepts either the username or email.
JSON Result Details
- first_name: Manager’s first name.
- last_name: Manager’s last name.
- email: Manager’s email, which is used to log in to manage Libib.
- username: Manager’s username, which is used as part of their public URL.
- role: The managers role. owner, admin, basic
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.libib.com/managers/samgee", 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); }
{ "first_name": "Samwise", "last_name": "Gamgee", "email": "samthewise@example.com", "username": "samgee", "role": "basic" }