Skip to main content

Read events by trust/app id

Este endpoint buscara como primer filtro el trust_id, luego agrupara por app_id. Su uso es para buscar todos los eventos relacionados a un dispositivo celular y la aplicación en cuestión.

Endpoint

Headers

KeyValueDescription
Content-Typeapplication/json
AuthorizationBearer MdJWfp154y0HN...access_token obtained in Atenea

Url

Method: GET
URL: https://api.trust.lat/events/v1/event?trust_id=1111-2222-3333-4444&app_id=1&bundle_id=com.enrollment.trust&style=cascade&page=1&per_page=10
caution

Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea

Como obtener un access token

Request Params

KeyExampleRequiredDescription
trust_id1111-2222-3333-4444trueDevice id
app_id1required but can use bundle_id as altermativeapplication identification
bundle_idcom.enrollment.trustrequired but can use app_id as altermativeapplication identification
stylecascadetrueselect the output format, can be 'compacted' or 'cascade'
page1falsefor pagination, default: 1
per_page10falsefor pagination, default: 10

Code Examples

curl --location --request GET 'https://api.trust.lat/events/v1/event?trust_id=1111-2222-3333-4444&app_id=1&bundle_id=com.enrollment.trust&style=cascade&page=1&per_page=10' \
--header 'Authorization: Bearer MdJWfp154y0HN...'

Responses

HTTP Code: 200 OK

{
"code": 200,
"resource": "Events",
"data": [
{
"app_id": "1",
"app_version": "v1.0.0",
"created_at": "2021-07-13T22:23:10.433Z",
"event_date": "2020-07-30T19:48:28.845+00:00",
"event_type": "INSTANCE",
"reason": "UPDATE",
"trust_id": "1234",
"uuid": "26418eaa-...",
"_type": ""
}
],
"message": "Found",
"page": 1,
"per_page": 10,
"total": 1
}

HTTP Code: 200 OK-No data

{
"code": 200,
"resource": "Events",
"data": [],
"message": "Found",
"page": 1,
"per_page": 10,
"total": 0
}

HTTP Code: 404 Not Found

{
"code": 404,
"resource": "Events",
"message": "Bad Request",
"errors": "trust_id and/or application id is missing in the request."
}