The HPE GreenLake Audit Log Service offers a collection of RESTful APIs for publishing audit logs and querying both application-specific and overall platform logs.
HPE GreenLake API for Audit Logs (v1)
https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/audit-logs/public/openapi/audit-logs-latest/
https://global.api.greenlake.hpe.com/
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 in 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.' |
additionalInfo/ipAddress | eq, contains | IP string | additionalInfo/ipAddress eq '192.168.12.12' contains(additionalInfo/ipAddress, '192.168') |
user/username | eq, contains | email in string | user/username eq 'test@test.com' contains(user/username, '@gmail.com') |
workspace/workspaceName | eq, contains | string | workspace/workspaceName eq 'Example workspace' contains(workspace/workspaceName, 'Example') |
application/id | eq | UUID in string | application/id eq '12312-123123-123123-123121' |
region | eq | region code in string | region eq 'us-west' |
hasDetails | eq | boolean | hasDetails eq 'true' |
Get audit logs with category User Management and User Activity and description logged out
Use the select
query parameter to restrict the number of properties included in the audit log response. The supported select parameters:
- additionalInfo
- createdAt
- category
- hasDetails
- workspace/workspaceName
- description
- user/username
Get audit logs with selected attributes
Provide a free-text search to perform a comprehensive search across all properties for audit logs.
Get audit logs that contain the provided text
- Mock server
https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/audit-logs/public/openapi/audit-logs-latest/audit-log/v1/logs
https://global.api.greenlake.hpe.com/audit-log/v1/logs
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/audit-logs/public/openapi/audit-logs-latest/audit-log/v1/logs \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "items": [ { … } ], "count": 0, "offset": 0, "total": 0, "remainingRecords": true }
- Mock server
https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/audit-logs/public/openapi/audit-logs-latest/audit-log/v1/logs/{id}/detail
https://global.api.greenlake.hpe.com/audit-log/v1/logs/{id}/detail
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
'https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/audit-logs/public/openapi/audit-logs-latest/audit-log/v1/logs/{id}/detail' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "/audit-log/logs", "header": "string", "body": [ "string" ] }