Logs

API endpoints for log operations.

Learn more about Audit Logging.arrow-up-right

Get Task Execution Logs

post

Retrieves execution logs for a specific task with optional pagination. Supports both ID-based and name-based task lookup, as well as a nested identifier shape.

Authorizations
AuthorizationstringRequired

API authentication using Bearer tokens. Include your API token in the Authorization header: Authorization: Bearer <your-api-token>

Tokens can be obtained from the Opsera platform's API token management interface.

Body

Accepts id or name, or nested identifier object with id/name

idstringOptional

MongoDB ObjectId

namestringOptional

Resource name (not guaranteed to be unique)

runCountnumberOptional

Specific run count to retrieve logs for (optional)

Example: 5
pagenumberOptional

Page number for pagination (optional, default 1)

Example: 1
pageSizenumberOptional

Number of log entries per page (optional, default 100)

Example: 100
Responses
chevron-right
200

Successfully retrieved task logs

application/json
statusstring · enumRequired

Response status indicator

Possible values:
dataanyRequired
post
/api/v2/logs/task

Get User Activity Audit Logs

get

This endpoint retrieves detailed activity audit logs related to user actions within the platform. It allows you to fetch a paginated list of audit logs, filtered by various parameters such as date range, user ID, action types, and more. It is useful for monitoring, auditing, and analyzing user activities. For more details, refer to the Opsera API Documentationarrow-up-right.

Use Cases

  • Activity Monitoring: Track user actions for security and compliance.

  • Audit Trails: Maintain logs for auditing purposes.

  • Issue Investigation: Investigate specific events or incidents.


Required Access

  • Authentication: Bearer token is required.

  • API Scope: api

  • Site Roles:

    • Opsera Administrator

    • Auditor

    • Security Manager


Important Notes!

  • Pagination: Use page and page_size query parameters for pagination.

  • Date and Time Filtering: Combine start_date with start_time and end_date with end_time for precise filtering.

  • Maximum Page Size: The maximum allowed page_size is 1000.

  • Data Sensitivity: Audit logs may contain sensitive information.

  • Response Structure: The response includes a count and a data array.

Authorizations
AuthorizationstringRequired

API authentication using Bearer tokens. Include your API token in the Authorization header: Authorization: Bearer <your-api-token>

Tokens can be obtained from the Opsera platform's API token management interface.

Query parameters
pageinteger · min: 1Optional

Page number for pagination (starting from 1).

Example: 1
page_sizeinteger · min: 1 · max: 1000Optional

Number of records per page. Maximum is 1000.

Default: 100Example: 50
start_datestring · dateOptional

Start date for filtering logs (YYYY-MM-DD).

Example: 2023-11-01
start_timestringOptional

Start time for filtering logs (HH:mm in 24-hour format).

Example: 09:00Pattern: ^([01]?[0-9]|2[0-3]):[0-5][0-9]$
end_datestring · dateOptional

End date for filtering logs (YYYY-MM-DD).

Example: 2023-11-05
end_timestringOptional

End time for filtering logs (HH:mm in 24-hour format).

Example: 17:00Pattern: ^([01]?[0-9]|2[0-3]):[0-5][0-9]$
user_idstringOptional

Filter logs for a specific user ID.

Example: 507f1f77bcf86cd799439011
user_emailstring · emailOptional

Filter logs for a specific user email.

Example: [email protected]
typestringOptional

Filter logs by type of activity.

Example: login
actionstringOptional

Filter logs by primary action.

Example: create
secondary_actionstringOptional

Filter logs by secondary action.

Example: user_profile
target_idstringOptional

Filter logs by target entity ID.

Example: 60d5ec49f5a4c93d2e7d1b77
Responses
chevron-right
200

Successfully retrieved user activity audit logs.

application/json
countintegerOptional

Total number of logs matching the query.

Example: 150
get
/api/v2/logs/audit/user

Last updated