Class SandboxRequest
- Vault API Coverage:
- https://developer.veevavault.com/api/25.1/#sandbox-vaults
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The type of release.static enum
The sandbox sizes.static enum
The source to refresh the sandbox from. -
Field Summary
Fields inherited from class com.veeva.vault.vapil.api.request.VaultRequest
HTTP_HEADER_AUTHORIZATION, HTTP_HEADER_REFERENCE_ID, HTTP_HEADER_VAULT_CLIENT_ID, referenceId, requestClientId, vaultClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildProductionVault
(String source) Given a built pre-production vault, promote it to a production vault.changeSandboxSize
(String name, SandboxRequest.SandboxSize sandboxSize) Change Sandbox SizecreateOrRefreshSandbox
(String type, String domain, String name) Create a new sandbox for the currently authenticated Vault.createSandboxSnapshot
(String sourceSandbox, String name, String description, Boolean includeData) Create Sandbox SnapshotdeleteSandbox
(String name) Delete a sandbox vault.deleteSandboxSnapshot
(String apiName) Delete Sandbox SnapshotpromoteToProduction
(String name) Given a pre-production vault, build a production vault.Recheck Sandbox Usage LimitrefreshSandboxFromSnapshot
(int vaultId, String sourceSnapshot) Refresh a sandbox Vault in the currently authenticated Vault from an existing snapshot.retrieveSandboxDetailsById
(int vaultId) Retrieve Sandbox Details by IDRetrieve Sandbox EntitlementsRetrieve SandboxesRetrieve Sandbox SnapshotssetAddRequester
(Boolean addRequester) Set the AddRequester for createOrRefreshSandboxsetRelease
(SandboxRequest.ReleaseType release) Set the release type for createOrRefreshSandboxsetSandboxEntitlements
(String name, String type, int allowance, boolean grant, int temporaryAllowance, SandboxRequest.SandboxSize size) Set Sandbox EntitlementsSet the size of the sandbox for createOrRefreshSandboxSet the source to refresh the sandbox from for createOrRefreshSandboxsetSourceSnapshot
(String sourceSnapshot) If the source is a snapshot, provide the api_name of the snapshot to create the sandbox from.updateSandboxSnapshot
(String apiName) Update Sandbox SnapshotupgradeSandboxSnapshot
(String apiName) Upgrade Sandbox SnapshotMethods inherited from class com.veeva.vault.vapil.api.request.VaultRequest
getBaseObjectMapper, send, send, sendReturnBinary, sendReturnBinary, sendToFile, sendToFile, setHeaderClientId, setHeaderReferenceId, setVaultClient
-
Constructor Details
-
SandboxRequest
public SandboxRequest()
-
-
Method Details
-
retrieveSandboxes
Retrieve SandboxesRetrieve information about the sandbox vaults for the authenticated vault.
- Returns:
- SandboxResponse
- Vault API Endpoint:
GET /api/{version}/objects/sandbox
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#retrieve-sandboxes
-
retrieveSandboxDetailsById
Retrieve Sandbox Details by IDRetrieve information about the sandbox for the given vault ID.
- Parameters:
vaultId
- vault id- Returns:
- SandboxDetailsResponse
- Vault API Endpoint:
GET /api/{version}/objects/sandbox/{vault_id}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#retrieve-sandbox-details-by-id
-
recheckUsageLimit
Recheck Sandbox Usage LimitRecalculate the usage values of the sandbox Vaults for the authenticated Vault. This action can be initiated up to three (3) times in a 24-hour period.
- Returns:
- VaultResponse
- Vault API Endpoint:
POST /api/{version}/objects/sandbox/actions/recheckusage
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#recheck-sandbox-usage-limit
-
changeSandboxSize
Change Sandbox SizeChange the size of a sandbox Vault for the authenticated Vault. You can initiate this action if there are sufficient allowances and the current sandbox meets the data and user limits of the requested size.
- Parameters:
name
- The name of the sandboxsandboxSize
- The sandbox size to be set- Returns:
- VaultResponse
- Vault API Endpoint:
POST /api/{version}/objects/sandbox/batch/changesize
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#change-sandbox-size
-
retrieveSandboxEntitlements
Retrieve Sandbox EntitlementsRetrieve the total number of available and number of in-use sandbox vaults for the authenticated vault.
- Returns:
- SandboxEntitlementResponse
- Vault API Endpoint:
GET /api/{version}/objects/sandbox_entitlements
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#retrieve-sandbox-entitlements
-
setSandboxEntitlements
public SandboxResponse setSandboxEntitlements(String name, String type, int allowance, boolean grant, int temporaryAllowance, SandboxRequest.SandboxSize size) Set Sandbox EntitlementsSet new sandbox entitlements, including granting and revoking allowances, for the given sandbox name.
- Parameters:
name
- The name of the sandbox vault, which appears on the My Vaults pagetype
- The type of sandbox. At this time, the only available type is config.allowance
- The number of entitlements to grant or revoke.grant
- Allowed values true and false. True grants allowances and false revokes them.temporaryAllowance
- The number of temporary sandbox allowances to grant or revoke.size
- size of the sandbox- Returns:
- SandboxResponse
- Vault API Endpoint:
POST /api/{version}/objects/sandbox/entitlements/set
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#set-sandbox-entitlements
-
createOrRefreshSandbox
Create a new sandbox for the currently authenticated Vault. Include the source_snapshot parameter in the request body to create a new sandbox from an existing snapshot. Providing a name which already exists will refresh the existing sandbox Vault. You can also refresh a sandbox from a snapshot.- Parameters:
type
- The type of sandbox, such as config.domain
- The domain to use for the new sandbox.name
- The name of the sandbox vault, which appears on the My Vaults page.- Returns:
- JobCreateResponse
- Vault API Endpoint:
POST /api/{version}/objects/sandbox
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#create-or-refresh-sandbox
-
refreshSandboxFromSnapshot
Refresh a sandbox Vault in the currently authenticated Vault from an existing snapshot.- Parameters:
vaultId
- The Vault ID of the sandbox to be refreshedsourceSnapshot
- The api_name of the snapshot to refresh the sandbox from- Returns:
- JobCreateResponse
- Vault API Endpoint:
POST /api/{version}/objects/sandbox/{vault_id}/actions/refresh
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#refresh-sandbox-from-snapshot
-
deleteSandbox
Delete a sandbox vault. Note that you cannot delete a sandbox which was created or refreshed within the last 24 hours.- Parameters:
name
- The name of the sandbox vault to delete. This is the name which appears on the My Vaults page- Returns:
- VaultResponse
- Vault API Endpoint:
DELETE /api/{version}/objects/sandbox/{name}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#delete-sandbox
-
createSandboxSnapshot
public JobCreateResponse createSandboxSnapshot(String sourceSandbox, String name, String description, Boolean includeData) Create Sandbox SnapshotCreate a new sandbox snapshot for the indicated sandbox Vault.
- Parameters:
sourceSandbox
- The name of the sandbox Vault to take a snapshot ofname
- The name of the new snapshotdescription
- The description of the new snapshotincludeData
- Set to true to include data as part of the snapshot. Set to false to include only configuration- Returns:
- JobCreateResponse
- Vault API Endpoint:
POST /api/{version}/objects/sandbox/snapshot
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#create-sandbox-snapshot
-
retrieveSandboxSnapshots
Retrieve Sandbox SnapshotsRetrieve information about sandbox snapshots managed by the authenticated Vault.
- Returns:
- SandboxSnapshotResponse
- Vault API Endpoint:
GET /api/{version}/objects/sandbox/snapshot
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#retrieve-sandbox-snapshots
-
deleteSandboxSnapshot
Delete Sandbox SnapshotDelete a sandbox snapshot managed by the authenticated Vault. Deleted snapshots cannot be recovered.
- Parameters:
apiName
- The API name of the sandbox snapshot to delete- Returns:
- VaultResponse
- Vault API Endpoint:
DELETE /api/{version}/objects/sandbox/snapshot/{api_name}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#delete-sandbox-snapshot
-
updateSandboxSnapshot
Update Sandbox SnapshotRecreate a sandbox snapshot for the same source sandbox Vault. This request replaces the existing snapshot with the newly created one.
- Parameters:
apiName
- The API name of the sandbox snapshot to update- Returns:
- JobCreateResponse
- Vault API Endpoint:
POST /api/{version}/objects/sandbox/snapshot/{api_name}/actions/update
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#update-sandbox-snapshot
-
upgradeSandboxSnapshot
Upgrade Sandbox SnapshotUpgrade a sandbox snapshot to match the release version of the source sandbox Vault. Your request to upgrade a snapshot is only valid if the upgrade_status=Upgrade Available or Upgrade Required.
- Parameters:
apiName
- The API name of the sandbox snapshot to upgrade- Returns:
- JobCreateResponse
- Vault API Endpoint:
POST /api/{version}/objects/sandbox/snapshot/{api_name}/actions/upgrade
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#upgrade-sandbox-snapshot
-
buildProductionVault
Given a built pre-production vault, promote it to a production vault. This is analogous to the Promote action in the Vault UI.- Parameters:
source
- the name of the source vault to build. This can be the current pre-production vault or a sandbox vault.- Returns:
- JobCreateResponse
- Vault API Endpoint:
POST /api/{version}/objects/sandbox/actions/buildproduction
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#build-production-vault
-
promoteToProduction
Given a pre-production vault, build a production vault. This is analogous to the Build action in the Vault UI. After building your vault, you can promote it to production.You can build or rebuild the source vault for a given pre-production vault no more than three times in a 24 hour period.
- Parameters:
name
- The name of the pre-production vault to promote.- Returns:
- VaultResponse
- Vault API Endpoint:
POST /api/{version}/objects/sandbox/actions/promoteproduction
- Vault API Help Link:
- https://developer.veevavault.com/api/25.1/#build-production-vault
-
setAddRequester
Set the AddRequester for createOrRefreshSandbox- Parameters:
addRequester
- addRequester- Returns:
- SandboxRequest
-
setRelease
Set the release type for createOrRefreshSandbox- Parameters:
release
- release- Returns:
- SandboxRequest
-
setSource
Set the source to refresh the sandbox from for createOrRefreshSandbox- Parameters:
source
- source- Returns:
- SandboxRequest
-
setSourceSnapshot
If the source is a snapshot, provide the api_name of the snapshot to create the sandbox from.- Parameters:
sourceSnapshot
- sourceSnapshot- Returns:
- SandboxRequest
-
setSize
Set the size of the sandbox for createOrRefreshSandbox- Parameters:
size
- size- Returns:
- SandboxRequest
-