Log Management API

Log Management API

Log Management API is available for Nexus Repository Cloud users. This set of endpoints allows us to query and download logs with paging and filtering, returning pre-signed URLs for each log file. These logs are stored in your tenant’s S3 bucket.

Endpoints

The request retrieves logs for a specific hour, organized by log type and date. The user requires the following permissions:

GET /service/rest/v1/logs/{type}/{year}/{month}/{day}/{hour}?page=1&size=50

Where,

Example

GET /service/rest/v1/logs/AUDIT/2025/9/3/14?page=1&size=50
GET /service/rest/v1/logs/REQUESTS/2025/9/3/14?page=1&size=50

Access Window Validation

Each tenant is configured with a retention period that defines the number of days logs are available. This value is set through an environment variable.

If a request attempts to access logs older than the configured retention period, the system will respond with HTTP 403 (Forbidden).

If the variable is not set or contains a negative value, the retention period will default to 7 days.

Pre-signed URL Expiration

The expiration window for pre-signed URLs is controlled by the environment variable log_download_url_expiration_minutes.

The API that returns links to S3 logs generates pre-signed URLs. By default, these URLs remain valid for 5 minutes from the time they are generated.

Example Response

{
  "type": "audit",
  "year": 2025,
  "month": 9,
  "day": 3,
  "hour": 14,
  "items": [
    "https://s3.amazonaws.com/.../log1",
    "https://s3.amazonaws.com/.../log2"
  ],
  "page": 3,
  "totalCount": 1200
}

Search results

No results found