Get Segmentation
Este endpoint retorna un segmento dado un uuid de segmento.
Endpoint
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | Bearer LVwuk3_oug0D6... | access_token obtained in Atenea |
Url
Method: POST
URL: https://api.trust.lat/message-persistance/api/v1/segment/:segment_id
caution
Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea
Path Variables
Key | Value | Description |
---|---|---|
segment_uuid | 742157ec-c296... | uuid del segmento creado previamente |
Code Examples
- Curl
- JavaScript
- Python
curl --location --request GET 'https://api.trust.lat/message-persistance/api/v1/segment/742157ec-c296...' \
--header 'Authorization: Bearer s1v0PD5QpUr9pBBJ...'
import requests
url = "https://api.trust.lat/message-persistance/api/v1/segment/742157ec-c296..."
payload={}
headers = {
'Authorization': 'Bearer s1v0PD5QpUr9...'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api.trust.lat/message-persistance/api/v1/segment/742157ec-c296...',
headers: {
'Authorization': 'Bearer s1v0PD5QpUr9pBBJ...'
}
};
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",
"data": {
"id": 1,
"index_query": {
"apps.app_id": "1",
"model": "sm-g965fg"
},
"created_at": "2021-07-13T17:10:16.425Z",
"updated_at": "2021-07-13T17:10:27.491Z",
"uuid": "742157ec-c296...",
"company_id": "1",
"name": "hola 2"
},
"message": "Found"
}
HTTP Code: 404 Not Found
{
"code": 404,
"resource": "Segment",
"message": "Not found"
}