Update Specific Scheduler
This endpoint will be used to update specific scheduler for given app.
Authentication
This endpoint needs app token for authentication.
Method | PUT |
---|---|
Endpoint | v1/schedulers/:uuid |
Headers | Accept: application/json |
Authorization: Bearer <base64_encoded_token> | |
Token Type | App |
Example Request:
Following code shows how to send request to update specific scheduler in Slotify api.
- PHP
- BASH
$endpoint = 'https://api.slotify.ca/v1/schedulers/bc7b15f9-2573-4aaa-be09-44d6c6f9c62c';
$owner_token = base64_encode('app_token');
$new_data = array(
'name' => 'Updated Name'
);
$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 => 'PUT',
CURLOPT_POSTFIELDS => $new_data_json,
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 PUT \
https://api.slotify.ca/v1/schedulers/:uuid \
-H 'Authorization: Bearer ' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "Updated Name"
}'
Example Response:
Following response will be provided by Slotify server when this endpoint is called:
- 204 Not Content