Audit v1
Get Audit Event
API Documentation v1
Audit v1
Get Audit Event
const myHeaders = new Headers();
myHeaders.append("organization", "your_organization_id");
myHeaders.append("token", "secret_123456");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://api.loghub.app/v1/events/{id_event}", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
{
"code": "GET_EVENT_DETAIL_READY",
"status": "ok",
"data": {
"id": "b912fae5-c38e-4458-a801-dfba46...",
"actor": {
"type": "user",
"data": {
"name": "Jonathan Wick",
"email": "[email protected]",
"internal_id": "1"
}
},
"action": "organization.setting.updated",
"metadata": {
"old": {
"theme": "dark",
"organization_name": "continental"
},
"new": {
"theme": "light",
"organization_name": "the continental"
},
"key": "value"
},
"extra": {
"ip": "::1",
"ips": [],
"user_agent": "PostmanRuntime/7.36.3",
"protocol": "http",
"headers": {
"token": "secret_*****",
"organization": "a924324e-299a-46d4-89cd-731a3f3cc444",
"content-type": "application/json",
"user-agent": "PostmanRuntime/7.36.3",
"accept": "*/*",
"host": "localhost:4000",
"accept-encoding": "gzip, deflate, br",
"connection": "keep-alive",
"content-length": "521",
"project_id": "7ecbe32b-2a38-4c7a-ae2...",
"organization_id": "a924324e-299a-46d4-89cd...",
"token_id": "ab5e8187-0664-4e75-be49...."
}
},
"project_id": "7ecbe32b-2a38-4c7a-ae29...",
"external_id": "2",
"token_id": "ab5e8187-0664-4e75-be49-7...",
"createdAt": "2024-04-05T16:22:22.203Z",
"updatedAt": "2024-04-05T16:22:22.203Z"
}
}
It corresponds to the ID of the audit event returned either in the creation or in the “List events” resource.
const myHeaders = new Headers();
myHeaders.append("organization", "your_organization_id");
myHeaders.append("token", "secret_123456");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://api.loghub.app/v1/events/{id_event}", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
{
"code": "GET_EVENT_DETAIL_READY",
"status": "ok",
"data": {
"id": "b912fae5-c38e-4458-a801-dfba46...",
"actor": {
"type": "user",
"data": {
"name": "Jonathan Wick",
"email": "[email protected]",
"internal_id": "1"
}
},
"action": "organization.setting.updated",
"metadata": {
"old": {
"theme": "dark",
"organization_name": "continental"
},
"new": {
"theme": "light",
"organization_name": "the continental"
},
"key": "value"
},
"extra": {
"ip": "::1",
"ips": [],
"user_agent": "PostmanRuntime/7.36.3",
"protocol": "http",
"headers": {
"token": "secret_*****",
"organization": "a924324e-299a-46d4-89cd-731a3f3cc444",
"content-type": "application/json",
"user-agent": "PostmanRuntime/7.36.3",
"accept": "*/*",
"host": "localhost:4000",
"accept-encoding": "gzip, deflate, br",
"connection": "keep-alive",
"content-length": "521",
"project_id": "7ecbe32b-2a38-4c7a-ae2...",
"organization_id": "a924324e-299a-46d4-89cd...",
"token_id": "ab5e8187-0664-4e75-be49...."
}
},
"project_id": "7ecbe32b-2a38-4c7a-ae29...",
"external_id": "2",
"token_id": "ab5e8187-0664-4e75-be49-7...",
"createdAt": "2024-04-05T16:22:22.203Z",
"updatedAt": "2024-04-05T16:22:22.203Z"
}
}
const myHeaders = new Headers();
myHeaders.append("organization", "your_organization_id");
myHeaders.append("token", "secret_123456");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://api.loghub.app/v1/events/{id_event}", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
{
"code": "GET_EVENT_DETAIL_READY",
"status": "ok",
"data": {
"id": "b912fae5-c38e-4458-a801-dfba46...",
"actor": {
"type": "user",
"data": {
"name": "Jonathan Wick",
"email": "[email protected]",
"internal_id": "1"
}
},
"action": "organization.setting.updated",
"metadata": {
"old": {
"theme": "dark",
"organization_name": "continental"
},
"new": {
"theme": "light",
"organization_name": "the continental"
},
"key": "value"
},
"extra": {
"ip": "::1",
"ips": [],
"user_agent": "PostmanRuntime/7.36.3",
"protocol": "http",
"headers": {
"token": "secret_*****",
"organization": "a924324e-299a-46d4-89cd-731a3f3cc444",
"content-type": "application/json",
"user-agent": "PostmanRuntime/7.36.3",
"accept": "*/*",
"host": "localhost:4000",
"accept-encoding": "gzip, deflate, br",
"connection": "keep-alive",
"content-length": "521",
"project_id": "7ecbe32b-2a38-4c7a-ae2...",
"organization_id": "a924324e-299a-46d4-89cd...",
"token_id": "ab5e8187-0664-4e75-be49...."
}
},
"project_id": "7ecbe32b-2a38-4c7a-ae29...",
"external_id": "2",
"token_id": "ab5e8187-0664-4e75-be49-7...",
"createdAt": "2024-04-05T16:22:22.203Z",
"updatedAt": "2024-04-05T16:22:22.203Z"
}
}