delete a group
Delete a group for a family.
- The contextual family is the authorised user's family
- Groups can only be deleted if a family owns them
- If it does not exist a 404 is returned
- If it exists but is owned by another family, a 404 is returned
- Groups are hard-deleted (once deleted, cannot be recovered)
- Deleting a group does not remove content from the family library. Only the group and content references are removed.
Responses
200 OK
Content-Type: application/json
idstring
{ "id": "jBakRtwbXA15ABQjVnBxo" }
404 Not Found
Content-Type: application/json
errorobject
codestring
messagestring
{ "error": { "code": "not-found", "message": "Group 'something-family-does-not-own' not found for family" } }
Parameters
Path Parameters
groupId
Type
string
DELETE
/card/family/library/groups/{groupId}
Server URL:https://api.yotoplay.com
Authorization
bearerAuth
Samples
curl "https://api.yotoplay.com/card/family/library/groups/{groupId}" --header "Authorization: Bearer [YOUR_TOKEN]"
const options = { method: 'DELETE', headers: { 'Authorization': 'Bearer [YOUR_TOKEN]' } }; fetch('https://api.yotoplay.com/card/family/library/groups/{groupId}', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yotoplay.com/card/family/library/groups/{groupId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer [YOUR_TOKEN]"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
import requests url = "https://api.yotoplay.com/card/family/library/groups/{groupId}" headers = { 'Authorization: Bearer [YOUR_TOKEN]' } response = requests.request("DELETE", url, headers=headers) print(response.text)