Delete Download Link
A través de este endpoint es posible deshabilitar un enlace de descarga para que no pueda ser utilizado. El enlace se identifica mediante el uuid proporcionado a través de la variable de ruta.
Endpoint
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | Bearer {{access_token}} | access_token obtained in Atenea |
Method: DELETE
URL: https://api.trust.lat/chronos/v1/links/:uuid
Path Variables:
Key | Value Example | Description |
---|---|---|
uuid | ffffffff-ffff-ffff-ffff-ffffffffffff | Identificador único del enlace de descarga provisto por servicio Chronos. Obligatorio |
caution
Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea
Code Examples
- Curl
- JavaScript
- Python
curl --location --request DELETE 'https://api.trust.lat/chronos/v1/links/:uuid' \
--header 'Authorization: Bearer `{{access_token}}`'
import requests
url = "https://api.trust.lat/chronos/v1/links/:uuid"
payload={}
headers = {
'Authorization': 'Bearer `{{access_token}}`'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var config = {
method: 'delete',
url: 'https://api.trust.lat/chronos/v1/links/:uuid',
headers: {
'Authorization': 'Bearer `{{access_token}}`'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responses
HTTP Code: 200 OK
Download Link disabled successfully
{
"code": 200,
"resource": "Download Link",
"data": {
"deleted_at": "2021-09-24T16:35:21.213Z",
"max_download": 1,
"link": "https://api-tst.trust.lat/chronos/v1/file/ffffffffffffffffffffffffffffffff",
"uuid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"size": "1687.421875 KB",
"secured_by_password": true
},
"message": "Ok"
}
HTTP Code: 404 Not Found
No download file associated to the indicated uuid
{
"code": 404,
"resource": "Download Link",
"message": "Not found"
}