Delete a tour this user saved
const url = 'http://localhost:11044/api/v1/tours/example';const options = {method: 'DELETE', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url http://localhost:11044/api/v1/tours/example \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'A realm’s tour and the world’s own are not deletable here — they leave when whatever shipped them leaves. deleted is false rather than a 404 for those: the tour exists, it is simply not the caller’s to remove.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The tour’s id as listed by GET /tours, or the declaredId its file gave it; only a tour this user saved is removed, and any other id, including an unknown one, answers deleted: false
Query Parameters
Section titled “Query Parameters”Username to act as, whose world holds the tours; when it resolves to a user it is used in preference to the authenticated principal. Omitted or blank, the authenticated principal acts; 401 when neither resolves
Responses
Section titled “Responses”Whether a saved tour was removed
Whether a saved tour was removed
object
True when a tour this user saved was removed. False when the tour is not the caller’s to remove — a realm’s or the world’s own — or no deletable tour has that id
Example generated
{ "deleted": true}Basic-auth challenge failed

