List Resources

 This endpoint allows you to retrieve information about all resources created within Slotify.

Authentication

This endpoint needs app token for authentication.

MethodGET
Endpointv1/resources
HeadersAccept: application/json 
Authorization: Bearer <base64_encoded_token> 
Token TypeApp

Query Parameters

This endpoint supports query parameters:

FieldValueDescription
includemeta,app,rules,calendarshow user meta, constraints, calendar, app
searchname, emailname or email of the resource

Example Request:

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:

Following response will be provided by 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
}