Initiate Delegated Session
Generate a delegated session ID. This allows you to call Vault API on behalf of a user who granted you delegate access. To find which users have granted you delegate access, Retrieve Delegations.
POST
/api/{version}/delegation/loginHeaders
Section link for Headers| Name | Description |
|---|---|
Authorization | The sessionId of the currently authenticated user who will initiate the delegated session. Cannot be a delegated_sessionid. |
Accept | application/json (default) or application/xml |
Body Parameters
Section link for Body Parameters| Name | Description |
|---|---|
vault_idrequired | The id value of the Vault to initiate the delegated session. |
delegator_useridrequired | The ID of the user who granted the authenticated user delegate access in this Vault. |
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
-d "vault_id=5791" \
-d "delegator_userid=67899" \
https://myvault.veevavault.com/api/v24.2/delegation/loginResponse
Section link for Response{
"responseStatus": "SUCCESS",
"delegated_sessionid": "1C8DBD593EDCEAD647E5E4C97A438F1F43A25C8679BB8431BDC789BC0BAAE76E0DC42D478721624765A2BA2E923852"
}Response Details
Section link for Response DetailsOn SUCCESS, Vault returns a delegated_sessionid. To execute Vault API calls with this delegated session, use this delegated_sessionid value as the Authorization header value.