Audit
The Audit object represents an event undertaken by either a user or API user on your Felloh account. These audit records help track actions for accountability and insights.
Audit Model
Properties
- Name
id- Type
- string
- Description
Unique identifier for the object.
- Name
type- Type
- string
- Description
The event that was undertaken.
- Name
entity_id- Type
- string
- Description
The entity ID that the event is related to.
- Name
created_at- Type
- datetime
- Description
The datetime at which the event occurred.
- Name
user- Type
- object
- Description
A compact user object representing the user that undertook the action.
- Name
organisation- Type
- object
- Description
A compact organisation object representing the organisation owner of the beneficiary.
{
"id": "e4bd9203-cb8a-4a67-87f5-7ae10bc35744",
"type": "booking:create",
"entity_id": "7c189f42-415e-4c33-8f00-aa76084692cf",
"created_at": "2022-08-01T09:04:56.312Z",
"user": {
"id": "de25f60e-e796-4e65-a451-442680e66da6"
},
"organisation": {
"id": "Z4321",
"name": "Felloh"
}
}
Fetch All
This endpoint retrieves all audit events. Audit events are sorted by creation date, with the most recent events first.
Parameters
- Name
organisationrequired- Type
- string
- Description
The organisation ID that you want to fetch audit events for. You can find the organisation that you have access to by using the List all organisations method.
- Name
skip- Type
- integer
- Description
Pagination offset. See pagination for more information.
- Name
take- Type
- integer
- Description
Number of records to return. See pagination for more information.
Returns
Returns an array of Audit Models
Request
import axios from 'axios';
const response = await axios.post(
'https://api.felloh.com/audit',
{
organisation: 'X9876',
skip: 10,
take: 20
},
{
headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer <YOUR TOKEN HERE>` }
}
);
Response
{
"data": [
{
"id": "e4bd9203-cb8a-4a67-87f5-7ae10bc35744",
"type": "booking:create",
"entity_id": "7c189f42-415e-4c33-8f00-aa76084692cf",
"created_at": "2022-08-01T09:04:56.312Z",
"user": {
"id": "de25f60e-e796-4e65-a451-442680e66da6"
},
"organisation": {
"id": "Z4321",
"name": "Felloh"
}
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"count": 1
}
}
