Skip to main content

Read service event by Company id

Trae los eventos asociados a un company id, si queda en blanco, traera todos. Su uso es para buscar todos los eventos relacionados a un servicio 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/service/?company_id=3
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
company_id3falseId de company

Code Examples

curl --location --request GET 'https://api.trust.lat/events/v1/event/service/?company_id=3' \
--header 'Authorization: Bearer sCaKT4qKHoDVEtP7F4...'

Responses

HTTP Code: 200 OK

{
"code": 200,
"resource": "Service Log",
"data": [
{
"audit_id": "",
"company_id": "6",
"created_at": "2021-07-13T22:36:33.778Z",
"description": "device created",
"operation": "CREATE",
"relevance": "INFO",
"resource": "DEVICE",
"resource_id": "1111-2222-3333-4444",
"resource_id_2": "",
"result": true,
"service": "INDEX",
"user_id": "1",
"uuid": "d538c40b-..."
},
{
"audit_id": "",
"company_id": "6",
"created_at": "2021-07-14T19:18:42.902Z",
"description": "device created",
"operation": "CREATE",
"relevance": "INFO",
"resource": "DEVICE",
"resource_id": "1111-2222-3333-4444",
"resource_id_2": "",
"result": true,
"service": "INDEX",
"user_id": "1",
"uuid": "b97a4c1c-..."
},
{
"audit_id": "",
"company_id": "6",
"created_at": "2021-07-14T19:19:54.641Z",
"description": "device created",
"operation": "CREATE",
"relevance": "INFO",
"resource": "DEVICE",
"resource_id": "1111-2222-3333-4444",
"resource_id_2": "",
"result": true,
"service": "INDEX",
"user_id": "",
"uuid": "cab9d2e1-..."
},
{
"audit_id": "",
"company_id": "6",
"created_at": "2021-07-14T19:20:03.788Z",
"description": "device created",
"operation": "CREATE",
"relevance": "INFO",
"resource": "DEVICE",
"resource_id": "1111-2222-3333-4444",
"resource_id_2": "",
"result": true,
"service": "INDEX",
"user_id": "1",
"uuid": "0cfd1942-..."
}
],
"message": "Found",
"page": 1,
"per_page": 10
}

HTTP Code: 200 OK-No data

{
"code": 200,
"resource": "Service Log",
"data": [],
"message": "Found",
"page": 1,
"per_page": 10
}