Create New Session
Start a new VQL Query Profiler session. Only a single Profiler session can be active at a time.
POST
/api/{version}/logs/query/profilerHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) |
Content-Type | application/x-www-form-urlencoded |
Body Parameters
Section link for Body ParametersThe following are filters you can use to define a Query Profiler session.
| Name | Description |
|---|---|
label required | Required label for the new session. |
user_id optional | Captures queries for a specific initiating user. If omitted, includes all user queries. |
query_origin optional | Captures queries coming from Vault API, Vault Java SDK, or both. Allowed values are api, sdk, all. If omitted, defaults to all. |
query_targets optional | Captures queries for up to 20 query targets provided in a comma-separated list. If omitted, all query targets are included. |
result_count_min optional | Captures queries with a minimum number of records returned. The minimum and default values are 0. |
result_count_max optional | Captures queries with a maximum number of records returned. The maximum and default values are the configured limit for the Vault. |
query_time_min optional | Captures queries with a minimum initial query execution time. If omitted, defaults to 0. |
query_time_max optional | Captures queries with a maximum initial query execution time in seconds. If omitted, defaults to 1200. |
response_status optional | Captures queries that have returned a specific response status. Allowed values are all, warn, error, success. If omitted, defaults to all. |
description optional | Sets a string description of the session. Maximum 255 characters. |
Request
Section link for Requestcurl -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/profilerResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": {
"id": "0LS000000002003",
"name": "query_profiler__c"
}
}Response Details
Section link for Response DetailsThe response includes the following metadata, including any filters:
| Field Name | Description |
|---|---|
id | The ID of the new session. |
name | The name of the new session. |