Skip to content
  • There are no suggestions because the search field is empty.

Using audit logs in My Betty Blocks

Improve security and compliance with audit platform logging: track user actions, monitor changes, and optimize governance processes.

Audit logs at My Betty Blocks are a powerful addition to our governance suite, providing visibility into user activities. This feature helps company managers strengthen security, maintain compliance, and ensure accountability across the platform.

What do audit logs offer?

Activity tracking: Gain a detailed view of actions users perform within key areas such as company management, roles and permissions, organization management, and application management

Enhanced accountability: Keep a clear and transparent record of who performed which actions and when

Simplified compliance: Access detailed logs to support auditing processes with ease

audit logs

With this feature, we significantly improve the governance capabilities within the Betty Blocks platform, providing more tools for company admins, compliance officers, and security teams.

How to get started?

To start using this feature, you must have the appropriate permissions within your company. We have introduced a new permission called 'View audit logs' at the company level, granting designated roles the ability to access the audit logs. You can find it via Roles and permissions tab in your company overview:

By default, this permission is enabled for company administrators. Once you have been assigned the necessary permissions, you can access the company overview and select the newly added menu item labeled 'Audit logs'.

Audit logs overview explained

The first thing you notice is the audit logs table open (1) displaying all the actions undertaken within your company starting from the latest.

2-png-1

Columns communicate the following: 

  • Action indicates the type of action performed, such as Created, Deleted, or Changed. It visually categorizes actions for quick identification 
  • User displays the user who performed the action, with the user’s name and email address 

  • Subject provides details about the item or entity affected by the action 

3-png-1

  • Context offers additional information about the context in which the action was performed

  • Date & time: This column logs the exact date and time the action was performed. 

Filtering options

On top of the audit logs table, you'll find three filtering options:

  • Pick a date and time range (2) allows you to narrow down audit log entries to a specific time period. Select a start and end date (and optionally time) to display only actions within that range

45-png-1

  • Filter by user (3) lets you focus on actions performed by a specific user. You can select a user from the list, and the audit log will display only the activities linked to that person

56-png-1

  • Select action (4) enables you to sort actions by type, such as Created, Deleted, or Changed. It helps review only a specific category of changes or activities, making it easier to pinpoint specific events

2312312-png-1

With audit logs, managing your organization’s governance processes becomes more transparent and efficient. Explore this feature today to elevate your security and compliance capabilities!

Note: If you do not have the correct permissions but believe you should, please consult your colleagues or contact our support team for assistance.


Retrieving audit logs using Audit Log API 

Audit Log API allows you to retrieve audit logs of your organization using an API key.

Step 1. Requesting an API key

To access Audit Log API, you need an API key:

1) Since it’s a beta feature, enable the feature flag in the local storage of My Betty Blocks. 
Key: “SHOW_API_KEYS”, Value: “1”

How to view and edit local storage: View and edit local storage.

2) Navigate to Company → Settings → API Keys within My Betty Blocks.

How to use the company overview: Company overview.

3) Generate a new API key. Fill in a name for the key and the expiration datetime.

 
Step 2. Audit Log URL

The base URL for the Audit Log API is:

https://synapse.bettyblocks.com/external-api/customer/audit-log


 
Step 3. Authorization

Include the API key in the authorization header of your requests:

Authorization: Bearer <apikey>


 
Step 4. Query parameters

Audit Log API supports the following query parameters to filter and paginate results:

Parameter

Description

Type

Example

before

Retrieve logs before a specific datetime.

ISO 8601 datetime

2025-01-01T00:00:00Z

after

Retrieve logs after a specific datetime.

ISO 8601 datetime

2025-01-01T00:00:00Z

limit

Maximum records per request (up to 250).

Number

100

cursor

Cursor for pagination through logs.

String

12345


Pagination with cursor

Audit Log API uses cursor-based pagination:

  • Each response includes a cursor value and a list of audit logs.
  • If the cursor value is null, you are on the last page.
  • Otherwise, pass the cursor value as a parameter in the next request to retrieve additional logs.
Example request

Here’s an example of an API request (replace <apikey> with your specific value):

Request:

curl --request GET \
  --url 'https://synapse.bettyblocks.com/external-api/customer/audit-log?limit=10&cursor=5&after=2024-01-05T14%3A06%3A47Z' \
--header 'Authorization: Bearer <apikey>'

Response:

{
    "data": [
        {
            "id": 1,
            "user": "user@example.com",
            "context": null,
            "action": "add_customer_role_permission",
            "object": "customer_role",
            "subject": "my_bb_customer_contract_view",
            "object_id": "\"8f9c9da9-b9bd-47a8-9407-0413b5e065db\"",
            "inserted_at": "2024-11-22T10:38:10"
        },
        {
            "id": 2,
            "user": "user@example.com",
            "context": null,
            "action": "add_customer_role_permission",
            "object": "customer_role",
            "subject": "my_bb_customer_export",
            "object_id": "\"8f9c9da9-b9bd-47a8-9407-0413b5e065db\"",
            "inserted_at": "2024-11-22T10:38:11"
        },
        {
            "id": 3,
            "user": "user@example.com",
            "context": null,
            "action": "remove_customer_role_permission",
            "object": "customer_role",
            "subject": "my_bb_customer_contract_view",
            "object_id": "\"8f9c9da9-b9bd-47a8-9407-0413b5e065db\"",
            "inserted_at": "2024-11-22T10:38:12"
        }
    ],
    "cursor": 3
}

If the response contains a cursor, include it in the next request:

https://synapse.bettyblocks.com/external-api/customer/audit-log?cursor=3