Skip to main content

Retrieving activity logs and user access logs

With the Connection API, your application can retrieve two types of logs:

  • Activity logs: what happened to the issues in a project, such as created or changed issues.

  • User access logs: who signed in to a BIMcollab space, when, and with which application.

Use them for reports, dashboards or audits. This article explains how to get access to the logs and how to read them.


Before you begin

To retrieve logs, your access token needs an extra permission: the data_analysis scope. Request this scope when the user signs in:

openid offline_access bcf data_analysis

⚠️ Attention: The log endpoints use version 2.0.0 in the URL (/data_analysis/2.0.0/...). This is different from the version bc_2.1 that you use for other Connection API requests, such as issues and comments.

📝 Note: The scope is set when the user signs in. If you already have an access token without data_analysis, the user must sign in again with the new scope.

Add the scope in Postman

If you use the Postman collection from the authentication article:

  1. Open the Authorization tab of the collection.

  2. Under Configure New Token, change Scope to:
    ​openid offline_access bcf data_analysis

  3. Click Get New Access Token and sign in again.

  4. Click Use Token.


Activity logs

Activity logs show all actions on the issues of one project.

GET /data_analysis/2.0.0/project/<projectId>/activity

Replace <projectId> with your own project ID. To find the project ID, see Getting started with the Connection API.

Option A: Postman

  1. Create a new GET request in your collection.

  2. Paste the endpoint below in the URL field. Replace the placeholder with your project ID:
    ​https://playground.bimcollab.com/data_analysis/2.0.0/project/<project-id>/activity

  1. Click Send.

Option B: cURL

curl -X GET "https://playground.bimcollab.com/data_analysis/2.0.0/project/<project-id>/activity" \
-H "Authorization: Bearer <access-token>"

Example response:

[
{
"Project": "Example Project",
"Index": 1,
"ChangedBy": "John Doe <[email protected]>",
"TimeStamp": "2021-07-26T15:19:37.5776966+02:00",
"IssueAction": "Created",
"Area": null,
"Milestone": null,
"Type": "Issue"
}
]

Field

Meaning

Project

The name of the project.

Index

The number of the issue. It matches the index of the issue in the API.

ChangedBy

The user who performed the action.

TimeStamp

When the action happened.

IssueAction

What happened, for example Created, Edited, Resolved, Reactived

Area, Milestone, Type

The current Issue's value when you make the request. Use them to filter or group the results.

📝 Note: Area, Milestone and Type show the current Issue's value, not the value at the moment of the action.

Did this answer your question?