Skip to content

Start a new VQL Query Profiler session. Only a single Profiler session can be active at a time.

POST/api/{version}/logs/query/profiler
NameDescription
Acceptapplication/json (default)
Content-Typeapplication/x-www-form-urlencoded

The following are filters you can use to define a Query Profiler session.

NameDescription
label requiredRequired label for the new session.
user_id optionalCaptures queries for a specific initiating user. If omitted, includes all user queries.
query_origin optionalCaptures queries coming from Vault API, Vault Java SDK, or both. Allowed values are api, sdk, all. If omitted, defaults to all.
query_targets optionalCaptures queries for up to 20 query targets provided in a comma-separated list. If omitted, all query targets are included.
result_count_min optionalCaptures queries with a minimum number of records returned. The minimum and default values are 0.
result_count_max optionalCaptures queries with a maximum number of records returned. The maximum and default values are the configured limit for the Vault.
query_time_min optionalCaptures queries with a minimum initial query execution time. If omitted, defaults to 0.
query_time_max optionalCaptures queries with a maximum initial query execution time in seconds. If omitted, defaults to 1200.
response_status optionalCaptures queries that have returned a specific response status. Allowed values are all, warn, error, success. If omitted, defaults to all.
description optionalSets a string description of the session. Maximum 255 characters.
curl -X POST -H "Authorization: {SESSION_ID}" \ -H "Content-Type: application/json" \ -d '{ "query_origin": "api", "response_status": "error", "description": "Troubleshooting session" }' \ https://{vault_dns}/api/v26.2/logs/query/profiler
{ "responseStatus": "SUCCESS", "data": { "id": "0LS000000002003", "name": "query_profiler__c" } }

The response includes the following metadata, including any filters:

Field NameDescription
idThe ID of the new session.
nameThe name of the new session.