Fliplet.Organizations
List the current user’s organizations and fetch audit logs with filters for type, date range, app, and session.
Get the current user’s organizations list
Fliplet.Organizations.get().then(function (organizations) {
});
Audit logs
Use the logs JS API to fetch audit logs for an organization.
Optional parameters:
type: String or Array of strings (see list of available types)appId: Number (ID) - the ID of the target app to filter logs forsessionId: Number (ID) - this is shown in the “About this app” overlay as “Device 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(jsonorcsv; defaults tojson)
// Get the latest 50 audit logs
Fliplet.Organizations.Logs.get().then(function(response) {
console.log(response.logs)
});
Note that 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.
Here’s an example providing all optional parameters:
Fliplet.Organizations.Logs.get({
format: 'csv',
type: ['app.settings.update', 'app.create'],
fields: ['id', 'type', 'data'],
appId: 123,
sessionId: 456,
startDate: '2022-01-01',
endDate: '2022-12-31 23:59:59',
sort: 'createdAt',
order: 'DESC',
limit: 10,
offset: 0
}).then(function(response) {
console.log(response.logs)
});
Analytics
Read organization-level analytics aggregates via Fliplet.Organizations.Analytics.get(data). The function passes data as a POST body to the REST endpoint and resolves with the raw response — the accepted shape is determined by the REST endpoint, not by this wrapper.
Fliplet.Organizations.Analytics.get({
type: 'screen-views',
appId: 123,
startDate: '2026-01-01',
endDate: '2026-12-31'
}).then(function (response) {
console.log(response);
});
Endpoint: POST v1/organizations/:orgId/analytics
Like the Audit logs endpoint, this uses POST despite being a read operation — query parameters are sent in the JSON body rather than as URL query string.
Settings
Get the current organization settings
Fliplet.Organization.Settings.getAll()
.then(function (settings) {
// Your code
});
Extend the current settings
Fliplet.Organization.Settings.set({
user: 'foo',
_password: 'bar' // Settings with an underscore prefix "_" will be encrypted
})
.then(function(settings) {
// Code to run when it completes
});
Get a setting
Fliplet.Organization.Settings.get('foo')
.then(function (value) {
// Your code
})
Check if a setting is set
Fliplet.Organization.Settings.isSet('_password')
.then(function(isSet) {
if (isSet) {
// Your code
}
});
Unset a setting
Fliplet.Organization.Settings.unset(['user','_password'])
.then(function (currentSettings) {
// Your code
})
Policies
Set or update the list of blacklisted extensions for file uploads
Run the snippet below in a Fliplet Studio app preview frame while you’re logged in as an organization admin to set up a new policy blacklisting as list of file extensions for all media files upload.
Fliplet.Organizations.get().then(function (organizations) {
return Fliplet.API.request({
method: 'POST',
url: 'v1/organizations/' + _.first(organizations).id + '/policy',
data: {
blacklistedFileExtensions: ['exe', 'jar', 'sfx', 'bat', 'cmd', 'com']
}
});
});
Here’s a list of the default blacklisted extensions we have in place: exe, jar, sfx, bat, cmd, com, pyw, php, raw, py, pyc, ps1, ps2, pyo, jnlp, gz, appref-ms, udl, wsb, website, theme, webpnp, xll, pif, application, msi, msp, scr, vb, jse, ws, wsf, wsc, wsh, msh, scf, lnk, inf, reg.
Note: updating the policy may require Studio users of your organization to update their password to ensure it's up to date with any other policy set up on your organization (e.g. security or password policies).