Skip to content

Add example CLI for audit log data retrieval#686

Merged
IwonaLanger merged 17 commits into
SAP-samples:mainfrom
tobiscr:main
Jun 30, 2026
Merged

Add example CLI for audit log data retrieval#686
IwonaLanger merged 17 commits into
SAP-samples:mainfrom
tobiscr:main

Conversation

@tobiscr

@tobiscr tobiscr commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Adds a Go CLI tool (retrieve-auditlog-data) to retrieve audit log records from the SAP Audit Log Service v2 API on SAP BTP.

What it does:

  • Authenticates via OAuth2 client credentials (read from a local service binding file)
  • Fetches /auditlog/v2/auditlogrecords with optional --time-from / --time-to filters
  • Follows server-side pagination automatically and prints all records as pretty-printed JSON

How to test:

cd retrieve-auditlog-data
go test ./...
go run main.go get --time-from 2026-06-01T00:00:00 --time-to 2026-06-22T23:59:59

@cla-assistant

cla-assistant Bot commented Jun 22, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread retrieve-auditlog-data/README.md Outdated
Comment thread retrieve-auditlog-data/README.md Outdated
Comment thread retrieve-auditlog-data/README.md Outdated
Comment thread retrieve-auditlog-data/README.md Outdated
Comment thread retrieve-auditlog-data/README.md Outdated
Comment thread retrieve-auditlog-data/README.md Outdated
Comment thread retrieve-auditlog-data/README.md Outdated
Comment thread retrieve-auditlog-data/README.md Outdated
Comment thread retrieve-auditlog-data/README.md Outdated
Comment thread retrieve-auditlog-data/README.md Outdated
tobiscr and others added 11 commits June 23, 2026 13:13
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
Co-authored-by: Iwona Langer <iwona.langer@sap.com>

@tobiscr tobiscr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the great feedback!

Comment thread retrieve-auditlog-data/README.md Outdated
Co-authored-by: Iwona Langer <iwona.langer@sap.com>
IwonaLanger
IwonaLanger previously approved these changes Jun 23, 2026
Comment thread retrieve-auditlog-data/README.md
@IwonaLanger IwonaLanger merged commit 7b59e3b into SAP-samples:main Jun 30, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants