Class SandboxRequest

java.lang.Object
com.veeva.vault.vapil.api.request.VaultRequest<SandboxRequest>
com.veeva.vault.vapil.api.request.SandboxRequest

public class SandboxRequest extends VaultRequest<SandboxRequest>
Sandbox Vaults
Vault API Coverage:
https://developer.veevavault.com/api/25.1/#sandbox-vaults
  • Constructor Details

    • SandboxRequest

      public SandboxRequest()
  • Method Details

    • retrieveSandboxes

      public SandboxResponse retrieveSandboxes()
      Retrieve Sandboxes

      Retrieve 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

      public SandboxDetailsResponse retrieveSandboxDetailsById(int vaultId)
      Retrieve Sandbox Details by ID

      Retrieve 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

      public VaultResponse recheckUsageLimit()
      Recheck Sandbox Usage Limit

      Recalculate 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

      public VaultResponse changeSandboxSize(String name, SandboxRequest.SandboxSize sandboxSize)
      Change Sandbox Size

      Change 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 sandbox
      sandboxSize - 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

      public SandboxEntitlementResponse retrieveSandboxEntitlements()
      Retrieve Sandbox Entitlements

      Retrieve 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 Entitlements

      Set 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 page
      type - 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

      public JobCreateResponse createOrRefreshSandbox(String type, String domain, String name)
      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

      public JobCreateResponse refreshSandboxFromSnapshot(int vaultId, String sourceSnapshot)
      Refresh a sandbox Vault in the currently authenticated Vault from an existing snapshot.
      Parameters:
      vaultId - The Vault ID of the sandbox to be refreshed
      sourceSnapshot - 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

      public VaultResponse deleteSandbox(String name)
      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 Snapshot

      Create a new sandbox snapshot for the indicated sandbox Vault.

      Parameters:
      sourceSandbox - The name of the sandbox Vault to take a snapshot of
      name - The name of the new snapshot
      description - The description of the new snapshot
      includeData - 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

      public SandboxSnapshotResponse retrieveSandboxSnapshots()
      Retrieve Sandbox Snapshots

      Retrieve 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

      public VaultResponse deleteSandboxSnapshot(String apiName)
      Delete Sandbox Snapshot

      Delete 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

      public JobCreateResponse updateSandboxSnapshot(String apiName)
      Update Sandbox Snapshot

      Recreate 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

      public JobCreateResponse upgradeSandboxSnapshot(String apiName)
      Upgrade Sandbox Snapshot

      Upgrade 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

      public JobCreateResponse buildProductionVault(String source)
      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

      public VaultResponse promoteToProduction(String name)
      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

      public SandboxRequest setAddRequester(Boolean addRequester)
      Set the AddRequester for createOrRefreshSandbox
      Parameters:
      addRequester - addRequester
      Returns:
      SandboxRequest
    • setRelease

      public SandboxRequest setRelease(SandboxRequest.ReleaseType release)
      Set the release type for createOrRefreshSandbox
      Parameters:
      release - release
      Returns:
      SandboxRequest
    • setSource

      public SandboxRequest setSource(SandboxRequest.SandboxSource source)
      Set the source to refresh the sandbox from for createOrRefreshSandbox
      Parameters:
      source - source
      Returns:
      SandboxRequest
    • setSourceSnapshot

      public SandboxRequest setSourceSnapshot(String sourceSnapshot)
      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