Zerto Virtual Replication APIs : Events API
  
Events API
/v1/events returns the last 1000 Zerto Virtual Replication 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.
URI
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}&siteName={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 w.here the API runs, for example, yyyy-mm-dd. You can also specify a local time with the following format: yyyy-mm-ddThh:mm:ss. 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. 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 Virtual Replication 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
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
41 or ChangeVraIpSettings
42 or PauseProtectionGroup
43 or ResumeProtectionGroup
44 or UpgradeZVM
45 or BulkUpgradeVras
46 or BulkUninstallVras
47 or AlertTurnedOn
48 or AlertTurnedOff
49 or ChangeVraPassword
 
 
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
 
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:
0 or VPG – The entity is a VPG.
1 or VRA – The entity is a VRA.
2 or Unknown – The entity is unknown.
3 or Site – The entity is the site.
 
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:
0 or All – All event types.
1 or Events – The event is not an alert event (not EV0056 nor EV0057).
2 or Alerts – The event is an alert event (EV0056 and EV0057).
 
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:
0 or All – All event types.
1 or Events – The event is not an alert event (not EV0056 nor EV0057).
2 or Alerts – The event is an alert event (EV0056 and EV0057).
 
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: https://zvm_ip:port/v1/session – POST Method
Format
Json, XML
Request Format
The request body is empty.
Json Response 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":true,
  "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",
      "identifier":"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:
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).
EventCompletedSuccessfully
Whether the event completed successfully or not.
EventIdentifier
The unique internal identifier of the event.
EventType
The type of event. Possible values are (Json/XML):
0/Unknown
1/CreateProtectionGroup
2/RemoveProtectionGroup
3/FailOver
4/FailOverTest
5/StopFailOverTest
6/Move
7/ProtectVM
8/UnprotectVM
9/InstallVra
 
10/UninstallVra
11/UpdateProtectionGroup
12/InsertTaggedCP
13/HandleMirrorPromotion
14/ActivateAllMirrors
15/LogCollection
16/ForceReconfigurationOfNewVM
17/ClearSite
18/ForceRemoveProtectionGroup
19/ForceUpdateProtectionGroup
 
20/ForceKillProtectionGroup
21/PrePostScript
22/InitFullSync
23/Pair
24/Unpair
25/InstallCloudConnector
26/UninstallCloudConnector
27/RedeployCloudConnector
28/ScriptExecutionFailure
29/SetAdvancedSiteSettings
 
30/Clone
31/KeepDisk
32/FailoverBeforeCommit
33/FailoverCommit
34/FailoverRollback
35/MoveBeforeCommit
36/MoveRollback
37/MoveCommit
38/MaintainHost
39/UpgradeVra
 
40/MoveProtectionGroupToManualOperationNeeded
41/ChangeVraIpSettings
42/PauseProtectionGroup
43/ResumeProtectionGroup
44/UpgradeZVM
45/BulkUpgradeVras
46/BulkUninstallVras
47/AlertTurnedOn
48/AlertTurnedOff
49/ChangeVraPassword
 
50/ChangeRecoveryHost
51/BackupProtectionGroup
52/CleanupProtectionGroupVipDiskbox
53/RestoreProtectionGroup
54/PreScript
55/PostScript
56/RemoveVmFromVc
57/ChangeVraPasswordIpSettings
58/FlrJournalMount
59/FlrJournalUnmount
60/Login
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 Perl Code Example: Retrieving the First 100 Records.
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
 
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
ProtectVM
UnprotectVM
InstallVra
UninstallVra
UpdateProtectionGroup
InsertTaggedCP
HandleMirrorPromotion
ActivateAllMirrors
LogCollection
ForceReconfigurationOfNewVM
ClearSite
ForceRemoveProtectionGroup
ForceUpdateProtectionGroup
ForceKillProtectionGroup
PrePostScript
InitFullSync
Pair
Unpair
InstallCloudConnector
UninstallCloudConnector
RedeployCloudConnector
ScriptExecutionFailure
SetAdvancedSiteSettings
Clone
KeepDisk
FailoverBeforeCommit
FailoverCommit
FailoverRollback
MoveBeforeCommit
MoveRollback
MoveCommit
MaintainHost
UpgradeVra
MoveProtectionGroupToManualOperationNeeded
ChangeVraIpSettings
PauseProtectionGroup
ResumeProtectionGroup
UpgradeZVM
BulkUpgradeVras
BulkUninstallVras
AlertTurnedOn
AlertTurnedOff
ChangeVraPassword
ChangeRecoveryHost
BackupProtectionGroup
CleanupProtectionGroupVipDiskbox
RestoreProtectionGroup
PreScript
PostScript
RemoveVmFromVc
ChangeVraPasswordIpSettings
FlrJournalMount
FlrJournalUnmount
Login