# Users ## List users Returns the Users resource with the roles relation. > Example request: ```bash curl -X GET \ -G "http://localhost/api/users" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( "http://localhost/api/users" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json()); ``` ```php $client = new \GuzzleHttp\Client(); $response = $client->get( 'http://localhost/api/users', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body)); ``` > Example response (200): ```json { "data": [ { "id": "fb8cab66-23e4-3f0b-8880-094f1ed59223", "name": "Mr. Dayton Pagac", "email": "urolfson@example.net", "created_at": "2020-12-30T20:48:33+00:00", "updated_at": "2020-12-30T20:48:33+00:00", "roles": { "data": [] } }, { "id": "6db61d41-17bc-3604-b7d5-83da76f9b03a", "name": "Annabel Senger", "email": "cstoltenberg@example.com", "created_at": "2020-12-30T20:48:33+00:00", "updated_at": "2020-12-30T20:48:33+00:00", "roles": { "data": [] } } ], "meta": { "pagination": { "total": 2, "count": 2, "per_page": 20, "current_page": 1, "total_pages": 1, "links": {} } } } ```

Request   

GET api/users

## Get single user Returns the User resource by it's uuid > Example request: ```bash curl -X GET \ -G "http://localhost/api/users/minima" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ```javascript const url = new URL( "http://localhost/api/users/minima" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; fetch(url, { method: "GET", headers, }).then(response => response.json()); ``` ```php $client = new \GuzzleHttp\Client(); $response = $client->get( 'http://localhost/api/users/minima', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body)); ``` > Example response (200): ```json { "data": { "id": "c6eaae09-1a89-33ed-93a5-6c8528d810d8", "name": "Kaelyn Lemke", "email": "alta.heller@example.com", "created_at": "2020-12-30T20:48:33+00:00", "updated_at": "2020-12-30T20:48:33+00:00", "roles": { "data": [] } } } ```

Request   

GET api/users/{uuid}

URL Parameters

uuid  string  
The UUID of the user.