You can delete one or multiple assets via the following requests.
If you delete a dataset that has DSEs linked to it, those DSEs will be removed as well.
const url = "https://{your_tenant}.dscribedata.com/api/assets/:id"; const authToken = "yholmghj8§hbfg..."; fetch(url, { method: "DELETE", headers: { Authorization: `Bearer ${authToken}`, "Content-Type": "application/json", }, });
const url = "https://{your_tenant}.dscribedata.com/api/assets"; const authToken = "yholmghj8§hbfg..."; fetch(url, { method: "DELETE", headers: { Authorization: `Bearer ${authToken}`, "Content-Type": "application/json", }, body: JSON.striningify({ ids: ["123", "456"], }), });
Last updated 7 months ago
If you do not want to delete an asset but still want to hide it for users while you are still working on the documentation, you can take a look at in combination with.
Delete an asset based on the passed id
Successful operation
const response = await fetch('https://__tenant__.dscribedata.com/api/assets/{id}', { method: 'DELETE', headers: { "Authorization": "Bearer <token>" }, }); const data = await response.json();
Delete one or more assets
A list of asset ids to be deleted.
const response = await fetch('https://__tenant__.dscribedata.com/api/assets', { method: 'DELETE', headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }, body: JSON.stringify([ "text" ]), }); const data = await response.json();