Audit v1
Get Audit Event List
API Documentation v1
Audit v1
Get Audit Event List
const myHeaders = new Headers();
myHeaders.append("organization", "organization_id");
myHeaders.append("token", "secret_token");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://api.loghub.app/v1/events/?page=0&limit=5&order=desc&external_id=your_external_id", 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 page number you wish to retrieve.
It corresponds to the limit of events returned per request. Accepted values are 5, 10, 15, and 20.
By default, sorting is performed based on the creation date of the audit event. Accepted values are ‘desc’ or ‘asc’
It corresponds to a unique identifier of your application to which the audit event will be associated. For example, if your application manages workspaces, you can send the workspace ID. Then, when you incorporate our log audit table into your application, you will be able to perform specific workspace filtering.
const myHeaders = new Headers();
myHeaders.append("organization", "organization_id");
myHeaders.append("token", "secret_token");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://api.loghub.app/v1/events/?page=0&limit=5&order=desc&external_id=your_external_id", 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", "organization_id");
myHeaders.append("token", "secret_token");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://api.loghub.app/v1/events/?page=0&limit=5&order=desc&external_id=your_external_id", 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"
}
},
...]