Get Notification by uuid
Endpoint para la busqueda de notification/message a través de su uuid.
Se puede consultar por todos los campos de la notificación añadiendolos en un campo fields. Si no se añade ningún campo, por defecto buscará por id, uuid, custom_notification, values, created_at, updated_at, status, type_notification, disposable, version
Endpoint
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | Bearer LVwuk3_oug0D60ZTwm... | access_token obtained in Atenea |
Url
Method: GET
URL: https://api.trust.lat/message-persistance/api/notification/:message_uuid?fields=factory_message, id, uuid, custom_notification, values, created_at, updated_at, status, type_notification, disposable, version
caution
Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea
Path Variables
Key | Value | Description |
---|---|---|
message_uuid | 67ded174-a9ea... | Identificador único de notificación |
Code Examples
- Curl
- JavaScript
- Python
curl --location --request GET 'https://api.trust.lat/message-persistance/api/notification/de437cc6-bbdf-492c-b456-b9205a479e35?fields=factory_message,%20id,%20uuid,%20custom_notification,%20values,%20created_at,%20updated_at,%20status,%20type_notification,%20disposable,%20version' \
--header 'Authorization: Bearer 1sy4qQA5EkS5yMA0...'
import requests
url = "https://api.trust.lat/message-persistance/api/notification/de437cc6-bbdf-492c-b456-b9205a479e35?fields=factory_message, id, uuid, custom_notification, values, created_at, updated_at, status, type_notification, disposable, version"
payload={}
headers = {
'Authorization': 'Bearer 1sy4qQA5EkS5yMA0...'
}
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/notification/de437cc6-bbdf-492c-b456-b9205a479e35?fields=factory_message, id, uuid, custom_notification, values, created_at, updated_at, status, type_notification, disposable, version',
headers: {
'Authorization': 'Bearer 1sy4qQA5EkS5yMA...'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responses
HTTP Code: 200 OK
{
{
"status": true,
"message": "Notification",
"notification": {
"id": 1,
"uuid": "60736ec7-a78e...",
"custom_notification": {
"data": {
"type": "dialog",
"notificationDialog": "{'text_body':'Ejemplo beta','image_url':'https://www.stickpng.com/assets/images/580b57fbd9996e24bc43c0e4.png','isPersistent':'true','isCancelable':'true','buttons':[{'action':'https://www.google.cl','color':'#ff00ff','text':'Presioname','type':'url'}]}"
},
"priority": "high"
},
"values": [
"title",
"button"
],
"created_at": "2019-11-28T16:23:25.160Z",
"updated_at": "2019-11-28T16:23:25.160Z",
"status": true,
"type_notification": "trust_notification",
"disposable": false,
"version": 1,
"factory_message": null
}
}
HTTP Code: 404 Not Found
{
"status": false,
"message": "Notification not found"
}