Logs provide detailed records of user actions across your account, capturing events such as logins, web portal interactions, and API requests. These logs offer valuable insight into account usage and help monitor security, track changes, and troubleshoot issues across your infrastructure.
Follow this guide to retrieve the activity of users for your Vultr account using the Vultr API.
Retrieve the API key for your Vultr account from the Vultr Customer Portal.
Send a GET
request to the List Logs endpoint.
$ curl "https://api.vultr.com/v2/logs?start_time=<START_TIME>&end_time=<END_TIME>&log_level=<LOG_LEVEL>&resource_type=<RESOURCE_TYPE>&resource_id=<RESOURCE_ID>" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY>}"
<START_TIME>
– e.g., 2025-07-17T00:00:00Z
<END_TIME>
– e.g., 2025-07-17T18:19:59Z
<LOG_LEVEL>
– One of: info
, debug
, warning
, error
, critical
<RESOURCE_TYPE>
– e.g., instances
, load-balancers
, kubernetes
, etc.<RESOURCE_ID>
– UUID of the specific resource.{VULTR_API_KEY}
– Your Vultr API key.The response output looks similar to the one below.
{
"logs": [
{
"resource_id": "xb671a46-66ed-4dfb-b839-543f2c6c0b63",
"resource_type": "instances",
"log_level": "debug",
"message": "Success",
"timestamp": "2025-06-26T16:45:06+00:00",
"metadata": {}
}
],
"meta": {
"continue_time": "2025-06-26T12:24:03Z",
"returned_count": 5000,
"unreturned_count": 3524,
"total_count": 8524
}
}
Visit the List Logs endpoint to learn more about the response and the query parameters.
start_time
and end_time
in your API request, ensure that the selected time range falls within this retention window. Requests outside this period may return no results. Currently, the max_query_series
limit is set to 5000, meaning a maximum of 5000 log entries can be returned per request, regardless of the specified date range.
No comments yet.