Remove Segmentation
Elimina un segmento a través de su uuid de segmento.
Endpoint
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | Bearer LVwuk3_oug0D60ZTwm... | access_token obtained in Atenea |
Url
Method: POST
URL: https://api.trust.lat/message-persistance/api/v1/segment/:segment_uuid
caution
Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea
Path Variables
Key | Value | Description |
---|---|---|
segment_uuid | 54ffe5f6-fb25... | requerido, uuid del segmento a borrar |
Code Examples
- Curl
- JavaScript
- Python
curl --location --request DELETE 'https://api.trust.lat/message-persistance/api/v1/segment/54ffe5f6-fb25...' \
--header 'Authorization: Bearer s1v0PD5QpUr9pBB...'
import requests
url = "https://api.trust.lat/message-persistance/api/v1/segment/54ffe5f6-fb25..."
payload={}
headers = {
'Authorization': 'Bearer s1v0PD5QpUr9pBB...'
}
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/message-persistance/api/v1/segment/54ffe5f6-fb25...',
headers: {
'Authorization': 'Bearer s1v0PD5QpUr9pBB...'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responses
HTTP Code: 200 OK
{
"code": 200,
"resource": "Segment removed",
"data": {
"id": 1,
"index_query": {
"apps.app_id": [
"1",
"3",
"4"
],
"apps.tags.departamento": "backend",
"apps.tags.afp": "modelo"
},
"created_at": "2021-07-13T16:40:52.142Z",
"updated_at": "2021-07-13T16:40:52.142Z",
"uuid": "54ffe5f6-fb25-461b-a8e0-17379a02cd5c",
"company_id": "1",
"name": "segment_test"
},
"message": "Ok"
}
HTTP Code: 404 Not Found
{
"code": 404,
"resource": "Segment",
"message": "Not found"
}