Events API
Important: This document is being phased out and does not contain up-to-date information. For updated API documentation for Zerto versions 9.5 and later, see ZVM REST API - Swagger.
You can also access Swagger from the ZVM: click the menu button () on the top right and select APIs or navigate to https://<ZVM IP>:9669/swagger/index.html in a Windows ZVM or https://<ZVM IP>/management/api/swagger/index.html in ZVM Appliance.
/v1/events
returns the last 1000 Zerto events, with summary details about each event. You can use this API to see the results of operations such as cloning a VPG or testing a VPG.
For example, you can use this API to identify when a failover test was started and stopped, by looking for the FailOverTest and StopFailOverTest events and then using the timestamps for these events to see how long the VPG was tested.
URL
All events | https://zvm_ip:port/v1/events |
Filtered events | https://zvm_ip:port/v1/events?startDate={STARTDATE}&endDate={ENDDATE}&vpg={VPG}&vpgIdentifier={VPGIDENTIFIER}&eventType={EVENTTYPE}Steinmetz={SITENAME}&siteIdentifier={SITEIDENTIFIER}&zorgIdentifier={ZORGIDENTIFIER}&entityType={ENTITYTYPE}&userName={USERNAME}&category={CATEGORY}&eventCategory={CATEGORY}&alertIdentifier={ALERTIDENTIFIER} |
Single event | https://zvm_ip:port/v1/events/{eventId} |
Valid event categories | https://zvm_ip:port/v1/events/categories |
Valid event entities | https://zvm_ip:port/v1/events/entities |
Valid event types | https://zvm_ip:port/v1/events/types |
Where:
zvm_ip | The IP address of the Zerto Virtual Manager where the API is run. | |||||||||||||
port | The port to access the Zerto Virtual Manager. The default port is 9669. | |||||||||||||
eventId | The identifier of the event for which information is returned. | |||||||||||||
Filters | Filters are optional and any combination of filters is valid. When no filter is specified, all events are returned. Filters are not case-sensitive. | |||||||||||||
Filter |
Description |
|||||||||||||
startDate | The starting date for the list of events, supplied as a date with the format of the Zerto Virtual Manager where the API runs, for example, yyyy-mm-dd. You can also specify a local time with the following format: yyyy-mm-ddThh:mm:ss.fffZ. Adding Z to the end of the time sets the time to UTC. | |||||||||||||
endDate | The end date for the list, supplied as a date with the format of the Zerto Virtual Manager where the API runs, for example, yyyy-mm-dd. You can also specify a local time with the following format: yyyy-mm-ddThh:mm:ss.fffZ. Adding Z to the end of the time sets the time to UTC. | |||||||||||||
vpg, vpgIdentifier | The identifier of the VPG for which you want to return events. | |||||||||||||
eventType | The type of event. For the description of events, refer to the Zerto documentation about alerts and events. Possible values are: 0 or Unknown 1 or CreateProtectionGroup 2 or RemoveProtectionGroup 3 or FailOver 4 or FailOverTest 5 or StopFailOverTest 6 or Move 7 or ProtectVM 8 or UnprotectVM 9 or InstallVra |
|||||||||||||
10 or UninstallVra 11 or UpdateProtectionGroup 12 or InsertTaggedCP 13 or HandleMirrorPromotion 14 or ActivateAllMirrors 15 or LogCollection 16 or ForceReconfigurationOfNewVM 17 or ClearSite 18 or ForceRemoveProtectionGroup 19 or ForceUpdateProtectionGroup |
||||||||||||||
20 or ForceKillProtectionGroup 21 or PrePostScript: Deprecated 22 or InitFullSync 23 or Pair 24 or Unpair 25 or InstallCloudConnector 26 or UninstallCloudConnector 27 or RedeployCloudConnector 28 or ScriptExecutionFailure 29 or SetAdvancedSiteSettings |
||||||||||||||
30 or Clone 31 or KeepDisk 32 or FailoverBeforeCommit 33 or FailoverCommit 34 or FailoverRollback 35 or MoveBeforeCommit 36 or MoveRollback 37 or MoveCommit 38 or MaintainHost 39 or UpgradeVra |
||||||||||||||
40 or MoveProtectionGroupToManualOperationNeeded: Deprecated or ChangeVraIpSettings. Deprecated from pearl U2 by Leonid. Remove completely in 5.5 U1 42 or PauseProtectionGroup 43 or ResumeProtectionGroup 44 or UpgradeZVM: Deprecated 45 or BulkUpgradeVras 46 or BulkUninstallVras 47 or AlertTurnedOn 48 or AlertTurnedOff or ChangeVraPassword. Deprecated from pearl U2 by Leonid. Remove completely in 5.5 U1 |
||||||||||||||
50 or ChangeRecoveryHost 51 or BackupProtectionGroup 52 or CleanupProtectionGroupVipDiskbox 53 or RestoreProtectionGroup 54 or PreScript 55 or PostScript 56 or RemoveVmFromVc 57 or ChangeVraPasswordIpSettings 58 or FlrJournalMount 59 or FlrJournalUnmount 60 or Login 61 or StartVMsWithOrder 62 or HostEnteringMaintenanceMode 63 or HostExitingMaintenanceMode 64 or VmRestoredToSnapshot 65 or ProtectedVmRemovedFromHypervisor 66 or ProtectedVmAddedToHypervisor, 67 or PauseProtectionGroupForMissingVm: Deprecated. 68 or ResumeProtectionGroupAfterUserRemovedMissingVm 69 or ResumeProtectionGroupAfterVmReadded: Deprecated. 70 or Cloud 71 or StartingInstallerDownload 72 or DownloadingZertoInstaller 73 or StartingZvmUpgradeRemotely 74 or UpgradingZvmRemotely 75 or SplitCommit |
||||||||||||||
siteName | The name of the site. | |||||||||||||
siteIdentifier | The internal site identifier. | |||||||||||||
zorgIdentifier | The identifier of the ZORG, Zerto organization, defined in the Zerto Cloud Manager. | |||||||||||||
entityType | The type of entity to return. Possible values are:
|
|||||||||||||
userName | The name of the user for which the event occurred. If the event occurred as a result of a task started by the Zerto Virtual Manager, for example, when moving a VPG before the commit stage, the user is System. | |||||||||||||
category | The type of event to return. This filter behaves in the same way as the eventCategory filter. Possible values are:
|
|||||||||||||
eventCategory | Backwards compatibility. This filter behaves in the same way as the category filter. If both category and eventCategory filters are specified, only the category filter value is used and the eventCategory filter value is ignored. The type of event to return. Possible values are:
|
|||||||||||||
alertIdentifier | The internal alert identifier. |
HTTP Method
GET
Security
The API is exposed over HTTPS. Client code must use the x-zerto-session HTTP authorization header.
See Also
Starting a session: Session: POST
Format
Json, XML
Request Body Using Json Format
The request body is empty.
Response In Json Format
The following is an example response Json body for https://zvm_ip:port/v1/events and for https://zvm_ip:port/v1/events/{eventId}.
[{
"Description": "String content",
"EntityType":0,
"EventCategory": "String content",
"EventCompletedSuccessfully": Boolean,
"EventIdentifier": "String content",
"EventType":0,
"HelpLink": "String content",
"Link": {
"href": "String content",
"identifier": "String content",
"rel": "String content",
"type": "String content"
},
"Link__x007B_0_x007D_": {
"href": "String content",
"rel": "String content",
"type": "String content"
},
"OccurredOn":"\/Date(928142400000+0300)\/",
"RelatedEntities": {
"Alerts":[{
"href": "String content",
"ma": "String content",
"rel": "String content",
"type": "String content"
}],
"FlrSessions":[{
"href": "String content",
"identifier": "String content",
"rel": "String content",
"type": "String content"
}]
"Hosts":[{
"href": "String content",
"identifier": "String content",`
"rel": "String content",
"type": "String content"
}],
"Sites":[{
"href": "String content",
"identifier": "String content",
"rel": "String content",
"type": "String content"
}],
"Vpgs":[{
"href": "String content",
"identifier": "String content",
"rel": "String content",
"type": "String content"
}],
"Zorgs":[{
"href": "String content",
"identifier": "String content",
"rel": "String content",
"type": "String content"
}]
},
"SiteIdentifier": "String content",
"SiteName": "String content",
"UserName": "String content",
"Vpgs":[{
"Link__x007B_0_x007D_": {
"href": "String content",
"rel": "String content",
"type": "String content"
},
"VpgIdentifier": "String content",
"VpgName": "String content"
}],
"ZorgIdentifier": "String content",
"ZorgName": "String content"
}]
The following is an example response Json body for https://zvm_ip:port/v1/events/categories, https://zvm_ip:port/v1/events/entities, and https://zvm_ip:port/v1/events/types.
["String content"]
XML Response Format
For the XML response format, see Events API XML Response Format.
Response Values
Response values for https://zvm_ip:port/v1/events and for https://zvm_ip:port/v1/events/{eventId}.
Parameter | Description |
---|---|
Description | A description of the event. |
EntityType | The type of entity. Possible values are (Json/XML): 0/VPG: The entity is a VPG. 1/VRA: The entity is a VRA. 2/Unknown: The entity is unknown. 3/Site: The entity is the site. |
EventCategory | The type of event. Possible values are: 0/All: All event types. 1/Events: The event is not an alert event (not EV0056 nor EV0057). 2/Alerts: The event is an alert event (EV0056 and EV0057). |
EventCompletedSuccessfully | |
EventIdentifier | The unique internal identifier of the event. |
EventType | 1/Unknown
2/CreateProtectionGroup 3/RemoveProtectionGroup 4/FailOver 5/FailOverTest 6/StopFailOverTest 7/Move 8/ProtectVM 9/UnprotectVM 10/InstallVra |
11/UninstallVra
12/UpdateProtectionGroup 13/InsertTaggedCP 14/HandleMirrorPromotion 15/ActivateAllMirrors 16/LogCollection 17/ForceReconfigurationOfNewVM 18/ClearSite 19/ForceRemoveProtectionGroup 20/ForceUpdateProtectionGroup |
|
21/ForceKillProtectionGroup
22/PrePostScript: Deprecated 23/InitFullSync 24/Pair 25/Unpair 26/InstallCloudConnector 27/UninstallCloudConnector 28/RedeployCloudConnector 29/ScriptExecutionFailure30/SetAdvancedSiteSettings |
|
31/Clone
32/KeepDisk 33/FailoverBeforeCommit 34/FailoverCommit 35/FailoverRollback 36/MoveBeforeCommit 37/MoveRollback 38/MoveCommit 39/MaintainHost 40/UpgradeVra |
|
41/MoveProtectionGroupToManualOperationNeeded: Deprecated
42/ChangeVraIpSettings: Deprecated 43/PauseProtectionGroup 44/ResumeProtectionGroup 45/UpgradeZVM: Deprecated 46/BulkUpgradeVras 47/BulkUninstallVras 48/AlertTurnedOn 49/AlertTurnedOff |
|
51/ChangeRecoveryHost
52/BackupProtectionGroup 53/CleanupProtectionGroupVipDiskbox 54/RestoreProtectionGroup 55/PreScript 56/PostScript 57/RemoveVmFromVc 58/ChangeVraPasswordIpSettings 59/FlrJournalMount 60/FlrJournalUnmount 61/Login 62/HostEnteringMaintenanceMode 63/HostExitingMaintenanceMode 64/VmRestoredToSnapshot 65/ProtectedVmRemovedFromHypervisor 66/ProtectedVmAddedToHypervisor, 67/PauseProtectionGroupForMissingVm: Deprecated 68/ResumeProtectionGroupAfterUserRemovedMissingVm 69/ResumeProtectionGroupAfterVmReadded: Deprecated 70/Cloud 71/StartingInstallerDownload 72/DownloadingZertoInstaller 73/StartingZvmUpgradeRemotely 74/UpgradingZvmRemotely 75/SplitCommit |
|
HelpLink | The link to additional information about the event. |
Link | The link details. |
href |
The URL used. |
identifier |
The unique internal identifier of the event. |
rel |
The next path level for the API relative to the current path. |
type |
The API interface service. |
OccurredOn | The date the event occurred. The value can be converted to an understandable date using code similar to the following: var date = new Date(jsonDate); or code similar to the Perl code example, jsonDateToString($), in Managing vCD APIs. |
RelatedEntities | Entities possibly affected by the event. |
Alerts |
The alerts affected by the event. |
href |
The URL used to retrieve alert information. |
identifier |
The unique internal identifier of the alert. |
rel |
The next path level for the API relative to the current path. |
type |
The API interface service. |
FlrSessions |
The file level restore sessions affected by the event. |
href |
The URL used to retrieve file level restore session information. |
identifier |
The unique internal identifier of the file level restore session. |
rel |
The next path level for the API relative to the current path. |
type |
The API interface service. |
Hosts |
The hosts affected by the event. |
href |
The URL used to retrieve host information. |
identifier |
The unique internal identifier of the host. |
rel |
The next path level for the API relative to the current path. |
type |
The API interface service. |
Sites |
The sites affected by the event. |
href |
The URL used to retrieve site information. |
identifier |
The unique internal identifier of the site where the API runs. |
rel |
The next path level for the API relative to the current path. |
type |
The API interface service. |
Vpgs |
The VPGs affected by the event. |
href |
The URL used to retrieve VPG information for each VPG affected by the event. |
identifier |
The unique internal identifier of the VPG. |
rel |
The next path level for the API relative to the current path. |
type |
The API interface service. |
Zorgs |
The ZORGS affected by the event. |
href |
The URL used to retrieve ZORG information. |
identifier |
The unique internal identifier of the ZORG. |
rel |
The next path level for the API relative to the current path. |
type |
The API interface service. |
SiteIdentifier | The internal site identifier. |
SiteName | The name of the site where the event occurred. |
UserName | The username responsible for the event, system or an administrator user. |
Vpgs |
The VPGs affected by the event. |
Link |
The link to the specific VPG. |
href |
The URL used to retrieve VPG information for each VPG affected by the event. |
rel |
The next path level for the API relative to the current path. |
type |
The API interface service. |
VpgIdentifier |
The internal VPG identifier. |
VpgName |
The name of the VPG. |
ZorgIdentifier | The identifier of the ZORG, Zerto organization, defined in the Zerto Cloud Manager. |
ZorgName | The name of the Zerto organization, defined by a Zerto Cloud Manager, where the event occurred. |
Response values for https://zvm_ip:port/v1/events/categories.
Response: Description |
---|
Event categories: All: All event types. Events: The event is not an alert event (not EV0056 nor EV0057). Alerts: The event is an alert event (EV0056 and EV0057). |
Response values for https://zvm_ip:port/v1/events/entities.
Response: Description |
---|
Entity types: VPG: The entity is a VPG. VRA: The entity is a VRA. Unknown: The entity is unknown. Site: The entity is the site. |
Response values for https://zvm_ip:port/v1/events/types.
Response: Description |
---|
Event types: Unknown CreateProtectionGroup RemoveProtectionGroup FailOver FailOverTest StopFailOverTest Move ProtectVMUnprotectVM |
InstallVra
UninstallVra UpdateProtectionGroup InsertTaggedCP HandleMirrorPromotion ActivateAllMirrors LogCollection ForceReconfigurationOfNewVM ClearSite ForceRemoveProtectionGroup ForceUpdateProtectionGroup ForceKillProtectionGroup |
PrePostScript: Deprecated
InitFullSync Pair Unpair InstallCloudConnector UninstallCloudConnector RedeployCloudConnector ScriptExecutionFailure SetAdvancedSiteSettings |
Clone
KeepDisk FailoverBeforeCommit FailoverCommit FailoverRollback MoveBeforeCommit MoveRollback MoveCommit MaintainHostUpgradeVra |
MoveProtectionGroupToManualOperationNeeded: Deprecated
ChangeVraIpSettings: Deprecated PauseProtectionGroup ResumeProtectionGroup UpgradeZVM: Deprecated BulkUpgradeVras BulkUninstallVras AlertTurnedOn AlertTurnedOff |
ChangeRecoveryHost BackupProtectionGroup CleanupProtectionGroupVipDiskbox RestoreProtectionGroup PreScript PostScript RemoveVmFromVc ChangeVraPasswordIpSettings FlrJournalMount FlrJournalUnmount Login HostEnteringMaintenanceMode HostExitingMaintenanceMode VmRestoredToSnapshot ProtectedVmRemovedFromHypervisor ProtectedVmAddedToHypervisor, PauseProtectionGroupForMissingVm: Deprecated ResumeProtectionGroupAfterUserRemovedMissingVm ResumeProtectionGroupAfterVmReadded: Deprecated |
PowerShell Scripts
For complete PowerShell Scripts, see Examples.