Organizations REST APIs
Organizations REST APIs
Authentication
Please head to the how to authenticate page of the documentation to read more about how you can authorize your client to make API requests to Fliplet.
Endpoints
Get the audit logs for an organization
GET or POST v1/organizations/:id/logs
Optional parameters:
type
: String or Array of strings (see list of available types)appId
: Number (ID)fields
: Array of stringsstartDate
: ISODATE StringendDate
: ISODATE Stringsort
: String (column name:id
,createdAt
,type
; defaults tocreatedAt
)order
: String (ASC or DESC; defaults to DESC)limit
: Number (defaults to 50, max 500)offset
: Numberformat
(json
orcsv
; defaults tojson
)
Note: when using GET requests, arrays can be given as a CSV string (e.g. type=foo,bar
)
The following types are filtered out by default since they are primarily used for analytics: app.analytics.pageView
, app.analytics.event
, app.view
, app.update
, studio.analytics.presence
.
Response (Status code: 200 OK):
{
"logs": [
{
"id": 1,
"type": "app.analytics.pageView",
"data": {
"_os": "Win32",
"_pageId": 123456,
"_platform": "web",
"_pageTitle": "Welcome",
"_userEmail": "test@test.com",
"_deviceTrackingId": "8017a7e5-5d3d-4a85-ac80-d70da58b45d7",
"_analyticsSessionId": "6fe0cad0-069c-6b65-83dc-21360d15dcc7"
},
"requestId": "20680bf2-5dc6-49b1-bb3e-602ec22b0a8c",
"createdAt": "2020-12-18T14:27:59.723Z",
"updatedAt": "2020-12-18T14:27:57.584Z",
"sessionId": 123,
"userId": 456,
"appId": 789,
"dataSourceEntryId": null,
"dataSourceId": null,
"organizationId": 1234,
"appNotificationId": null
}
],
"query": {
"where": { "type": "app.analytics.pageView" },
"offset": 0,
"limit": 50,
"order": [["createdAt", "DESC"]]
}
}