Delete a preview file. Its files in the storage are marked as deleted. The files are removed from the storage if REMOVE_FILES is set, or if you give force=true. If the task showed this preview, the task gets its previous preview. If the entity showed this preview and the project sets the entity preview automatically, the entity gets the newest preview of its tasks. Otherwise the entity has no preview. You must be an administrator, or a manager in the team of the project.
DELETE
/data/preview-files/{instance_id}
curl
curl -X DELETE "http://api.example.com/data/preview-files/a24a6ea4-ce75-4665-a070-57453082c25?force=false" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/data/preview-files/a24a6ea4-ce75-4665-a070-57453082c25"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {
"force": false
}
payload = None
response = requests.delete(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())