List Resources
This endpoint allows you to retrieve information about all resources created within Slotify.
Authentication
This endpoint needs an app token for authentication:
| Method | GET | 
|---|---|
| Endpoint | v1/resources | 
| Headers | Accept: application/json | 
| Authorization: Bearer <base64_encoded_token> | |
| Token Type | App | 
Query Parameters
This endpoint supports query parameters:
| Field | Value | Description | 
|---|---|---|
| include | meta,app,rules,calendar | show user meta, constraints, calendar, app | 
| search | name, email | name or email of the resource | 
Example Request:
The following code shows how to send request to retrieve resources in Slotify API:
- PHP
 - BASH
 
$endpoint = 'https://api.slotify.ca/v1/resources';
$owner_token = base64_encode('app_token'); 
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => $endpoint,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => array(
        'Authorization: Bearer ' . $owner_token,
        'Accept: application/json',
        'Content-Type: application/json'
    ),
));
$response = curl_exec($curl);
if(curl_errno($curl)) {
    echo 'Error: ' . curl_error($curl);
} else {
    echo $response;
}
curl_close($curl);curl -X GET \
  https://api.slotify.ca/v1/resources \
  -H 'Authorization: Bearer ' \
  -H 'Accept: application/json'Example Response:
The following response will be provided by the Slotify server when this endpoint is called:
- 200 Ok
 
{
    "data": [
        {
            "uuid": "609db778-6888-4d63-a57c-688ad7e4008e",
            "role": "member",
            "name": "John Doe,
            "email": "[email protected]",
            "avatar": null,
            "timezone": "America/Toronto",
            "created_at": "2024-04-30T20:24:43+00:00",
            "updated_at": "2024-04-30T20:24:43+00:00"
        }
    ],
    "perPage": 25,
    "currentPage": 1,
    "total": 1,
    "totalPages": 1
}