tenantID
field in several cases which can be used to assign objects to the tenant on the 3rd-party system side, later to be used in filter criteria.https://VPROTECT_SERVER:PORT/api
. We'll assume that all endpoints are prefixed with the base URL it in the rest of this guide. In this guide we'll focus on the integration process, and skip actual requests and responses here and - please check API docs for details.NameAndGuid
to refer to other objects. GUID
is the ID that you can use later to get additional information about i.e. hypervisor or backup. For convenience, we provide name
to present it on the list views.NameAndGuid
in requests, you actually need to pass the object that has just GUID
provided.EnumNameAndDescription
with name
as enum name and description
to show it to the end-user in a more user-friendly way. Anywhere when you are required to use enums such as type, state, days of week etc. you need to use EnumNameAndDescription
object. In requests, you need to provide just name
.POST /session/login
endpoint. Save cookies so that you'll be able to invoke the next calls./virtual-machines
. This will retrieve all VMs visible by vProtect. GUID
is the ID that you should refer to when invoking any operation on the VM. UUID
is the ID that your infrastructure uses to identify objects./virtual-machines?tenantid={PROJECTID}
GET /virtual-machines/{guid}
. Some useful information includes assigned policies, protection status or last backup sizes and timestamps.POST /tasks/export
endpoint:windowStart
and windowEnd
- start and end of a time window for an export task - task will fail if it is not started within this time range; both values provided as UNIX time in millisecondspriority
- 0-100 - higher priority tasks are executed first; 50 by defaultbackupType
- FULL
or INCREMENTAL
; note that incremental backups are supported only for some platforms and they require at least one schedule of type incremental assigned to the policy that VM uses; if snapshot for incremental backup is not found, a full backup will be done insteadbackupDestination
- provided as NameAndGuid
- target where the backup is going to be storedprotectedEntities
- collection of NameAndGuid
referring to VMs that you want to backup - vProtect will create one export task for each referred VMGUID
to monitor later it's progress or status. A new backup
entry is going to be created automatically - you may also want to record this number if you want to present its details.GET /tasks
(retrieves all tasks) and filtering the results or monitoring a particular task by calling GET /tasks/{guid}
. There are also several useful query parameters that you can use to retrieve a filtered list:protectedEntity
- GUID of VM that you refer tobackup
- GUID of a backupschedule
- GUID of a schedule that invoked this taskstate
- task state as EnumNameAndDescription
: QUEUED
, RUNNING
, FINISHED
, FAILED
, CANCELLED
type
- task type as EnumNameAndDescription
: INDEX
, EXPORT
, STORE
, RESTORE
, OLD_BACKUPS_REMOVAL
, OLD_SNAPSHOTS_REMOVAL
, IMPORT
, MOUNT
, UNMOUNT
, DELETE
, SNAPSHOT
, SNAPSHOT_REVERSION
tenantId
- to filter out tasks only belonging to VMs owned by a particular tenantID (currently OpenStack only)GET /backups/?protected-entity={guid}
, where you provide guid
of your VM.restore
. However, you usually want the user to restore and import VM automatically to the virtualization platform or mount it for file-level restore.POST /tasks/restore-and-import
endpoint and provide:backup
- GUID of a backup to be restoredhypervisor
or hypervisorManager
- specify either one or the other - your target HV or HV manager depending on the virtualization platformrestoredPeName
- optional name of a restored VMrestoreStorageId
- some virtualization platforms require this to select storage to which VM has to be restored;restoreClusterId
- some virtualization platforms require this to select the cluster to which VM has to be restored;restoreProject
- some virtualization platforms require this to select a project to which VM has to be restoreddataCenter
- some virtualization platforms require this to select datacenter to which VM has to be restored; this is a DataCenterDTO
(currently having only name
property)tenantId
to be able later to use it when listing objects.GET /schedules
with optional query param tenantid
.POST /schedules
endpoint and provide the following information:name
- has to be globally unique, however you can handle uniqueness on your site or generate names if you don't need to present them to end-userbackupType
- EnumNameAndDescription
- type of backup to perform: FULL
or INCREMENTAL
type
- EnumNameAndDescription
- for VM backup it is VM_BACKUP
(other options are APP_BACKUP
and SNAPSHOT
); this type must match policy typeexecutionType
- EnumNameAndDescription
- schedules can be executed at given TIME
(based on hour
field) or on INTERVAL
basishour
- time when schedule should be invoked - it is time offset from UTC midnight in milliseconds, i.e. 3600 means 1:00 am UTCactive
- boolean flag to activate or deactivate schedulestartWindowLength
- used to assign window end to export tasks in milliseconds (which will be set to hour
+ startWindowLength
)daysOfWeek
- collection of EnumNameAndDescription
- days of week MONDAY
, ..., SUNDAY
when schedule needs to be runmonths
- collection of EnumNameAndDescription
- days of week JANUARY
, ..., DECEMBER
when schedule needs to be run; if empty - only during specified months schedule is executed dayOfWeekOccurrences
- collection of EnumNameAndDescription
- days of week occurrences FIRST_IN_MONTH
, SECOND_IN_MONTH
, THIRD_IN_MONTH
, FOURTH_IN_MONTH
, LAST_IN_MONTH
, when schedule needs to be run; if empty - only during first, ..., last occurrence of specified days of week schedule is executedrules
- collection of NameAndGuid
- policy rules to which assign schedule tointerval
- object containing startHour
, endHour
(time offset from UTC midnight in milliseconds) and frequency
(also in milliseconds) tenantId
- string identifying tenant to which assign the schedule - this is used only by 3rd party system to filter out listingGET /schedules/{guid}
.PUT /schedules/{guid}
endpoint and provide the same information as in the creation request.DELETE /schedules/{guid}
.GET /policies/vm-backup
with optional query param tenantid
.POST /policies/vm-backup
endpoint and provide the following information:name
- has to be globally unique, however you can handle uniqueness on your site or generate names if you don't need to present them to end-user* priority
- priority assigned to backup tasks (0-100)autoRemoveNonPresent
- boolean flag to automatically remove from policy non-existing VMsautoAssignSettings
- object specifying details for VM auto-assignment mechanism - not supported in multi-tenant environment; you need to set mode
variable of this object to DISABLED
vms
- collection of NameAndGuid
containing GUIDs of VMs to be assigned to the policytenantId
- string identifying tenant to which assign the policy - this is used only by 3rd party system to filter out listingPOST /rules/vm-backup
with the following information:name
- we recommend to generate it if not used by the userschedules
- collection of NameAndGuid
you want to be assigned to this policypolicy
- NameAndGuid
of a policy that you want this rule to be assigned to.GET /policies/vm-backup/{guid}
.PUT /policies/vm-backup/{guid}
endpoint and provide the same information as in the creation request. Keep in mind, that you may need to update rules as well. You can either use DELETE /rules/vm-backup/{guid}
and later POST /rules/vm-backup
and re-create the policy rule or use PUT /rules/vm-backup/{guid}
to update specific settings of a specific rule. GUID of a rule can be found in policy details (rules
field).DELETE /policies/vm-backup/{guid}
. Policy rules will be removed automatically.