NordPass Enterprise now offers an Activity Logs API integration to help you manage member access and monitor activities in your organization. Below you will find instructions on how Owners and Admins can view Activity Logs via the API.
Before proceeding further, make sure that account authorizations are set up by following the NordPass Token Management guide.
API set-up
The Activity Logs API URLs are data center-specific - your organization must use the corresponding URL for the data center where your account is located.
-
EU: https://api-activities.eu.nordpass.com/activities/query
- U.S.: https://api-activities.us.nordpass.com/activities/query
The details returned by the API are not decrypted. Owners can search for specific details for members' actions in the Activity Logs tab. For more information on how to use the Activity Log, please visit our guide.
Request header
When making a POST request to the Activity Logs API, make sure to include both of the headers below:
-
Authorization
– The POST request to an activity logs API must be authorized using the token generated on the Business Admin Panel. -
Content-Type
– When initiating a POST request, it is crucial to include aContent-Type
header to explicitly indicate the media type of the data being transmitted in the request body.
For the Activity Logs API, you must set the content type toapplication/json
since the request is transmitted in JSON format.
Example:
Authorization: GENERATED_ACTIVE_TOKEN
Content-Type: application/json
Filtering & Pagination
- This API allows filtering by
timestamp_from
andtimestamp_to
. If the optional filter is not provided, the information is returned for the last 7 full days. The period specified for filtering must not exceed a maximum of 90 days. - The
user_uuids
is an optional filter that, if not provided, will return information for all users based on other filter criteria. This filter accepts an array of string values, allowing up to 500 user UUID values to be included in a single filter request.
-
-
Log in to the Admin Panel as an Owner or Admin.
-
Open Developer Mode.
-
Navigate to the member section on the left side menu.
-
In Developer Mode, open the Networks tab and search for v1/ecp/users.
-
The header should show a GET request.
-
Collect all active users' UUIDs from the Response tab.
Note: The same steps should be taken to get the UUIDs of suspended and deleted users.
-
-
- You may also use the search by item_id function. This allows you to find specific activity logs faster, as all you need is the 36-character UUID of the item.
- Also, you can manage the number of records returned by utilizing the
per_page
filtering option, which allows for a range of 1 to 100 records per request. If theper_page
option is not specified, the default will be 30 records per page. - The
page
filtering option can request specific page results. The page number must be at least 1 and cannot exceed the total number of available pages. If thepage
option is not specified, the API will default to returning the first page.
Example:
{
"timestamp_from": TIMESTAMP_FILTER_FROM,
"timestamp_to": TIMESTAMP_FILTER_TO,
"user_uuids": ["USER_UUID"],
"item_id": "ITEM_UUID",
"per_page": 30,
"page": 1
}
Rate limits
The API is limited to 2000 requests per 5 minutes per IP address.
Responses
You can find a list of actions performed by your organization members in the action types section of the activity log guide.
{
"data": [
{
"type": string,
"action": string,
"timestamp": integer,
"organization_uuid": string($uuid),
"user": {
"uuid": string($uuid),
"email": string($email)
},
"metadata": []
}
],
"metadata": {
"total": integer,
"per_page": integer,
"current_page": integer,
"total_pages": integer,
}
}
Limitation
The API can return up to the 10,000 most recent activity log records (e.g., requesting logs 9980-10050 will not return results). If the filtering results exceed this limit, it will only return the most recent 10,000 results.
Error codes
Error code |
Error message |
Possible reason |
---|---|---|
400 |
Invalid request payload |
|
401 |
Unauthorized |
Missing token or |
403 |
[authorization error] invalid token |
Invalid |
403 |
[authorization error] token introspection failed |
Expired/Revoked |
403 |
[bad request] organization UUID exchange failed |
Organization is no longer active in NordPass |