APIs to retrieve audit logs of one or more services.
Audit Logs API - Fetch Audit Logs (v2beta1)
https://global.api.greenlake.hpe.com/
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/audit-logs/public/openapi/audit-logs-public/audit-trail-fetch-v2beta1/
Request
The audit logs can be filtered using a variety of parameters. Queries should be separated by and and can utilize eq, contains, and in operators to construct the final query. Each query should follow the format:
- key eq 'value' for equality operation.
- contains(key, 'value') for contains operation.
- key in ('value1', 'value2') for in operation.
| Filter Parameter | Supported Operators | Type | Example |
|---|---|---|---|
| createdAt | lt, ge | RFC timestamp (string) | createdAt ge '2024-02-16T07:54:55.0Z' |
| category | eq, in | string | category eq 'User Management'category in ('Device Management', 'User Activity') |
| description | eq, contains | string | contains(description, 'Logged in')description eq 'User test@test.com logged in via ping mode.' |
| ipAddress | eq, contains | IP string | ipAddress eq '192.168.12.12'contains(ipAddress, '192.168') |
| username | eq, contains | email (string) | username eq 'test@test.com'contains(username, '@gmail.com') |
| workspace/name | eq, contains | string | workspace/name eq 'Example workspace'contains(workspace/name, 'Example') |
| workspace/type | eq | string | workspace/type eq 'TENANT'workspace/type eq 'MSP' |
| serviceOffer/id | eq, in | UUID (string) | serviceOffer/id eq '902fa943-dcfc-432c-a92c-3a3a454923d9'serviceOffer/id in ('902fa943-dcfc-432c-a92c-3a3a454923d9', '00000000-0000-0000-0000-000000000000') |
| region | eq | region code (string) | region eq 'us-west' |
| hasDetails | eq | boolean | hasDetails eq 'true' |
Note: Maximum five serviceOffer/id can be passed in the filter. If no serviceOffer/id is passed, only platform audit logs will be fetched. Note: Maximum five serviceOffer/id can be passed in the filter. If no serviceOffer/id is passed, only HPE GreenLake Platform Audit logs will be fetched.
The API supports pagination and sorting options to efficiently retrieve large datasets
Rate limits:
- 100 requests per minute per user.
- 300 requests per minute overall.
Get HPE GreenLake platform audit logs
Get HPE GreenLake platform and Compute cloud console logs
Get audit logs for API Gateway category within a specific time range
Get audit logs for a specific user
Use the select query parameter to restrict the number of properties included in the audit log response. Specify as comma-separated values. The supported select parameters are:
- serviceOffer
- createdAt
- category
- hasDetails
- workspace
- description
- username
- ipAddress
- additionalInfo
Get audit logs with all attributes
Get audit logs with selected attributes
https://global.api.greenlake.hpe.com/audit-log/v2beta1/logs
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/audit-logs/public/openapi/audit-logs-public/audit-trail-fetch-v2beta1/audit-log/v2beta1/logs
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
https://global.api.greenlake.hpe.com/audit-log/v2beta1/logs \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Audit logs fetched successfully.
Total number of items matching the query. Maximum value is 10,000. If more than 10,000 items match the query, then remainingRecords is set to true.
Boolean value indicating if there are more than 10,000 records available that match the query. Client can apply filters to narrow down the results.
{ "count": 3, "offset": 0, "total": 100, "remainingRecords": true, "items": [ { … }, { … }, { … } ] }
https://global.api.greenlake.hpe.com/audit-log/v2beta1/logs/{id}
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/audit-logs/public/openapi/audit-logs-public/audit-trail-fetch-v2beta1/audit-log/v2beta1/logs/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
'https://global.api.greenlake.hpe.com/audit-log/v2beta1/logs/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "id": "8RtJaZQBITMTdBbBUxzz", "type": "/audit-log/log", "serviceOffer": { "id": "68067533-5764-401a-9620-24e6e2cdc574", "name": "Backup and Recovery", "region": "us-east" }, "username": "testuser@test.com", "category": "Storage settings", "description": "Storage firmware updated", "workspace": { "id": "3e35c938fb5911edbb4c660832a054ff", "name": "workspace name", "type": "STANDALONE" }, "createdAt": "2024-02-10T07:54:55.0Z", "ipAddress": "192.168.11.21", "additionalInfo": { "serverName": "test" }, "hasDetails": true }
https://global.api.greenlake.hpe.com/audit-log/v2beta1/logs/{id}/details
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/audit-logs/public/openapi/audit-logs-public/audit-trail-fetch-v2beta1/audit-log/v2beta1/logs/{id}/details
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
'https://global.api.greenlake.hpe.com/audit-log/v2beta1/logs/{id}/details' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "id": "8RtJaZQBITMTdBbBUxzz", "type": "/audit-log/log/details", "header": "Storage Firmware Update", "body": [ "Firmware version: 1.2.3", "Update status: Successful" ] }