Create Profiling Session
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.
/api/{version}/code/profilerHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/x-www-form-urlencoded |
Accept | application/json |
Body Parameters
Section link for Body Parameters| Name | Description |
|---|---|
labelrequired | The UI label for this request. |
user_idoptional | 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. |
descriptionoptional | An Admin-facing description of the session. |
Request
Section link for Requestcurl -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/v25.2/code/profilerResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": {
"id": "0LS000000003003",
"name": "hotfix_dry_run_01__c"
}
}Response Details
Section link for Response DetailsOn SUCCESS, Vault starts the profiling session immediately and returns the session id and name.