Skip to content

Create a new SDK request profiling session. Profiling sessions allow developers to troubleshoot custom code and improve code quality by analyzing results at the SDK request level.

Vault starts the profiling session immediately on creation. Profiling sessions run for either 20 minutes or up to 10,000 SDK requests, whichever comes first. To end a session early, use the End Profiling Session endpoint. Once ended, a session’s status is processing__sys while Vault prepares the data, which may take about 15 minutes. Once the status is complete__sys, the data is available for download with the Download Profiling Session Results endpoint.

Only one profiling session can be active at a time. Because sessions begin immediately on creation, you cannot create a new session until the current session becomes inactive. Additionally, each Vault can only retain profiling session data for up to 10 sessions. If your Vault already has 10 profiling sessions, you must Delete a Profiling Session before creating a new one.

POST/api/{version}/code/profiler
NameDescription
Content-Typeapplication/x-www-form-urlencoded
Acceptapplication/json
NameDescription
label
required
The UI label for this request.
user_id
optional
The user ID of the user to associate with this session. When specified, this SDK profiling session runs only for this user. If omitted, defaults to null which runs the session for all users.
description
optional
An Admin-facing description of the session.
curl -X POST -H "Authorization: {SESSION_ID}" \ -H "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "label=Integration User Dry Run" \ https://myvault.veevavault.com/api/v26.1/code/profiler
{ "responseStatus": "SUCCESS", "data": { "id": "0LS000000003003", "name": "hotfix_dry_run_01__c" } }

On SUCCESS, Vault starts the profiling session immediately and returns the session id and name.