List the audit logs subscription configured for a Vultr organization, including its status, retention period, and billing details using the Vultr API.
Listing audit logs subscriptions shows the status, retention setting, and billing details for the audit logs subscription on your account. Because an account can have only one subscription, this returns at most one entry.
This guide explains how to list audit logs subscriptions using the Vultr API.
Send a GET request to the List Audit Logs Subscriptions endpoint to retrieve existing subscriptions.
$ curl "https://api.vultr.com/v2/logs/audit-logs" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
The response contains a subscriptions array. If no subscription exists yet, this array is empty. Otherwise, each entry includes the subscription's id, sub_status, storage_status, expiration_days, and current billing fields (retention_gb, ingestion_gb, charges, next_invoice_date).