using the actifio resiliency director restful apis · 2015-11-24 · 2 using the actifio resiliency...
TRANSCRIPT
Using the Actifio Resiliency Director RESTful APIs
Using the Actifio Resiliency Director RESTful APIs
Contact Actifio Support
As an Actifio customer, you can get support for all Actifio products through the Support Portal at http://support.actifio.com/.
Copyright, Trademarks, and other Legal Matter
© 2015 Actifio, Inc. All rights reserved.
Actifio®, AnyIT®, Dedup Async®, and VDP® are registered trademarks of Actifio, Inc. Manage Data Simply™, Virtual Data Pipeline™, Protection and Availability Storage Platform™, PAS™, Copy Data Storage Platform™, CDS™, and Actifio Sky™ are trademarks of Actifio, Inc. All other brands and product names for goods and/or services mentioned herein are trademarks or property of their respective owners.
Actifio believes the information in this publication is accurate as of its publication date. Actifio reserves the right to make changes to information published in this document, including without limitation specifications and product descriptions, at any time and without notice. This document supersedes and replaces all information supplied prior to the publication hereof.
THE INFORMATION IN THIS PUBLICATION IS PROVIDED “AS IS.” ACTIFIO, INC. MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WITH RESPECT TO THE INFORMATION IN THIS PUBLICATION, AND SPECIFICALLY DISCLAIMS IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
This software and the associated documentation are proprietary and confidential to Actifio. Use, copying, and distribution of any Actifio software described in this publication requires an applicable software license. Any unauthorized use or reproduction of this software and the documentation may be subject to civil and/or criminal liability.
Actifio strives to produce quality documentation and welcomes your feedback. Please send comments and suggestions to [email protected].
Rev. Using the Actifio Resiliency Director RESTful APIs
ii | actifio.com |Using the Actifio Resiliency Director RESTful APIs
Contents
Using the Resiliency Director RESTful APIs.............................................................................. 1
Actifio Resiliency Director RESTful APIs .................................................................................. 2
Configuring the Actifio Resiliency Director - IRestConfig...............................................................................................3
configureRd ..................................................................................................................................................................3
Accessing the Actifio Resiliency Director - IRestLogin ...................................................................................................4
authenticateOSUser .....................................................................................................................................................4
RDDetails .....................................................................................................................................................................4
ServerIdentity ...............................................................................................................................................................4
version ..........................................................................................................................................................................5
logout ...........................................................................................................................................................................5
Managing the Actifio Appliances - IRestStorageServer .................................................................................................6
addStorageServer .........................................................................................................................................................6
fetchEmailServerConfig ................................................................................................................................................6
fetchStorageServers .....................................................................................................................................................7
updateStorageServer ....................................................................................................................................................7
removeStorageServer ..................................................................................................................................................8
Managing Virtual Management Servers - IRestServer ...................................................................................................9
createServer .................................................................................................................................................................9
getServers ....................................................................................................................................................................9
updateServer ..............................................................................................................................................................10
deleteServer ...............................................................................................................................................................11
Managing the Actifio Resiliency Director Server - IRestArmServer ............................................................................12
getArmServers ...........................................................................................................................................................12
createArmServer ........................................................................................................................................................12
updateArmServer .......................................................................................................................................................13
deleteArmServer ........................................................................................................................................................13
getArmServersOfCustomers ......................................................................................................................................14
unRegisterRdDirector .................................................................................................................................................14
updateVersionFlagOnRDServer ..................................................................................................................................15
Managing Application Groups - IRestAppGroup ..........................................................................................................16
fetchMembersForNewApplicationGroup ...................................................................................................................16
fetchVMDetailsFor .....................................................................................................................................................17
fetchVMDetailsForEdit ...............................................................................................................................................19
getApplicationGroupVMCount ....................................................................................................................................19
| actifio.com | Actifio Resiliency Director Server iii
createAppGroup ......................................................................................................................................................... 21
getAppGroups ............................................................................................................................................................ 21
removeAppGroup ....................................................................................................................................................... 22
getVirtualMachines .................................................................................................................................................... 23
fetchVMAndVappsForAppGroup ................................................................................................................................ 23
updateAppGroup ........................................................................................................................................................ 24
fetchAppGroupDetailsWithVms ................................................................................................................................. 25
fetchCount ................................................................................................................................................................. 26
getPreDefinedDelay ................................................................................................................................................... 26
updatePeerAppGroupCount ....................................................................................................................................... 26
cancelAppGrpCreation ............................................................................................................................................... 27
updatePeerRecoveryPlanId ........................................................................................................................................ 27
Managing Customers - IRestArmCustomer .................................................................................................................. 28
getCustomers ............................................................................................................................................................ 28
addCustomer .............................................................................................................................................................. 28
updateCustomer ........................................................................................................................................................ 29
removeCustomer ....................................................................................................................................................... 29
Managing Recovery Plans - IRestRecoveryPlan ............................................................................................................ 30
getRecoveryPlans ...................................................................................................................................................... 30
createRecoveryPlan ................................................................................................................................................... 31
updateRecoveryPlan .................................................................................................................................................. 32
deleteRecoveryPlans .................................................................................................................................................. 33
getRecoveryPlanAppGroup ........................................................................................................................................ 33
getAppGroupFromPrimary ......................................................................................................................................... 33
getAppGroupWithNewSequence ............................................................................................................................... 34
getRecoveryPlanResourcePools ................................................................................................................................ 35
executeRecoveryPlan ................................................................................................................................................. 36
getRecoveryplanState ................................................................................................................................................ 36
getAppGroupForEdit .................................................................................................................................................. 37
getAllStatesForRecoveryPlan ..................................................................................................................................... 38
getRecoveryPlanState ................................................................................................................................................ 38
resetRecoveryPlanState ............................................................................................................................................. 39
getRecoveryPlanCountGroupByState ........................................................................................................................ 39
getRecoveryPlanSchedule ......................................................................................................................................... 40
getRecoveryPlanStatesForGivenIds ........................................................................................................................... 40
invalidateRecoveryPlan .............................................................................................................................................. 41
getPortGroupsForRecoveryPlan ................................................................................................................................. 41
fetchDedupeAsycStatus ............................................................................................................................................ 42
fetchRecoveryPlansByDeDupeAsyncStatus .............................................................................................................. 42
canelRecoveryPlanExecution ..................................................................................................................................... 43
disableRecoveryPlan .................................................................................................................................................. 43
getFetchInvalidRecoveryPlanNotification ................................................................................................................... 43
executeSingleVMRecovery ........................................................................................................................................ 44
fetchVmExecutionStatus ............................................................................................................................................ 44
executeSingleScript ................................................................................................................................................... 45
iv | actifio.com |Actifio Resiliency Director Server
fetchVMForInvalidRecoveryPlan ................................................................................................................................45
Managing Alerts - IRestAlerts .........................................................................................................................................47
getAlerts .....................................................................................................................................................................47
getLatestAlerts ...........................................................................................................................................................48
Viewing Logs - IRestLogs ................................................................................................................................................49
fetchCDSLogs ............................................................................................................................................................49
getBRDLogFile ...........................................................................................................................................................49
Generating Reports - IRestReport ...................................................................................................................................50
getReadinessReport ...................................................................................................................................................50
getRecoveryPlanReport ..............................................................................................................................................50
getResourceUsage .....................................................................................................................................................51
getRecoveyPlansByCustomer ....................................................................................................................................51
fetchLoginAuditReport ...............................................................................................................................................52
fetchVMLevelDetailReport .........................................................................................................................................53
Fetching Client Properties - IRestClientProperties .........................................................................................................54
getIntervalProperties ..................................................................................................................................................54
Managing Files - IRestFileManager ................................................................................................................................55
deleteFileOnServer .....................................................................................................................................................55
deleteScriptsByIds .....................................................................................................................................................55
fetchFileListOnServer .................................................................................................................................................56
uploadFile ...................................................................................................................................................................56
getSupportedExternalScript .......................................................................................................................................57
updateScriptHostData ................................................................................................................................................57
Managing Host Information - IRestRemoteHost............................................................................................................58
fetchRemoteHosts .....................................................................................................................................................58
addRemoteHost .........................................................................................................................................................58
updateRemoteHost ....................................................................................................................................................59
deleteRemoteHostsByIds ..........................................................................................................................................59
IRestUpgrade....................................................................................................................................................................60
fetchNicNamesByUUIDFromCollector .......................................................................................................................60
addNicNamesForVMOnRdServer ...............................................................................................................................61
Downloading Help - IRestHelpFileDownload.................................................................................................................62
getHelpFile .................................................................................................................................................................62
Appendix A: JavaScript Example .............................................................................................63
Appendix B: Java Example........................................................................................................68
| actifio.com | Actifio Resiliency Director Server v
vi | actifio.com |Actifio Resiliency Director Server
Using the Actifio Resiliency Director RESTful APIs
The Actifio Resiliency Director RESTful APIs work with JSON data. The Actifio Resiliency Director has defined its own error code and error messages in the response JSON. Any additional information is included in the body of the return call, JSON-formatted.
Using the Resiliency Director RESTful APIsBefore executing any commands you must open a session by logging into the Actifio Resiliency Director. Login returns a session ID that you need for all subsequent commands. REST APIs issued to the Actifio Resiliency Director are authenticated with a session ID. The session ID is unique for every session and is valid till a configurable time interval.
The Actifio Resiliency Director RESTful APIs require all communications to be in SSL (HTTPS) and UTF-8 encoded. The Actifio Resiliency Director RESTful APIs use network port 443 for connectivity which is configurable.
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 1
2
Actifio Resiliency Director RESTful APIs
The Actifio Resiliency Director Server/Collector RESTful APIs are classified into different categories based on the functionality. Each interface contains respective APIs. Following are the functionality based interfaces for Actifio Resiliency Director Server/Collector:
Configuring the Actifio Resiliency Director - IRestConfig on page 3
Accessing the Actifio Resiliency Director - IRestLogin on page 4
Managing the Actifio Appliances - IRestStorageServer on page 6
Managing Virtual Management Servers - IRestServer on page 9
Managing the Actifio Resiliency Director Server - IRestArmServer on page 12
Managing Application Groups - IRestAppGroup on page 16
Managing Customers - IRestArmCustomer on page 28
Managing Recovery Plans - IRestRecoveryPlan on page 30
Managing Alerts - IRestAlerts on page 47
Viewing Logs - IRestLogs on page 49
Generating Reports - IRestReport on page 50
Fetching Client Properties - IRestClientProperties on page 54
Managing Files - IRestFileManager on page 55
Managing Host Information - IRestRemoteHost on page 58
IRestUpgrade on page 60
Downloading Help - IRestHelpFileDownload on page 62
| actifio.com |Using the Actifio Resiliency Director RESTful APIs
Configuring the Actifio Resiliency Director - IRestConfig
This interface and corresponding RESTful API allows you to configure the Resiliency Director as Resiliency Director Collector, or Resiliency Director Server. This interface contains the following RESTful API:
configureRd
Note: {HOST} in the URL implies hostname for Resiliency Director Server or Resiliency Director Collector depending on the deployment.
configureRd
Use this API to configure the Actifio Resiliency Director before it is functional.
Method - POST
Requesthttps://{HOST}/arm/api/config/config
Body param { "rdIp": "172.29.11.111", "rdName":"rd.actifio.com", "dns":"172.29.11.151", "netmask": "255.255.255.0", "gateway": "172.29.10.100", "rdType": "Collector" }
Response{status=success, statusCode=1000, statusMessage=Operation performed successfully.}
configParams Configuration details for the Actifio Resiliency Director deployment.
Parameters Configuration
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 3
4
Accessing the Actifio Resiliency Director - IRestLogin
This interface and its corresponding RESTful APIs allow you to validate the login details, server identity, Resiliency Director version, and end the active session. This interface contains the following RESTful APIs:
authenticateOSUser
RDDetails
ServerIdentity
version
logout
authenticateOSUser
Use this API to authenticate Resiliency Director user for login.
Method - POST
Requesthttps://{HOST}/arm/api/login
Body param { "username": "admin", "password": "password" }
Response{ "status": "success", "statusCode": "1008", "statusMessage": "Login successful.", "responseData": { "sessionid"="6c3ce804-b488-4f75-9288-4879eb9c772f", "username"="admin", "timestampLong"=0 "uniqueid":0 }
}
loginParams Login details
RDDetails
Use this method to get the Resiliency Director details.
Method - GET
Requesthttps://{HOST}/arm/api/rddetails
Response{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully" "responseData": { "installedVersion" : "{\"major\":\"6.1\",\"minor\":\"2\",\"createdAt\":\"04/14/2015 11:48\",\"svnRevision\":\"314\",\"sprintNumber\":\"5\",\"patchNumber\":\"0\"}", "rduuid" : "ee280065-24a9-488a-887a-72adec2da60e" } }
ServerIdentity
Use this API to get the server identity.
Method - GET
Requesthttps://{HOST}:{PORT}/arm/api/serveridentity
Response{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully" "responseData": [ { "serverIdentity": primary/secondary, } ] }
Parameters Description
| actifio.com |Using the Actifio Resiliency Director RESTful APIs
version
Use this API to get the version number of the Actifio Resiliency Director.
Method - GET
Requesthttps://{HOST}:{PORT}/arm/api/version
Response{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully" "responseData": { "major": "1.0", "minor": "5.0", "createdAt": "01/13/2015 20:12", "svnRevision": "2056" } }
logout
Use this API to logout from the session. The server exception is thrown (com.actifio.asrv.share.ArmServerException), when session id provided in parameter is not found in the session pool.
Method - GET
Requesthttps://{HOST}:{PORT}/arm/api/logout?sessionid=1234
Response{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully" "responseData":"" }
sessionid Session Id as a header parameter for which session should be logged-out.
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 5
6
Managing the Actifio Appliances - IRestStorageServer
This interface and its corresponding RESTful APIs allow you to add, list, edit, and delete the Actifio appliances used by the Actifio Resiliency Director. This interface contains the following RESTful APIs:
addStorageServer
fetchEmailServerConfig
fetchStorageServers
updateStorageServer
removeStorageServer
addStorageServer
Use this API to add an Actifio appliance in the Resiliency Director database with the parameters provided in the request.
Method - POST
Request
https://{HOST}:{PORT}/arm/api/cds/add (HTTPS)
Body param { "hostOrIp": "xyz.actfio.com", "username": "root", "password": "Password", "port": 96, "useHttps": false, "firmwareVersion": "1.2.0", "model": "Lorem‐Ipsum‐Lorem" }
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
sessionid Session Id as a header parameter.
storageServerToAdd Actifio appliance that you want to add in the Resiliency Director database.
fetchEmailServerConfig
Use this API to configure the email notification settings for the required Actifio appliance.
Method: GET
Request:
https://{HOST}/arm/api/cds/getemailserverconfig (HTTPS)
Body param { "id": 1, "hostOrIp": "lorem.com", "username": "admin", "password": "Password", "port": 6969, "useHttps": false, "firmwareVersion": "2.1.1", "model": "Lorem‐ipsum‐dolor", "isEmailConfigured":false }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
Parameters Description
| actifio.com |Using the Actifio Resiliency Director RESTful APIs
storageServerData Actifio appliance for which you want to fetch email server configuration.
sessionid Session Id as a header and body parameters.
fetchStorageServers
Use this API to list the available Actifio appliance(s) in the Resiliency Director database. If the method parameter is null, the method returns all the Actifio Appliances from the database. If the method parameter is not null, the method returns only the Actifio appliance(s) whose id(s) are provided as an input.
Method - GET
Request
https://{HOST}:{PORT}/arm/api/cds/fetch ‐ To fetch all storage servers from database (HTTPS).
https://{HOST}:{PORT}/arm/api/cds/fetch?ids=1,2,3 ‐ To fetch storage servers by id(s) (HTTPS).
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ { "id": 1, "hostOrIp": "xyz.actifio.com", "username": "admin", "password": "Password", "port": 96, "useHttps": false, "firmwareVersion": "1.0", "model": "Lorem‐Ipsum" } ] }
storageServerIdsToFetch Comma separated Actifio appliance id(s) for which you want to fetch the data.
sessionid Session Id as a header parameter.
updateStorageServer
Use this API to edit an existing Actifio appliance details with the parameters provided in the request.
Method - POST
Request
https://{HOST}:{PORT}/arm/api/cds/update (HTTPS)
Body param { "id": 1, "hostOrIp": "lorem.com", "username": "admin", "password": "Password", "port": 6969, "useHttps": false, "firmwareVersion": "2.1.1", "model": "Lorem‐ipsum‐dolor" }
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 7
8
storageServerToUpdate Body parameters of the Actifio appliance that you want to update in the Resiliency Director database.
sessionid Session Id as a header parameter.
removeStorageServer
Use this API to delete the Actifio appliance from the database with the parameters provided in the request.
Method - GET
Request
https://{HOST}:{PORT}/arm/api/cds/remove?ids=1,2,3 (HTTPS)
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
storageServerIdsForDelete Comma separated id(s) of the Actifio appliance(s) that you want to delete.
Parameters Description
Parameters Description
| actifio.com |Using the Actifio Resiliency Director RESTful APIs
Managing Virtual Management Servers - IRestServer
This interface and its corresponding RESTful APIs allow you to add, list, edit, and delete the virtual management server used by the Actifio Resiliency Director. This interface contains the following RESTful APIs:
createServer
getServers
updateServer
deleteServer
createServer
Use this API to add a virtual management server in Resiliency Director database with the parameters provided in the request.
Method - POST
Request
https://{HOST}/arm/api/server/add (HTTPS)
Body param { "hostOrIp": "172.29.12.84", "username": "admin", "password": "Password", "port": 26, "release": "1.0.0", "deploymentPlatform": "vmware", "noOfRecoverPlan": 0, "discovered": true }
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
serverToAdd Body parameters of a virtual management server that you want to add in the Resiliency Director database.
getServers
Use this API to list the available virtual management servers in the Resiliency Director database. If the method parameter is null, the method returns all the available virtual management servers from database. If the method parameter is not null, the method returns only the virtual management server(s) whose id(s) are provided as an input.
Method - GET
Request
https://{HOST}:{PORT}/arm/api/server/fetch ‐ To fetch all servers from database (HTTPS).
https://{HOST}:{PORT}/arm/api/server/fetch?ids=1,2,3 ‐ To fetch servers by id(s) (HTTPS).
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ { "id": 1, "hostOrIp": "vcenter.actifio.com", "username": "admin", "password": "Password", "port": 26, "release": "1.0.0", "deploymentPlatform": "vmware", "noOfRecoverPlan": 0, "discovered": true } ] }
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 9
10
ids Comma separated virtual management server id(s) for which you want to fetch the data.
updateServer
Use this API to edit an existing virtual management server details in the Resiliency Director database with the parameters provided in the request.
Method - POST
Request
https://{HOST}:{PORT}/arm/api/server/update (HTTPS)
Body param { "id": 1, "hostOrIp": "172.29.12.84", "username": "admin", "password": "Password", "port": 26, "release": "1.0.0", "deploymentPlatform": "vmware", "noOfRecoverPlan": 0, "discovered": true }
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
serversToUpdate Body parameters of the virtual management server that you want to update in the Resiliency Director database.
Parameters Description
Parameters Description
| actifio.com |Using the Actifio Resiliency Director RESTful APIs
deleteServer
Use this API to delete the virtual management server from the Resiliency Director database.
Method - GET
Request
https://{HOST}:{PORT}/arm/api/server/remove?ids=1,2,3 (HTTPS)
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
sessionid Session Id as a header parameter.
ids Comma separated id(s) of the virtual management server(s) that you want to delete.
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 11
12
Managing the Actifio Resiliency Director Server - IRestArmServer
This interface and its corresponding RESTful APIs allow you to execute REST requests to CSP (Cloud Service Provider) for Resiliency Director Server. This interface contains the following RESTful APIs:
getArmServers
createArmServer
updateArmServer
deleteArmServer
getArmServersOfCustomers
unRegisterRdDirector
updateVersionFlagOnRDServer
getArmServers
Use this API to fetch the Resiliency Director Server(s) managed by CSP (Cloud Service Provider) site. If the method parameter is null, the method returns all the available Resiliency Director Servers from database. If the method parameter is not null, the method returns only the Resiliency Director Server(s) whose id(s) have been provided as an input.
Method: GET
Request:
https://{HOST}/arm/api/armserver/fetch ‐ To fetch all Resiliency Director server from database (HTTPS).
https://{HOST}/arm/api/armserver/fetch?ids=1,2,3 ‐ To fetch Resiliency Director server by id(s) (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ { "hostOrIp": "172.16.10.195", "description": "", "customerId": 11273, "customerName": "custSag", "userName": "admin", "password": "Password", "port": 443, "peerUniqueId": null, "armServerId": 11275, "createdOn": 1421190229514 } ] }
sessionid Session Id as a header parameter.
ids Customer ids - list of customer id(s) whose associated Resiliency Director Server data is to be fetched.
createArmServer
Use this API to create a Resiliency Director Collector in CSP database with the parameters provided in request, and also to add Resiliency Director Server to given Resiliency Director Collector database.
Method: POST
Request:
https://{HOST}/arm/api/armserver/add (HTTPS)
Body param { "hostOrIp": "172.16.10.202", "description": "Server description", "customerId": "11273", "userName": "admin", "password": "Password", "port": "443" }
Response:
Parameters Description
| actifio.com |Using the Actifio Resiliency Director RESTful APIs
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
session id as a header parameter.
rdServerToAdd Resiliency Director Server that you want to add in CSP database.
updateArmServer
Use this API to update the Resiliency Director Server in CSP database with the parameters provided in request.
Method: POST
Request:
https://{HOST}:{PORT}/arm/api/armserver/update (HTTPS)
Body param { "id":11256 "hostOrIp": "172.16.10.202", "description": "ss", "customerId": "11273", "userName": "admin", "password": "Password", "port": "443" }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
armserverToUpdate Resiliency Director Server that you want to update in the database.
session Session Id as a header parameter.
deleteArmServer
Use this API to delete a Resiliency Director Server(s) from the CSP database with the parameters provided in request.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/armserver/remove?ids=1,2,3
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
ids Resiliency Director server id(s) that you want to delete.
session Id as a header parameter.
Parameters Description
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 13
14
getArmServersOfCustomers
Use this API to fetch Resiliency Director Server(s) managed by CSP. If the method parameter is null, the method returns all the Resiliency Director Server from database. If the method parameter is not null, the method returns only the Resiliency Director Server(s) for given customer id(s) have been provided as an input.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/armserver/fetchbycustomer - To fetch all Resiliency Director Servers from database.
https://{HOST}:{PORT}/arm/api/armserver/fetchbycustomer?customerIds=1,2,3 - To fetch Resiliency Director Servers by customer Id(s).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ { "hostOrIp": "172.16.10.195", "description": "", "customerId": 11273, "customerName": "custSag", "userName": "admin", "password": "Password", "port": 443, "peerUniqueId": null, "armServerId": 11275, "createdOn": 1421190229514 } ] }
session Id as a header parameter.
ids Customer id(s) whose associated Resiliency Director Server data you want to fetch.
unRegisterRdDirector
Use this API to unregister the Resiliency Director Server from the database.
Method: POST
Request:
https://{HOST}:{PORT}/arm/api/armserver/unRegisterRdDirector (HTTPS)
Body param { "id": 1, "hostOrIp": "172.16.10.202", "description": "RD Server description", "customerId": "11273", "userName": "admin", "password": "", "port": "443" }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
rdServerToUnregister Resiliency Director server details that you want to unregister from the Resiliency Director database.
session Id as a header parameter.
Parameters Description
Parameters Description
| actifio.com |Using the Actifio Resiliency Director RESTful APIs
updateVersionFlagOnRDServer
Use this API to update the Resiliency Director version flag on peer Resiliency Director.
Method: POST
Request:
https://{HOST}:{PORT}/arm/api/armserver/update (HTTPS)
Body param { "id":11256 "hostOrIp": "172.16.10.202", "description": "ss", "customerId": "11273", "userName": "admin", "password": "Password", "port": "443" }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
sessionid Session Id as a header parameter.
rdServerToUpdate Resiliency Director Server details that you want to update in the database.
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 15
16
Managing Application Groups - IRestAppGroup
This interface and its corresponding APIs allow you to execute REST requests to Resiliency Director Server for application groups. This interface contains the following RESTful APIs:
fetchMembersForNewApplicationGroup
fetchVMDetailsFor
fetchVMDetailsForEdit
getApplicationGroupVMCount
createAppGroup
getAppGroups
removeAppGroup
getVirtualMachines
fetchVMAndVappsForAppGroup
updateAppGroup
fetchAppGroupDetailsWithVms
fetchCount
getPreDefinedDelay
updatePeerAppGroupCount
cancelAppGrpCreation
updatePeerRecoveryPlanId
fetchMembersForNewApplicationGroup
Use this API to fetch application group members (VMs and vApps) for given Actifio appliance and vCenter server.
Method - GET
Request
https://{HOST}/arm/api/applicationgroup/fetchnewmember?cdsid=215&serverid=548&appgroupname=app_group&uniqueKey=145899
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ { "memberUuId": "50087164‐f3f4‐0d7b‐9bb9‐80621180c1d0", "memberName": "qatest9", "vm": true, "executionStatus": "", "cdsAppId": "5580", "cdsClusterId": "590021132584", "vmNewName": null } ] }
Parameters Description
session Id as a header parameter.
cdsId Actifio Appliance id using which application group needs to be created.There should be a copy data storage with this id in Resiliency Director database.
serverId Virtual management server id using which application group needs to be created.There should be a server with this id in Resiliency Director database.
| actifio.com |Using the Actifio Resiliency Director RESTful APIs
fetchVMDetailsFor
Use this APl to get details of the application group member. A list for application group members with their order in application group with same order pass as input.
Method - POST
Request
https://{HOST}/arm/api/applicationgroup/fetchvmdetails?serverid=2321&appgroupname=application_group&uniqueKey=1458992 Body param : [ { "memberOrderIndex": 1, "delay": 10 "appGroupMember": { "memberUuId": 1, "memberName": "application_group", "vm": "true" } } ]
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ "appGrpMemberWithOrder": [ { "memberOrderIndex": 1, "delay": 0, "appGroupMembers": [ { "memberUuId": "5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f", "memberName": "Sky‐VM3", "vm": false, "executionStatus": "", "cdsAppId": null, "cdsClusterId": null, "vmNewName": null, "id": 0, "vappName": "", "numberOfCpus": 1, "actualNumberOfNics": 1, "testNumberOfNics": 1, "testMemoryInMbs": 1024, "actualMemoryInMbs": 1024, "storageLocation": "[actifio supplied storage] Sky‐VM19/Sky‐VM19.vmx", "shutdownOrder": 0, "keyValue": "vm‐61720", "numberOfVirtualDisks": 1, "hddInGbs": 40, "hostName": "test‐pri‐arm", "ip": "null", "validForAppGroup": true, "cupResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 1000, "sharesLevel": 1 }, "memoryResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 10240, "sharesLevel": 1 }, "testCPUAllocation": 100, "actualCPUAllocation": 100, "prescript": "", "postscript": "", "username": "", "passwd": "", "nicNames": [ { "deciveConfigId": 4000, "macAddress": "00:50:56:88:56:ba" } ], "selectedNIC": "", "deDupeAsyncStatus": null, "ipType": "dynamic", "gateway": null, "subnetMask": null, "sourceIp": "172.16.10.72", "sourceSubnet": "", "sourceGateway": "172.16.10.100", "portGroup": null, "osName": "linux", "preScriptType": "", "postScriptType": "", "appGroupLevelScript": null, "preExternalScript": null, "postExternalScript": null, "critical": false, "vappStartupOrder": 0 } ], "preExternalScript": null, "postExternalScript": null } ], "supportedScriptTypes": [ { "scriptType": "shell", "supportingOS": [ "linux" ] } ] ] }
appgroupname Application group name that you want to create.
uniqueKey Value it can be time stamp too.
Parameters Description
sessionId Session Id as a header parameter.
serverId Server id on which these members are located. There should be a server with this id in Resiliency Director database.
appgroupname Application group name.
uniqueKey Value which is passed in fetch new member request.
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 17
18
appGroupMembersForDetails
Members (include uuid, name, isvm) list for which you want to fetch the details.
Parameters Description
| actifio.com |Using the Actifio Resiliency Director RESTful APIs
fetchVMDetailsForEdit
Use this API to edit the details of an existing application group. A list for application group members with their order in application group. Return details for members with same order pass as input.
Method - POST
Request
https://{HOST}/arm/api/applicationgroup/fetchvmdetailsforedit?serverid=1245&appgroupname=app_group&uniqueKey=145488&appGroupId=1125 Body param [ { "memberOrderIndex": 1, "delay":10 "appGroupMember": { "memberUuId": 1, "memberName": "acme", "vm": "true" } } ]
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ "appGrpMemberWithOrder": [ { "memberOrderIndex": 1, "delay": 0, "appGroupMembers": [ { "memberUuId": "5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f", "memberName": "Sky‐VM3", "vm": false, "executionStatus": "", "cdsAppId": null, "cdsClusterId": null, "vmNewName": null, "id": 0, "vappName": "", "numberOfCpus": 1, "actualNumberOfNics": 1, "testNumberOfNics": 1, "testMemoryInMbs": 1024, "actualMemoryInMbs": 1024, "storageLocation": "[actifio supplied storage] Sky‐VM19/Sky‐VM19.vmx", "shutdownOrder": 0, "keyValue": "vm‐61720", "numberOfVirtualDisks": 1, "hddInGbs": 40, "hostName": "test‐pri‐arm", "ip": "null", "validForAppGroup": true, "cupResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 1000, "sharesLevel": 1 }, "memoryResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 10240, "sharesLevel": 1 }, "testCPUAllocation": 100, "actualCPUAllocation": 100, "prescript": "", "postscript": "", "username": "", "passwd": "", "nicNames": [ { "deciveConfigId": 4000, "macAddress": "00:50:56:88:56:ba" } ], "selectedNIC": "", "deDupeAsyncStatus": null, "ipType": "dynamic", "gateway": null, "subnetMask": null, "sourceIp": "172.16.10.72", "sourceSubnet": "", "sourceGateway": "172.16.10.100", "portGroup": null, "osName": "linux", "preScriptType": "", "postScriptType": "", "appGroupLevelScript": null, "preExternalScript": null, "postExternalScript": null, "critical": false, "vappStartupOrder": 0 } ], "preExternalScript": null, "postExternalScript": null } ], "supportedScriptTypes": [ { "scriptType": "shell", "supportingOS": [ "linux" ] } ] ] }
session Session Id as a header parameter.
serverId Server id on which these members are located. There should be a server with this id in Resiliency Director database.
appgroupname Application group name.
uniqueKey Value which is passed in fetch new members request.
appGroupMembersForDetails Member (include uuid, name, isvm) list for which details needs to be fetched.
getApplicationGroupVMCount
Use this API to get the app group details which are not yet part of the recovery plan.
Method - GET
Request
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 19
2
https://{HOST}/arm/api/applicationgroup/getappgroupvmcount
Response
{ "status": "success", "statusCode": "1000", "statusMessage" "", "responseData" : "[{"appGroupName":"appGroup1","appGroupVMCount":3},{"appGroupName":"appGroup2","appGroupVMCount":1}]", }
sessionid Session Id as a header parameter.
Parameters Description
0 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
createAppGroup
Use this API to create an application group with VM details into Resiliency Director database.
Method - POST
Request
https://{HOST}/arm/api/applicationgroup/add?uniqueKey=1454863
Body param { "id": null, "name": "A123", "description": "", "cdsId": 4097, "serverId": 4099, "sequenceOrder": [ { "memberOrderIndex": 1, "delay": 0, "appGroupMembers": [ { "memberUuId": "5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f", "memberName": "Sky‐VM3", "vm": false, "cdsAppId": null, "id": 0, "vappName": "", "testCPUAllocation": 100, "testNumberOfNics": 1, "testMemoryInMbs": 1024, "storageLocation": "[actifio supplied storage] Sky‐VM19/Sky‐VM19.vmx", "shutdownOrder": 0, "keyValue": "vm‐61720", "numberOfVirtualDisks": 1, "hddInGbs": 40, "hostName": "test‐pri‐arm", "ip": "null", "validForAppGroup": true, "vappStartupOrder": 0, "actualMemoryInMbs": 1024, "actualCPUAllocation": 100, "actualNumberOfNics": 1, "cupResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 1000, "sharesLevel": 1 }, "memoryResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 10240, "sharesLevel": 1 }, "prescript": "", "postscript": "", "username": "", "passwd": "", "ipType": "dynamic", "selectedNIC": "", "critical": "false", "sourceIp": "172.16.10.72", "sourceSubnet": "", "sourceGateway": "172.16.10.100", "preScriptType": "", "postScriptType": "", "nicNames": [ { "deciveConfigId": "4000", "macAddress": "00:50:56:88:56:ba" } ] } ] } ] }
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Application group added successfully.", "responseData": "" }
appGroupTOAdd Application group details for creating application object in Resiliency Director database.
uniqueKey Value which is passed in fetch new member request.
getAppGroups
Use this API to fetch Application Group(s) managed by the Resiliency Director from application database. If the method parameter is null, the method returns all the application groups from the database. If the method parameter is not null, the method returns only the application group(s) whose id(s) have been provided as input.
Method - GET
Request
https://{HOST}/arm/api/applicationgroup/fetch
https://{HOST}/arm/api/applicationgroup/fetch?ids=1,2,3
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": { [ { "id": 4102, "name": "A123", "description": "", "cdsId": 4097, "cdsHostName": "172.16.10.10", "serverId": 4099, "serverHostName": "172.16.10.134", "createdOn": 1421116451209, "editedOn": 1421116907013, "noOfVms": 1, "recoveryPlan": "", "noOfVApps": 0, "sequenceOrder": [ { "memberOrderIndex": 1, "delay": 0, "appGroupMembers": [ { "memberUuId": "5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f", "memberName": "Sky‐VM3", "vm": true, "executionStatus": "", "cdsAppId": "5801", "cdsClusterId": "590021132584", "vmNewName": null, "id": 4108, "vappName": "", "numberOfCpus": 0, "actualNumberOfNics": 1, "testNumberOfNics": 1,
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 21
2
"testMemoryInMbs": 1024, "actualMemoryInMbs": 1024, "storageLocation": null, "shutdownOrder": 0, "keyValue": null, "numberOfVirtualDisks": 0, "hddInGbs": 0, "hostName": "test‐pri‐arm", "ip": "null", "validForAppGroup": false, "cupResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 1000, "sharesLevel": 1 }, "memoryResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 10240, "sharesLevel": 1 }, "testCPUAllocation": 100, "actualCPUAllocation": 100, "prescript": "", "postscript": "", "username": "", "passwd": "", "nicNames": [ { "deciveConfigId": 4000, "macAddress": "00:50:56:88:56:ba" } ], "selectedNIC": "", "deDupeAsyncStatus": null, "ipType": "dynamic", "gateway": null, "subnetMask": null, "sourceIp": "172.16.10.72", "sourceSubnet": "", "sourceGateway": "172.16.10.100", "portGroup": null, "osName": null, "preScriptType": "", "postScriptType": "", "appGroupLevelScript": null, "preExternalScript": [], "postExternalScript": [], "critical": false, "vappStartupOrder": 0 } ], "preExternalScript": [], "postExternalScript": [] } ], "armServerId": 0, "armServerName": null, "recoveryPlanId": 0, "executionStatus": "", "peerRecoveryPlanId": 0, "cpuRequired": 100, "memoryRequired": 1024, "preScript": null, "postScript": null, "status": null, "customerName": "", "peerAppGrpId": 0, "preScriptType": null, "postScriptType": null, "preScriptVMUUID": null, "postScriptVMUUID": null, "preExternalScript": [], "postExternalScript": [], "critical": false } ] }
sessionid Session Id as a header parameter.
ids Comma separated application group id(s) that you want to fetch.
removeAppGroup
Use this APl to delete an application Group(s) managed by Resiliency Director with the parameters provided in request.
Method - GET
Request
https://{HOST}:{PORT}/arm/api/applicationgroup/remove?ids=1,2,3 (HTTPS)
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
appGroupIdsToDelete Comma separated id(s) of the application group(s) which all are to be deleted.
Parameters Description
Parameters Description
2 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
getVirtualMachines
Use this API to fetch virtual machines for the given application group id, managed by the Resiliency Director from application database.
Method - GET
Request
https://{HOST}/arm/api/applicationgroup/fetchvms?applicationgroupid=1215
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": { "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ "memberOrderIndex": 1, "delay": 0, "appGroupMembers": [ { "memberUuId": "5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f", "memberName": "Sky‐VM3", "vm": true, "executionStatus": "", "cdsAppId": "5801", "cdsClusterId": "590021132584", "vmNewName": null, "id": 4108, "vappName": "", "numberOfCpus": 0, "actualNumberOfNics": 1, "testNumberOfNics": 1, "testMemoryInMbs": 1024, "actualMemoryInMbs": 1024, "storageLocation": null, "shutdownOrder": 0, "keyValue": null, "numberOfVirtualDisks": 0, "hddInGbs": 0, "hostName": "test‐pri‐arm", "ip": "null", "validForAppGroup": false, "cupResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 1000, "sharesLevel": 1 }, "memoryResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 10240, "sharesLevel": 1 }, "testCPUAllocation": 100, "actualCPUAllocation": 100, "prescript": "", "postscript": "", "username": "", "passwd": "", "nicNames": [ { "deciveConfigId": 4000, "macAddress": "00:50:56:88:56:ba" } ], "selectedNIC": "", "deDupeAsyncStatus": null, "ipType": "dynamic", "gateway": null, "subnetMask": null, "sourceIp": "172.16.10.72", "sourceSubnet": "", "sourceGateway": "172.16.10.100", "portGroup": null, "osName": null, "preScriptType": "", "postScriptType": "", "appGroupLevelScript": null, "preExternalScript": [], "postExternalScript": [], "critical": false, "vappStartupOrder": 0 } ], "preExternalScript": null, "postExternalScript": null } ] }
applicationGroupId An application group id for which you want to fetch the virtual machines.
fetchVMAndVappsForAppGroup
Use this API to fetch virtual machines, UUID, vApps, and recovery order for the given application group id managed by Resiliency Director from application database.
Method - GET
Request
https://{HOST}/arm/api/applicationgroup/fetchvmvappdetails?applicationgroupid=1425
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "memberOrderIndex": 1, "delay": 0, "appGroupMembers": [ { "memberUuId": "5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f", "memberName": "Sky‐VM3", "vm": true, "executionStatus": "", "cdsAppId": null, "cdsClusterId": null, "vmNewName": null, "id": 0, "vappName": null, "numberOfCpus": 0, "actualNumberOfNics": 0, "testNumberOfNics": 0, "testMemoryInMbs": 0, "actualMemoryInMbs": 0, "storageLocation": null, "shutdownOrder": 0, "keyValue": null, "numberOfVirtualDisks": 0, "hddInGbs": 0, "hostName": null, "ip": null, "validForAppGroup": false, "cupResourceAllocation": null, "memoryResourceAllocation": null, "testCPUAllocation": 0, "actualCPUAllocation": 0, "prescript": "", "postscript": "", "username": "", "passwd": "", "nicNames": null, "selectedNIC": null, "deDupeAsyncStatus": null,
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 23
2
"ipType": null, "gateway": null, "subnetMask": null, "sourceIp": null, "sourceSubnet": null, "sourceGateway": null, "portGroup": null, "osName": null, "preScriptType": null, "postScriptType": null, "appGroupLevelScript": null, "preExternalScript": null, "postExternalScript": null, "critical": false, "vappStartupOrder": 0 } ], "preExternalScript": null, "postExternalScript": null } ] }
sessionid Session Id as a header parameter.
applicationGroupId Returns status, message and list of Virtual machines and vApps as response data for the REST request in JSON format.
updateAppGroup
Use this API to update an application group with VM details into the Resiliency Director database.
Method - POST
Request
https://{HOST}/arm/api/applicationgroup/update?uniquekey=125486
Body param { "id": 1236, "name": "A123", "description": "", "cdsId": 4097, "serverId": 4099, "sequenceOrder": [ { "memberOrderIndex": 1, "delay": 0, "appGroupMembers": [ { "memberUuId": "5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f", "memberName": "Sky‐VM3", "vm": false, "cdsAppId": null, "id": 0, "vappName": "", "testCPUAllocation": 100, "testNumberOfNics": 1, "testMemoryInMbs": 1024, "storageLocation": "[actifio supplied storage] Sky‐VM19/Sky‐VM19.vmx", "shutdownOrder": 0, "keyValue": "vm‐61720", "numberOfVirtualDisks": 1, "hddInGbs": 40, "hostName": "test‐pri‐arm", "ip": "null", "validForAppGroup": true, "vappStartupOrder": 0, "actualMemoryInMbs": 1024, "actualCPUAllocation": 100, "actualNumberOfNics": 1, "cupResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 1000, "sharesLevel": 1 }, "memoryResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 10240, "sharesLevel": 1 }, "prescript": "", "postscript": "", "username": "", "passwd": "", "ipType": "dynamic", "selectedNIC": "", "critical": "false", "sourceIp": "172.16.10.72", "sourceSubnet": "", "sourceGateway": "172.16.10.100", "preScriptType": "", "postScriptType": "", "nicNames": [ { "deciveConfigId": "4000", "macAddress": "00:50:56:88:56:ba" } ] } ] } ] }
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
sessionid Session Id as a header parameter.
uniqueKey Value which is passed in fetch new member request.
AppGroupIdsToUpdate Comma separated application group id(s) that you want to update.
Parameters Description
Parameters Description
4 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
fetchAppGroupDetailsWithVms
Use this API to fetch Application Group(s) with virtual machines details managed by the Resiliency Director from application database. If the method parameter is null, the method returns all the application groups with list of virtual machines from database. If the method parameter is not null, the method returns only the application group(s) whose id(s) have been provided as an input.
Method - GET
Request
https://{HOST}/arm/api/applicationgroup/fetchdetails - To fetch all application groups from the database with virtual machines details (HTTPS).
https://{HOST}/arm/api/applicationgroup/fetchdetails?ids=1,2,3 - To fetch application group by id(s) with virtual machines details (HTTPS).
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "id": 4102, "name": "A123", "description": "", "cdsId": 4097, "cdsHostName": "172.16.10.10", "serverId": 4099, "serverHostName": "172.16.10.134", "createdOn": 1421116451209, "editedOn": 1421116907013, "noOfVms": 1, "recoveryPlan": "", "noOfVApps": 0, "sequenceOrder": [ { "memberOrderIndex": 1, "delay": 0, "appGroupMembers": [ { "memberUuId": "5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f", "memberName": "Sky‐VM3", "vm": true, "executionStatus": "", "cdsAppId": "5801", "cdsClusterId": "590021132584", "vmNewName": null, "id": 4108, "vappName": "", "numberOfCpus": 0, "actualNumberOfNics": 1, "testNumberOfNics": 1, "testMemoryInMbs": 1024, "actualMemoryInMbs": 1024, "storageLocation": null, "shutdownOrder": 0, "keyValue": null, "numberOfVirtualDisks": 0, "hddInGbs": 0, "hostName": "test‐pri‐arm", "ip": "null", "validForAppGroup": false, "cupResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 1000, "sharesLevel": 1 }, "memoryResourceAllocation": { "reservation": 100, "limit": ‐1, "shares": 10240, "sharesLevel": 1 }, "testCPUAllocation": 100, "actualCPUAllocation": 100, "prescript": "", "postscript": "", "username": "", "passwd": "", "nicNames": [ { "deciveConfigId": 4000, "macAddress": "00:50:56:88:56:ba" } ], "selectedNIC": "", "deDupeAsyncStatus": null, "ipType": "dynamic", "gateway": null, "subnetMask": null, "sourceIp": "172.16.10.72", "sourceSubnet": "", "sourceGateway": "172.16.10.100", "portGroup": null, "osName": null, "preScriptType": "", "postScriptType": "", "appGroupLevelScript": null, "preExternalScript": [], "postExternalScript": [], "critical": false, "vappStartupOrder": 0 } ], "preExternalScript": [], "postExternalScript": [] } ], "armServerId": 0, "armServerName": null, "recoveryPlanId": 0, "executionStatus": "", "peerRecoveryPlanId": 0, "cpuRequired": 100, "memoryRequired": 1024, "preScript": null, "postScript": null, "status": null, "customerName": "", "peerAppGrpId": 0, "preScriptType": null, "postScriptType": null, "preScriptVMUUID": null, "postScriptVMUUID": null, "preExternalScript": [], "postExternalScript": [], "critical": false } ] }
ids Comma separated application group id(s) that you want to fetch.
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 25
2
fetchCount
Use this API to fetch counts for the Application Group(s) with recovery, and excluding recovery managed by the Resiliency Director from application database.
Method - GET
Request
https://{HOST}/arm/api/applicationgroup/fetchcount - To fetch count for the application group from database (HTTPS).
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": { "includeInRecovery": 2, "excludeFromRecovery": 0, "total": 2 "peerid":10 } }
session Session Id as a header parameter.
getPreDefinedDelay
Use this API to return predefined delay for sequence.
Method - GET
Request
https://{HOST}/arm/api/applicationgroup/predefinedelay
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "", "responseData": { "preDefineDelay":[ 0,10,20,30,40,50 ] } }
sessionid Session Id as a header parameter.
updatePeerAppGroupCount
Use this API to update the application group count on peer Resiliency Director.
Method - POST
Request
https://{HOST}/arm/api/applicationgroup/updatePeerAppGroupCount
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Application group count updated successfully on peer"}
Parameters Description
Parameters Description
6 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
sessionid Session Id as a header parameter.
cancelAppGrpCreation
Use this API to clear cache created while application group creation.
Method - POST
Request
https://{HOST}/arm/api/applicationgroup/cancelappgrpcreation
Body parameter { "includeInRecovery": 2, "excludeFromRecovery":3, "total":5, "peerId":2201 }
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Application group creation canceled successfully.", }
sessionid Session Id as a header parameter.
updatePeerRecoveryPlanId
Use this API to update the application group on peer RD.
Method - POST
Request
https://{HOST}/arm/api/applicationgroup/updatePeerRecoveryPlanId?appnames=app_test&recoveryplanid=12
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Application group updated successfully on peer", }
sessionid Session id as header parameter.
appnames Application group names as query parameter.
recoveryplanid Recovery plan id, which is to be updated, as query parameter.
Parameters Description
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 27
2
Managing Customers - IRestArmCustomer
This interface and its corresponding REST APIs allow you to execute REST requests to fetch, add, update, and remove customers. This interface contains the following RESTful APIs:
getCustomers
addCustomer
updateCustomer
removeCustomer
getCustomers
Use this API to fetch customer(s) managed by CSP. If the method parameter is null, the method returns all the available customers from database. If the method parameter is not null, the method returns only the customer(s) whose id(s) have been provided as an input.
Method - GET
Request
https://{HOST}/arm/api/customer/fetch - To fetch all customers from database (HTTPS).
https://{HOST}/arm/api/customer/fetch?ids=1,2,3 - To fetch customers by id(s) (HTTPS).
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ { "id": 1, "name": "John Smith" "address": "Boston, Massachusetts", "email": "[email protected]", "password": "", "leaseStartDate": 0, "leaseEndDate": 0, "description": "description about customer", "scheduleEnable": false } ] }
ids List of customer id(s) for which you want to fetch the data.
session Id as a header parameter.
addCustomer
Use this API to create a customer in CSP database with the parameters provided in request. Request has to be in JSON format.
Method: POST
Request:
https://{HOST}/arm/api/customer/add (HTTPS)
Body param{ "name": "John Smith", "address": "Boston, Massachusetts", "email": "[email protected]", "description": "description about customer", "password": "Password", "leaseStartDate": 0, "leaseEndDate": 0, "scheduleEnable": false }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
Parameters Description
8 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
sessionid Session id as a header parameter.
customerToAdd Customer details that you want to add in the CSP database.
updateCustomer
Use this API to update customer details in CSP database with the parameters provided in request.
Method: POST
Request:
https://{HOST}/arm/api/customer/update (HTTPS)
Body param { "id": 1, "name": "John Smith" "address": "Boston, Massachusetts", "email": "[email protected]", "password": "passwd", "leaseStartDate": 0, "leaseEndDate": 0, "description": "description about customer", "scheduleEnable": false }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
sessionid Session id as a header parameter.
customersToUpdate Customer details that you want to update in the database.
removeCustomer
Use this API to delete a customer(s) in CSP database with the parameters provided in request.
Method: GET
Request:
https://{HOST}/arm/api/customer/remove?ids=1,2,3 (HTTPS)
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": "" }
sessionid Session id as a header parameter.
ids Customer Id(s) that you want to delete.
Parameters Description
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 29
3
Managing Recovery Plans - IRestRecoveryPlan
This interface and its corresponding REST APIs allow you to execute REST requests to the Actifio Resiliency Director Server for Recovery Plans. This interface contains the following RESTful APIs:
getRecoveryPlans
createRecoveryPlan
updateRecoveryPlan
deleteRecoveryPlans
getRecoveryPlanAppGroup
getAppGroupFromPrimary
getAppGroupWithNewSequence
getRecoveryPlanResourcePools
executeRecoveryPlan
getRecoveryplanState
getAppGroupForEdit
getAllStatesForRecoveryPlan
getRecoveryPlanState
resetRecoveryPlanState
getRecoveryPlanCountGroupByState
getRecoveryPlanSchedule
getRecoveryPlanStatesForGivenIds
invalidateRecoveryPlan
getPortGroupsForRecoveryPlan
fetchDedupeAsycStatus
fetchRecoveryPlansByDeDupeAsyncStatus
canelRecoveryPlanExecution
disableRecoveryPlan
getFetchInvalidRecoveryPlanNotification
executeSingleVMRecovery
fetchVmExecutionStatus
executeSingleScript
fetchVMForInvalidRecoveryPlan
getRecoveryPlans
Use this API to fetch recovery plan(s) managed by the Resiliency Director server from application database. If method parameter is null, the method returns all the available recovery plans from database. If method parameter is not null, the method returns only the recovery plan(s) whose id(s) have been provided as an input.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/fetch?ids=1,2,3 - To fetch recovery plans by id(s) (HTTPS).
0 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ { "recoveryPlanId": 115, "serverId": 4784, "storageServerId": 5241, "scheduleId": 4420, "organizationId": 21, "name": "RecoveryPlan_App1", "state": "ENABLED", "editedOn": 2014‐01‐01, "editedBy": "acme", "networkType": PUBLIC, "routerLocation": "", "ipAddressPool": "pool", "externalNetworkName": "acmeNetwork", "memoryRequired": 2048, "cpuRequired": 2, "nicsRequired": 2, recoveryPlanMemberOrderTOs { applicationGroupIndex : 1 applicationGroupMemberId : 24 } } ] }
sessionid Session Id as a header parameter.
ids Comma separated recovery plan id(s) for which you want to fetch the data.
state State of the recovery plan to be fetched.
mode Mode in which recovery plan has been executed.
createRecoveryPlan
Use this API to create a recovery plan in the Resiliency Director server database with the parameters provided in request. Request has to be in JSON format.
Method: PUT
Request:
https://{HOST}/arm/api/recoveryplan/add (HTTPS)
Body param { "recoveryPlanMember": { "recoveryPlanId": 2057, "serverId": 13314, "storageServerId": 10240, "scheduleId": 8193, "organizationId": 15367, "organizationName": "act", "name": "R‐Plan‐Name", "state": "DISABLED", "editedOn": 1389857735254, "editedBy": "xyz act", "networkType": "PRIVATE", "routerLocation": "routerLocation", "ipAddressPool": "xxx.xx.xx.xx", "externalNetworkName": "PUBLIC", "memoryRequired": 2048, "cpuRequired": 1, "nicsRequired": 2 }, "appGroups": [ { "startupSequence": 1, "appGroup": { "id": 11, "name": "A‐Group1", "description": "done", "cdsId": 10240, "cdsHostName": "localhost", "serverId": 13314, "serverHostName": "serverhost", "createdOn": 10012014, "editedOn": 11012014, "noOfVms": 0, "recoveryPlan": "R‐Plan01", "noOfVApps": 2, "vmDetailWithOrder": [ { "memberOrderIndex": 777, "appGroupMember": { "memberUuId": "552", "memberName": "sss", "vm": true, "id": 444, "vappName": "vapp1", "numberOfCpus": 6789, "numberOfNics": 455566, "memoryInGbs": 64, "storageLocation": "55", "shutdownOrder": 245678, "numberOfVirtualDisks": 454654, "hddInGbs": 5522, "hostName": "arti", "ip": "aaa" } }, { "memberOrderIndex": 888, "appGroupMember": { "memberUuId": "6854", "memberName": "sss", "vm": true, "id": 555, "vappName": "vapp2", "numberOfCpus": 676767, "numberOfNics": 678787, "memoryInGbs": 5, "storageLocation": "47", "shutdownOrder": 565767, "numberOfVirtualDisks": 5867867, "hddInGbs": 66, "hostName": "vmhost", "ip": "mmm" } } ], "armServerId": 111, "armServerName": "172.17.101.2", "recoveryPlanId": 2057 } } ], "schedule": { "scheduleId": 8193, "scheduleName": "ScheduleName", "scheduleType": "RECOVERY_PLAN", "executeOn": "Weekend", "exceptOn": "Everday", "startTime": 3424, "endTime": 34343, "repeateInterval": 4324, "scheduleStatus": "COMPLETED" } }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Recovery plan added successfully with Name : RecoveyPlan_App1", "responseData": "" }
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 31
3
recoveryplanToAdd Recovery Plan details that you want to add in Resiliency Director database.
updateRecoveryPlan
Use this API to update a recovery plan in Resiliency Director server database with the parameters provided in request.
Method: PUT
Request:
https://{HOST}:{PORT}/arm/api/recoveryplan/update (HTTPS)
Body param { "recoveryPlanMember": { "recoveryPlanId": 2057, "serverId": 13314, "storageServerId": 10240, "scheduleId": 8193, "organizationId": 15367, "organizationName": "act", "name": "R‐Plan‐Name", "state": "DISABLED", "editedOn": 1389857735254, "editedBy": "xyz act", "networkType": "PRIVATE", "routerLocation": "routerLocation", "ipAddressPool": "xxx.xx.xx.xx", "externalNetworkName": "PUBLIC", "memoryRequired": 2048, "cpuRequired": 1, "nicsRequired": 2 }, "appGroups": [ { "startupSequence": 1, "appGroup": { "id": 11, "name": "A‐Group1", "description": "done", "cdsId": 10240, "cdsHostName": "localhost", "serverId": 13314, "serverHostName": "serverhost", "createdOn": 10012014, "editedOn": 11012014, "noOfVms": 0, "recoveryPlan": "R‐Plan01", "noOfVApps": 2, "vmDetailWithOrder": [ { "memberOrderIndex": 777, "appGroupMember": { "memberUuId": "552", "memberName": "sss", "vm": true, "id": 444, "vappName": "vapp1", "numberOfCpus": 6789, "numberOfNics": 455566, "memoryInGbs": 64, "storageLocation": "55", "shutdownOrder": 245678, "numberOfVirtualDisks": 454654, "hddInGbs": 5522, "hostName": "arti", "ip": "aaa" } }, { "memberOrderIndex": 888, "appGroupMember": { "memberUuId": "6854", "memberName": "sss", "vm": true, "id": 555, "vappName": "vapp2", "numberOfCpus": 676767, "numberOfNics": 678787, "memoryInGbs": 5, "storageLocation": "47", "shutdownOrder": 565767, "numberOfVirtualDisks": 5867867, "hddInGbs": 66, "hostName": "vmhost", "ip": "mmm" } } ], "armServerId": 111, "armServerName": "xxx.xx.xx.xx", "recoveryPlanId": 2057 } } ], "schedule": { "scheduleId": 8193, "scheduleName": "ScheduleName", "scheduleType": "RECOVERY_PLAN", "executeOn": "Weekend", "exceptOn": "Everday", "startTime": 3424, "endTime": 34343, "repeateInterval": 4324, "scheduleStatus": "COMPLETED" } }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Recovery plan updated successfully.", "responseData": "" }
recoveryplansToUpdate Recovery plan details that you want to update in Resiliency Director database.
Parameters Description
Parameters Description
2 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
deleteRecoveryPlans
Use this API to delete a recovery plan(s) in Resiliency Director database with the parameters provided in request.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/remove?ids=1,2,3 (HTTPS)
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully. Number of deleted Recovery plan(s): 1", "responseData": "" }
sessionid Session id as a header parameter.
ids Comma separated id(s) of the recovery plan that you want to delete.
getRecoveryPlanAppGroup
Use this API to fetch recovery plan(s) managed by Resiliency Director from the application database. If the method parameter is null, the method returns all the available application groups from database. If the method parameter is not null, the method returns only the application group(s) whose recovery plan id have been provided as an input.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/recoveryplan/fetchappgroup?id=1 - To fetch all recovery plans from database (HTTPS).
Response:
{ "status":"success", "statusCode":"1000", "statusMessage":"Operation performed successfully.", "responseData": [ { "startupSequence":22, "appGroup": { "id":11, "name":"A‐Group1", "description":"done", "cdsId":10240, "cdsHostName":"cdshostname", "serverId":13314, "serverHostName":"serverHostName", "createdOn":10012014, "editedOn":11012014, "noOfVms":0, "recoveryPlan":"R‐Plan01", "noOfVApps":0, "armServerId":111, "vmDetailWithOrder":null, "armServerName":"arrr", "recoveryPlanId":2546 } }, { "startupSequence":22, "appGroup": { "id":221, "name":"A‐Group2", "description":"done", "cdsId":10240, "cdsHostName":"cdshostname", "serverId":13314, "serverHostName":"serverHostName", "createdOn":10012014, "editedOn":11012014, "noOfVms":0, "recoveryPlan":"R‐Plan01", "noOfVApps":0, "armServerId":111, "vmDetailWithOrder":null, "armServerName":"arrr", "recoveryPlanId":2546 } }, ] }
ids Recovery plan id(s) whose application group data you want to fetch.
getAppGroupFromPrimary
Use this API to fetch application group(s) managed by the Resiliency Director Collector from application database. If the method parameter is null, method does not return any application group data. If the method parameter is not null, the method returns only the application group(s) whose Resiliency Director Collector id(s) have been provided as an input.
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 33
3
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/getappgroupfromprimary?armserverid=1 - To fetch all recovery plans from database (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "id": 11, "name": "A‐Group1", "description": "done", "cdsId": 10240, "cdsHostName": "cdsHost", "serverId": 13314, "serverHostName": "serverHost", "createdOn": 10012014, "editedOn": 11012014, "noOfVms": 0, "recoveryPlan": "R‐Plan01", "noOfVApps": 2, "vmDetailWithOrder": null, "armServerId": 111, "armServerName": "xxx.xx.xxx.xx", "recoveryPlanId": 2546 }, { "id": 221, "name": "A‐Group2", "description": "done", "cdsId": 10240, "cdsHostName": "cdsHost", "serverId": 13314, "serverHostName": "serverHost", "createdOn": 10012014, "editedOn": 11012014, "noOfVms": 0, "recoveryPlan": "R‐Plan01", "noOfVApps": 0, "vmDetailWithOrder": null, "armServerId": 111, "armServerName": "xxx.xx.xx.xx", "recoveryPlanId": 2546 } ] }
sessionid Session Id as a header parameter.
armserverid Resiliency Director Collector id whose data you want to fetch.
getAppGroupWithNewSequence
Use this API to fetch application group(s) managed by the Resiliency Director Collector from application database. If the method parameter is null, method does not return any application group data. If the method parameter is not null, the method returns only the application group(s) whose Resiliency Director Collector id(s) have been provided as an input.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/getappgroupwithvmdetailsfromprimary?armserverid=1 - To fetch all recovery plans from database (HTTPS).
Body:
{ [ { "startupSequence": 1, "appGroup": { "id": 9223, "name": "A‐Group1", "description": "done", "cdsId": 10240, "cdsHostName": "cdsHost", "serverId": 13314, "serverHostName": "serverHost", "createdOn": 10012014, "editedOn": 11012014, "noOfVms": 0, "recoveryPlan": "R‐Plan01", "noOfVApps": 2, "vmDetailWithOrder": null, "armServerId": 111, "armServerName": "xxx.xx.xx.xx", "recoveryPlanId": 2546 } } ] }
Parameters Description
4 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "startupSequence": 1, "appGroup": { "id": 11, "name": "A‐Group1", "description": "done", "cdsId": 10240, "cdsHostName": "cdshostname", "serverId": 13314, "serverHostName": "serverHostname", "createdOn": 10012014, "editedOn": 11012014, "noOfVms": 0, "recoveryPlan": "R‐Plan01", "noOfVApps": 2, "vmDetailWithOrder": [ { "memberOrderIndex": 777, "appGroupMember": { "memberUuId": "24", "memberName": "sss", "vm": true, "id": 444, "vappName": "vapp1", "numberOfCpus": 6789, "numberOfNics": 455566, "memoryInGbs": 64, "storageLocation": "55", "shutdownOrder": 245678, "numberOfVirtualDisks": 454654, "hddInGbs": 5522, "hostName": "vmhost", "ip": "xxx.xx.xx.xx" } }, { "memberOrderIndex": 888, "appGroupMember": { "memberUuId": "35", "memberName": "sss", "vm": true, "id": 555, "vappName": "vapp2", "numberOfCpus": 676767, "numberOfNics": 678787, "memoryInGbs": 5, "storageLocation": "47", "shutdownOrder": 565767, "numberOfVirtualDisks": 5867867, "hddInGbs": 66, "hostName": "vmhost", "ip": "xxx.xx.xx.xx" } } ], "armServerId": 111, "armServerName": "xxx.xx.xx.xx", "recoveryPlanId": 2546 } }, ] }
id Recovery plan id whose data you want to fetch.
getRecoveryPlanResourcePools
Use this API to fetch Resource pool(s) of Hypervisor. If the method parameter is null, the method returns all the available resource pools from database. If the method parameter is not null, the method returns only the resource pool(s) whose name(s) have been provided as an input.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/getresourcepool?serverid=2 - To fetch recovery plans by id(s) (HTTPS).
Response:
{ "status":"success", "statusCode":"1000", "statusMessage":"Operation performed successfully.", "responseData":[ { "resourcePoolId":"resgroup‐8648", "resourcePoolName":"name1", "resourcePoolMemory":"12000", "resourcePoolCPU":"6000" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" }, { "resourcePoolId":"resgroup‐10780", "resourcePoolName":"name2", "resourcePoolMemory":"341230", "resourcePoolCPU":"12332" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" }, { "resourcePoolId":"resgroup‐8624", "resourcePoolName":"name3", "resourcePoolMemory":"0", "resourcePoolCPU":"0" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" }, { "resourcePoolId":"resgroup‐8651", "resourcePoolName":"name4", "resourcePoolMemory":"0", "resourcePoolCPU":"0" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" }, { "resourcePoolId":"resgroup‐4531", "resourcePoolName":"name5", "resourcePoolMemory":"0", "resourcePoolCPU":"0" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" }, { "resourcePoolId":"resgroup‐4594", "resourcePoolName":"name6", "resourcePoolMemory":"0", "resourcePoolCPU":"0" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" }, { "resourcePoolId":"resgroup‐8612", "resourcePoolName":"name7", "resourcePoolMemory":"66210", "resourcePoolCPU":"4510" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" }, { "resourcePoolId":"resgroup‐8645", "resourcePoolName":"name8", "resourcePoolMemory":"0", "resourcePoolCPU":"0" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" }, { "resourcePoolId":"resgroup‐11015", "resourcePoolName":"TestResourcePool1",
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 35
3
"resourcePoolMemory":"0", "resourcePoolCPU":"0" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" }, { "resourcePoolId":"resgroup‐11053", "resourcePoolName":"name", "resourcePoolMemory":"0", "resourcePoolCPU":"0" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" }, { "resourcePoolId":"resgroup‐10998", "resourcePoolName":"test", "resourcePoolMemory":"0", "resourcePoolCPU":"0" "resourcePoolParentName":"Resources", "resourcePoolOwnerName":"RD_Cluster" } ] }
id Server id whose data is to be fetched.
resourcepool Specific name for resource pool. If this name is not null, resource pool will get listed even it is a part of other recovery plan.
executeRecoveryPlan
Use this API to execute a recovery plan with for the provided id.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/execute?id=4148&mode=TEST - To fetch recovery plans by id(s) (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": "" }
id Recovery plan id that you want to execute.
mode Recovery mode in which you want to execute a recovery plan.
getRecoveryplanState
Use this API to fetch the state for a recovery plan.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/fetchstate?id=4148 - To fetch recovery plans by id(s) (HTTPS).
Parameters Description
Parameters Description
6 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": { "postExternalScript": "null", "status": "ReadyToRun", "preExternalScript": "null", "statusMessage": "Recovery plan : 'test_recovery' completed execution with status : Success on : Mon Feb 20 00:43:47 EST 2014" } }
sessionid Session Id as a header parameter.
id Recovery plan id for which you want to fetch recovery state.
getAppGroupForEdit
Use this API to fetch application group(s) managed by the Resiliency Director Collector to edit a recovery plan. If the method parameter is null, method does not return any application group data If the method parameter is not null, the method returns only the application group(s) whose Resiliency Director Collector id(s) have been provided as an input.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/getappgroupfromprimaryforedit?armserverid=1,recoveryplanid=2 - To fetch all recovery plans from database (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "startupSequence": 1, "appGroup": { "id": 11, "name": "A‐Group1", "description": "done", "cdsId": 10240, "cdsHostName": "cdshostname", "serverId": 13314, "serverHostName": "serverHostname", "createdOn": 10012014, "editedOn": 11012014, "noOfVms": 0, "recoveryPlan": "R‐Plan01", "noOfVApps": 2, "vmDetailWithOrder": null, "armServerId": 111, "armServerName": "xxx.xx.xx.xx", "recoveryPlanId": 2546 } }, { "startupSequence": 0, "appGroup": { "id": 11, "name": "A‐Group1", "description": "done", "cdsId": 10240, "cdsHostName": "cdshostname", "serverId": 13314, "serverHostName": "serverHostname", "createdOn": 10012014, "editedOn": 11012014, "noOfVms": 0, "recoveryPlan": "R‐Plan01", "noOfVApps": 2, "vmDetailWithOrder": null, "armServerId": 111, "armServerName": "xxx.xx.xx.xx", "recoveryPlanId": 2546 } } ] }
recoveryplan Recovery plan id whose data you want to fetch.
armserverid Resiliency Director Collector id whose data you want to fetch.
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 37
3
getAllStatesForRecoveryPlan
Use this API to fetch recovery plan execution status details managed CSP from application database.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/getexecallstates?recoveryplanid=2 - To fetch all recovery execution status from database (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData":[ { "id": 0, "executionStartDateTime": 456464, "executionEndDateTime": 454564, "overallExecutionStatus": "ReadyToRun", "detailedExecutionStatus": "DetailsEexcutionstatus", "typeOfRecoveryPlanExecution": "type" } ] }
sessionid Session Id as a header parameter.
recoveryplanid Recovery plan id whose data you want to fetch.
getRecoveryPlanState
Use this API to fetch recovery plan execution status details managed CSP from application database. If the method parameter is null, method does not return invalid recovery plan input. If the method parameter is not null, the method returns only the recovery plan execution status(es) whose recovery plan id(s) have been provided as an input.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/getexecstate?recoveryplanid=2 - To fetch all recovery execution status from database (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData":[ { "id": 0, "executionStartDateTime": 456464, "executionEndDateTime": 454564, "overallExecutionStatus": "ReadyToRun", "detailedExecutionStatus": "DetailsEexcutionstatus", "typeOfRecoveryPlanExecution": "type" },{ "id": 0, "executionStartDateTime": 456464, "executionEndDateTime": 454564, "overallExecutionStatus": "ReadyToRun", "detailedExecutionStatus": "DetailsEexcutionstatus", "typeOfRecoveryPlanExecution": "type" } ] }
sessionid Session Id as a header parameter.
recoveryplanid Recovery plan id whose data you want to fetch.
Parameters Description
Parameters Description
8 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
resetRecoveryPlanState
Use this API to reset the status of a recovery plan for the provided id.
Method: POST
Request:
https://{HOST}/arm/api/recoveryplan/resetstate?id=2&state=Success
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": "" }
sessionid Session Id as a header parameter.
id Recovery plan Id that you want to reset.
state Recovery plan state that you want to update.
getRecoveryPlanCountGroupByState
Use this API to fetch recovery plan count by providing execution status details as an input. If the method parameter is null, method does not return invalid recovery plan input. If the method parameter is not null, the method returns only the recovery plan execution status(es) count whose recovery plan id have been provided as an input.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/recoveryplan/fetchcount?status=ReadyToRun - To fetch count for the recovery plan execution status from database (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData":[ { "readyToRun":1, "draft":1, "inValidation":0, "total":2 } ] }
status The recovery plan status for which you want to fetch count.
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 39
4
getRecoveryPlanSchedule
Use this API to fetch schedule details for a recovery plan managed by CSP from the application database. If the method parameter is null, method does not return invalid recovery plan input. If the method parameter is not null, the method returns the schedule details only for recovery plan(s) whose id(s) have been provided as an input.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/fetchschedule?recoveryplanid=1 - To fetch schedule details of a recovery plan from database (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData":[ "schedule":{ "scheduleName": "ScheduleName", "scheduleStatus": "DISABLED", "scheduleType": "RECOVERY_PLAN", "startTime": 46464, "endTime": 6464, "repeatIntervalType": "234234", "repeatIntervalValue": "4234", "executeOnTO": { "freqencyType": "", "freqencyInterval": "", "daysOfWeek": "", "daysOfWeek": "", "daysOfMonth": "", "monthsOfYear": "", "weekOfMonth": "" }, "exceptOnTO": { "freqencyType": "", "freqencyInterval": "", "daysOfWeek": "", "daysOfMonth": "", "monthsOfYear": "", "weekOfMonth": "" } } ] }
sessionid Session Id as a header parameter.
recoveryplanid Recovery plan id for which you want to fetch schedule.
getRecoveryPlanStatesForGivenIds
Use this API to fetch recovery plan state details managed by CSP from application database.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/fetchstatebyrecoveryids?ids=1,2,3 - To fetch recovery plan execution state by recovery plan id(s) from database (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData":[ { "id":232, "state":"ReadyToRun" } ] }
sessionid Session Id as a header parameter.
ids Recovery plan Ids whose state you want to fetch.
Parameters Description
Parameters Description
0 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
invalidateRecoveryPlan
Use this API to invalidate recovery plans for the given list of recovery plan ids.
Method: GET
Request:
http://{HOST}/arm/api/recoveryplan/invalidate?ids=1
Body param { id: 1244, messege:"ApplicationGroup is invalid", createdOn:123344, recoveryPlanId:1 }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Recovery Plan has been invalidated successfully", "responseData": "" }
sessionid Session Id as a header parameter.
ids Recovery plan Ids that you want to invalidate.
getPortGroupsForRecoveryPlan
Use this API to fetch port groups for resource pools for hypervisor.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/fetchportgroups?serverid=3&resourcepoolid=8&portgroupname=port1
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "name": "VM Network", "vLanId": 0, "vSwitchName": "vSwitch0", "hostName": "172.16.10.160" }, { "name": "Management Network", "vLanId": 0, "vSwitchName": "vSwitch0", "hostName": "172.16.10.160" }, { "name": "act", "vLanId": 112, "vSwitchName": "vSwitch0", "hostName": "172.16.10.160" }, { "name": "160Switch", "vLanId": 150, "vSwitchName": "vSwitch1", "hostName": "172.16.10.160" }, { "name": "port1", "vLanId": 200, "vSwitchName": "vSwitch1", "hostName": "172.16.10.160" } ] }
serverid Server id from where you want to list port groups.
resourcepoolid Resource pools id whose port groups you want to list.
postGroupName Port group name that you want to execute from the list.
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 41
4
fetchDedupeAsycStatus
Use this API to get dedup async status for recovery plans.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/fetchdedupeasyncstatus
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": { "green": 3, "yellow": 0, "red": 0 } }
fetchRecoveryPlansByDeDupeAsyncStatus
Use this API to fetch recovery plans using dedup async status.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/fetchbydedupeasyncstatus?status=GREEN
Response:
{ { "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "recoveryPlanName": "rec1", "recoveryPlanId": 11, "deploymentPlatform": "platform", "managementServer": "172.16.10.132", "cdsIP": "172.16.10.30", "nextSchedule": "", "resourcePoolName": "QA‐JANA‐RP2", "organizationName": "cs1", "organizationId": 7, "state": "ReadyToRun", "editedOn": 1396913544101, "editedBy": "", "cdsId": 3, "scheduleId": 17, "serverid": 5, "serverName": "root", "armServerId": 9, "armServerName": "172.16.10.235", "portGroup": "Jana‐Port2", "resourcePoolId": "resgroup‐5603", "deDupeAsyncStatus": "GREEN", "nextFireTime": 0 }, { "recoveryPlanName": "rec2", "recoveryPlanId": 5122, "deploymentPlatform": "platform", "managementServer": "172.16.10.132", "cdsIP": "172.16.10.30", "nextSchedule": "", "resourcePoolName": "DemoPool‐2", "organizationName": "cs1", "organizationId": 7, "state": "ReadyToRun", "editedOn": 1396919052031, "editedBy": "", "cdsId": 3, "scheduleId": 5129, "serverid": 5, "serverName": "root", "armServerId": 9, "armServerName": "172.16.10.235", "portGroup": "Pavithra test", "resourcePoolId": "resgroup‐4771", "deDupeAsyncStatus": "GREEN", "nextFireTime": 0 }, { "recoveryPlanName": "rec3", "recoveryPlanId": 5130, "deploymentPlatform": "platform", "managementServer": "172.16.10.132", "cdsIP": "172.16.10.30", "nextSchedule": "", "resourcePoolName": "QA‐Testing‐RP3", "organizationName": "cs1", "organizationId": 7, "state": "ReadyToRun", "editedOn": 1396919086280, "editedBy": "", "cdsId": 3, "scheduleId": 5135, "serverid": 5, "serverName": "root", "armServerId": 9, "armServerName": "172.16.10.235", "portGroup": "Jana_Portgroup", "resourcePoolId": "resgroup‐4799", "deDupeAsyncStatus": "GREEN", "nextFireTime": 0 } ] }
sessionid Session Id as a header parameter.
status The deDupAsyncStatus (GREEN, YELLOW, RED) for which you want to fetch recovery plans.
Parameters Description
2 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
canelRecoveryPlanExecution
Use this API to cancel the recovery plan execution managed by Resiliency Director from application database. If the method parameter is null, the method returns invalid input exception. If the method parameter is not null, the method cancels only the recovery plan whose id is provided as an input.
Method: GET
Request
https://{HOST}/arm/api/recoveryplan/fetch?id=1 - To fetch recovery plans by id (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData":"" }
id Recovery plan id whose execution you want to cancel.
disableRecoveryPlan
Use this API to disable a recovery plan managed by the Resiliency Director from application database. If the method parameter is null, the method returns invalid input exception. If the method parameter is not null, the method disables only the recovery plan whose id have been provided as an input.
Method: GET
Request
https://{HOST}:{PORT}/arm/api/recoveryplan/disable?id=1 - To fetch and disable recovery plans by id(s) (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData":"" }
id Recovery plan id that you want to disable.
getFetchInvalidRecoveryPlanNotification
Use this API to fetch notifications for a state of recovery plans.
Method: GET
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 43
4
Request
https://{HOST}/arm/api/recoveryplan/fetchinvalidrecoveryplannotifications?recoveryplanids=1 - To fetch recovery plans by id (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "id":45, "messege":"Recovery plan has been invalidated due to change in application group", "createdOn":" ", "recoveryPlanId":1 } ] }
recoveryplanids Recovery plan id for which you want to fetch notifications.
executeSingleVMRecovery
Use this API to execute recovery of a single virtual machine with the provided virtual machine id and the recovery plan id it is a part of.
Method: POST
Request:
https://{HOST}/arm/api/recoveryplan/executesinglevm?recoveryplanid=1&vmid=21
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData":"" }
sessionid Session Id as a header parameter.
recoveryplanid Recovery plan id of which virtual machine is a part.
vmid Virtual machine id that you want to recover.
fetchVmExecutionStatus
Use this API to fetch virtual machine execution status details for the given application group id.
Method: GET
Request:
https://{HOST}/arm/api/recoveryplan/fetchvmexecutionstatus?applicationgroupid=1
Response:
Parameters Description
Parameters Description
4 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "memberOrderIndex": 1, "delay": 0, "preExternalScript": [], "postExternalScript": [], "vmExecutionDetails": [ { "vmId": 5134, "vmUuid": "502aee74‐a330‐3e10‐eddf‐d584ff387d51", "state": "", "executionMessage": "", "vmName": "_RD‐win2012‐106‐152", "vAppName": "", "preExternalScript": [], "postExternalScript": [], "critical": false }, { "vmId": 5137, "vmUuid": "5008d7f2‐4642‐23c9‐ddba‐beedae996970", "state": "", "executionMessage": "", "vmName": "_RD‐Dev‐22‐152", "vAppName": "", "preExternalScript": [], "postExternalScript": [], "critical": false } ] } ] }
sessionid Session Id as a header parameter.
applicationgroupid Application group id of which virtual machine is a part.
executeSingleScript
Use this API to execute script individually.
Method: POST
Request:
https://{HOST}/arm/api/recoveryplan/executesinglescript
{ "recoveryPlanId": 123, "scriptId": 126, "objectId": 125, "executionLevel": "application group", "scriptExecutionType": "pre" }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Single external script execution started successfully."}
sessionid Session Id as a header parameter.
scriptDetail Script details that you want to execute.
fetchVMForInvalidRecoveryPlan
Use this API to return List of VM for Invalid recovery plan.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/recoveryplan/fetchvmforinvalidrecoveryplan
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": {"peerRecoveryPlanId":"4152","listVMUUIDs":[5036e87c‐70ab‐99e4‐57d7‐4feba7716d89,5036dd4a‐295c‐b772‐7a37‐3e52575be153]} }
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 45
4
sessionid Session Id as a header parameter.
Parameters Description
6 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
Managing Alerts - IRestAlerts
This interface and corresponding APIs allow you to execute REST requests for alerts. This interface contains the following RESTful APIs:
getAlerts
getLatestAlerts
getAlerts
Use this API to fetch alerts from the Resiliency Director database. If the method parameter is null, the method returns all the alerts from database. If the method parameter is not null, the method returns only the alert(s) whose id(s) is provided as an input.
Method - GET
Request
https://{HOST}:{PORT}/arm/api/alerts/fetch - To fetch all recovery plans from database.
https://{HOST}:{PORT}/arm/api/alerts/fetch?ids=1,2,3 - To fetch alerts by id(s).
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ { "id" : 1, "description" : "Add actifio appliance for primary", "createdOn" : 454545, "entity" : "Actifio Appliance", "action" : "Add actifio appliance", "status" : "NEW" } ] }
ids Comma separated alert id(s) that you want to fetch.
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 47
4
getLatestAlerts
Use this API to fetch the alerts by offset and limit from the Resiliency Director database and past 24 event alerts from the Actifio appliance. If the method parameter is null, the method returns all alerts from database. If the method parameter is not null, the method returns only the limited alert(s) based on offset and limit.
Method - GET
Request
https://{HOST}:{PORT}/arm/api/alerts/fetchbyoffset?offset=1&limit=1 - To fetch alerts by offset and limit
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ { "id" : 4, "description" : "Add actifio appliance primary", "createdOn" :123128, "entity" : "Actifio Appliance", "action" : "Add actifio appliance", "status" : "NEW" } ] }
sessionid Session id as a header parameter.
offset Offset from which alerts needs to be read as query parameter.
limit Number of record needs to be fetched as query parameter.
Parameters Description
8 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
Viewing Logs - IRestLogs
This interface and corresponding APIs allow you to execute REST requests to Resiliency Director for Actifio appliance logs. This interface contains the following RESTful APIs:
fetchCDSLogs
getBRDLogFile
fetchCDSLogs
Use this API to fetch the Actifio appliance logs. The method returns the Actifio appliance logs whose id(s) is provided as an input.
Method - GET
Request
https://{HOST}:{PORT}/arm/api/logs/cds/fetch?id=1,2,3 - To fetch Actifio appliance logs by id (HTTPS).
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": [ { "id": "625504", "username": "admin", "component": "API", "status": "0", "issuedate": "2014‐03‐04 02:00:08.320", "proxy": "", "command": "apilogin admin calsoft", "privileged": "true", "ipaddress": "" } ] }
ids Actifio appliance id(s) for which you want to fetch the logs.
getBRDLogFile
Use this API to fetch the Resiliency Director log file.
Method - GET
Request
https://{HOST}:{PORT}/arm/api/logs/get
Response
Returns the compressed file for all the Resiliency Director logs.
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 49
5
Generating Reports - IRestReport
Thsi interface and corresponding APIs allow you to fetch reports. This interface contains the following RESTful APIs:
getReadinessReport
getRecoveryPlanReport
getResourceUsage
getRecoveyPlansByCustomer
fetchLoginAuditReport
fetchVMLevelDetailReport
getReadinessReport
Use this API to fetch readiness(es) for a recovery plan. If the method parameter is null, the method returns all the recovery plan from database. If the method parameter is not null, the method will return only the readiness(es) whose input have been provided.
Method: GET
Request:
https://{HOST}/arm/api/report/readiness?recid=12345&startdate=1/11/2013&enddate=2/11/2013 - To fetch readiness from database (HTTPS).
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "startDate": 1422860670013, "endDate": 1422860726810, "duration": "56 sec", "status": "Success", "detailMessage": "Recovery plan : 'test' completed execution with status : Success on : Mon Feb 02 07:05:26 UTC 2013", "strStartDate": "02/02/2013 07:04:30", "strEndDate": "02/02/2013 07:05:26" } ] }
recid Recovery plan id for which you want to retrieve a report.
startdate Start date of period.
enddate End date of period.
getRecoveryPlanReport
Use this API to fetch report of specific recovery plan in the given time period.
Method: GET
Request:
http://{HOST}/arm/api/report/recoveryplan?custid=1256&startdate=1/11/2013&enddate=2/11/2013
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "state": "ReadyToRun", "lastModified": 1422859264899, "recoveryPlanName": "qa_test", "nextSchedule": "", "startDate": 1422859264899, "endDate": 1422859264899, "storageServerIP": "172.29.10.60", "serverIP": "172.29.10.179", "strStartDate": "02/02/2015 06:41:04", "strEndDate": "02/02/2015 06:41:04" } ] }
Parameters Description
0 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
recid Recovery plan for which report is to retrieved.
startdate Start date of period.
enddate End date of period.
getResourceUsage
Use this API to fetch report of resource usage for the given customer in the given time period.
Method: GET
Request:
http://{HOST}:{PORT}/arm/api/report/resourceusage?custid=1233&startdate=2/11/2013&enddate=2/11/2013
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "allocatedMemory": 10428, "usedMemory": 512, "allocatedCPUs": 9898, "usedCPUs": 0, "cdsIp": "172.29.10.254", "storageUsage": "0.0", "recoveryPlanName": "test", "resourceName": "RP1", "serverIp": "172.29.10.179" } ] }
sessionid Session id as a header parameter.
custid List of schedule id(s) whose data you want to fetch.
startdate Start date for logs duration.
enddate End date for logs duration.
getRecoveyPlansByCustomer
Use this API to fetch report of recovery plans for the given customer.
Method: GET
Request:
http://{HOST}/arm/api/report/recoveryplans?custid=2323
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "startDate": 1394585431135, "endDate": 1394585431140, "duration": "5", "status": "Overall exection status", "detailMessage": "detail execution estatu" } ] }
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 51
5
sessionid Session id as a header parameter.
custid Customer id for which you want to retrieve a report.
fetchLoginAuditReport
Use this API to fetch report of audit logs for the given user name and in the specified start and end dates (in format MM/DD/YYYY).
Method: GET
Request:
https://{HOST}/arm/api/report/loginaudit?username=admin&startdate=01/30/2015&enddate=02/25/2015
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "auditid": 5209, "username": "admin", "action": "Login", "status": "", "starttime": 1422621343203, "endtime": 1422621343212, "serverIdentity": "secondary", "strStartDate": "01/30/2015 12:35:43", "strEndDate": "01/30/2015 12:35:43" } ] }
sessionid Session id as a header parameter.
username User name for which you want to retrieve logs.
startdate Start date for logs duration.
enddate End date for logs duration.
Parameters Description
Parameters Description
2 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
fetchVMLevelDetailReport
Use this API to fetch details of recovery plan execution at VM level including details of external scripts that have been executed.
Method: GET
Request:
https://{HOST}/arm/api/report/vmdetailreport?recoveryplanid=12
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully.", "responseData": [ { "appGroupName": "app_acme_test", "status": "Success", "statusMessage": "Application Group status : Success", "sequenceOrder": [ { "sequenceIndex": 1, "delayInSeconds": 0, "vmsInSequence": [ { "id": 0, "recoveryPlanId": 0, "recoveryPlanName": null, "startTime": 1421287108524, "endTime": 0, "status": "Virtual Machine recovered successfully.", "detailMessage": "Virtual Machine recovered successfully.", "executionMode": null, "strStartDate": null, "strEndDate": null, "appGroupName": null, "sequence": 0, "vmName": "RD‐QA‐84‐152", "vmLevelPreScripts": [], "vmLevelPostScripts": [] } ], "sequenceLevelPreScripts": [], "sequenceLevelPostScripts": [], "status": "Success", "statusMessage": "Application Group status : Success" } ], "appGroupLevelPreScripts": [ { "scriptId": 0, "executionOrder": 0, "scriptName": "netstat.sh", "status": null, "recoveryPlanId": 0, "objectId": 0, "executionLevel": null, "scriptExecutionType": "shell", "listExternalScriptExecutionStatusPerHostTO": [ { "hostTO": { "hostDataId": 0, "hostName": null, "ipAddress": "172.16.10.86", "sshPort": 0, "userName": null, "password": null }, "scriptExecutionStatus": "Success", "detailMessage": "" } ] }, { "scriptId": 0, "executionOrder": 0, "scriptName": "script2.sh", "status": null, "recoveryPlanId": 0, "objectId": 0, "executionLevel": null, "scriptExecutionType": "shell", "listExternalScriptExecutionStatusPerHostTO": [ { "hostTO": { "hostDataId": 0, "hostName": "172.16.10.86", "ipAddress": null, "sshPort": 0, "userName": null, "password": null }, "scriptExecutionStatus": "Failed", "detailMessage": "" }, { "hostTO": { "hostDataId": 0, "hostName": "172.16.10.193", "ipAddress": null, "sshPort": 0, "userName": null, "password": null }, "scriptExecutionStatus": "Failed", "detailMessage": "" } ] } ], "appGroupLevelPostScripts": [] } ] }
sessionid Session id as a header parameter.
recoveryplanid Recovery plan id for which you want to retrieve a report.
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 53
5
Fetching Client Properties - IRestClientProperties
This interface and corresponding API allows you to manage information of client properties. This interface contains the following RESTful API:
getIntervalProperties
getIntervalProperties
Use this API to fetch client properties in JSON format.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/clientproperties/fetch (HTTPS)
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", "responseData": {"dashboardTimeInterval":50000,"fetchStateInterval":10000} }
4 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
Managing Files - IRestFileManager
This interface and corresponding APIs allow you to manage scripts. This interface contains the following RESTful APIs:
deleteFileOnServer
deleteScriptsByIds
fetchFileListOnServer
uploadFile
getSupportedExternalScript
updateScriptHostData
deleteFileOnServer
Use this API to delete given script file from a file storage path as well as from Resiliency Director database.
Method: POST
Request:
https://{HOST}:{PORT}/arm/api/script/deletebyname?filename=deployLocalDB.sh
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", }
sessionid Session id as a header parameter.
filename Script filename
deleteScriptsByIds
Use this API to delete scripts with the given ids. It will remove respective entries from database and delete them physically. It also returns successfully deleted script names.
Method: POST
Request:
https://{HOST}:{PORT}/arm/api/script/deletebyids?ids=6169,1200
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "Operation performed successfully", }
sessionid Session Id as a header parameter.
ids Script id(s) using which you want to delete scripts.
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 55
5
fetchFileListOnServer
Use this API to get the details of scripts which are currently uploaded on the server.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/script/fetch
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "", }
sessionid Session id as a header parameter.
uploadFile
Use this API to upload script on server.
Method: POST
Request:
https://{HOST}:{PORT}/arm/api/script/upload?command=python&sizeinkb=1025&hostids=2145,6688
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": ""}
fileToUpload Script that you want to upload on the server.
Parameters Description
Parameters Description
6 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
getSupportedExternalScript
Use this API to get a supported external scripts.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/script/supportedscript
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "", "responseData": { "supportedExternalScript": [ { "scriptType": "python", "supportingOS": [ "Linux" ] }, ], "maxScriptSize": 1024, }
sessionid Session Id as a header parameter.
updateScriptHostData
Use this API to update script command and host data.
Method: POST
Request:
https://{HOST}:{PORT}/arm/api/script/update
{ "command":"shell", "scriptId":"2255", "hostId":"6688,5566" }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "", }
sessionid Session Id as a header parameter.
scriptHostDataToUpdate Host details for which you want to update script data.
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 57
5
Managing Host Information - IRestRemoteHost
This interface and corresponding APIs allow you to execute REST request to create, update and delete operations for host information. This interface contains the following RESTful APIs:
fetchRemoteHosts
addRemoteHost
updateRemoteHost
deleteRemoteHostsByIds
fetchRemoteHosts
Use this API to fetch remote host data for given ids. If ids found null then it will return all the hosts data.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/externalscript/host/fetch
https://{HOST}:{PORT}/arm/api/externalscript/host/fetch?ids=2145,1014
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "", "responseData": { "hostDataId":11265, "hostname":"gmail.com", "ipaddress":"142.15.25.36", "port":443, "username":null, "password":null } }
ids Host ids of which you want to fetch the data.
sessionid Session id as a header parameter.
addRemoteHost
Use this API to add remote host data.
Method: POST
Request:
https://{HOST}:{PORT}/arm/api/externalscript/host/add
{ "hostName":"gmail.com", "ipAddress":"172.316.22.36", "sshPort":443, "userName":"user", "password":"Password" }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": ""}
sessionid Session Id as a header parameter.
remoteHostToAdd Host details that you want to add.
Parameters Description
Parameters Description
8 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
updateRemoteHost
Use this API to update remote host data.
Method: POST
Request:
https://{HOST}:{PORT}/arm/api/externalscript/host/update
{ "hostDataId":21, "hostName":"gmail.com", "ipAddress":"172.316.22.36", "sshPort":443, "userName":"user", "password":"Password" }
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "", }
sessionid Session Id as a header parameter.
remoteHostToUpdate Host details that you want to update.
deleteRemoteHostsByIds
Use this API to delete remote host data by ids.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/externalscript/host/delete?ids=2145,1014
Response:
{ "status": "success", "statusCode": "1000", "statusMessage": "", "responseData":"[yahoo.co.in]" }
sessionid Session Id as a header parameter.
ids Host ids that you want to delete.
Parameters Description
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 59
6
IRestUpgrade
This interface contains the following RESTful APIs:
fetchNicNamesByUUIDFromCollector
addNicNamesForVMOnRdServer
fetchNicNamesByUUIDFromCollector
Use this API to fetch virtual machines NIC names identified by given UUIDs.
Method - POST
Request
https://{HOST}/arm/api/upgrade/fetchNicNamesByUUIDFromCollector
Body param { 5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f, 62238d31b‐2377‐0098‐9c1f‐f8dc3cab828f, 5008ddfb‐6f73‐0098‐9c1f‐f8dc323c828f }
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Application group added successfully.", "responseData": [ { "uuid" : "5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f", "nicNames" : "4000‐00:cd:34:09:56:ba‐1000E‐eth0 " }, { "uuid" : "5008ddfb‐6f73‐0098‐9c1f‐f8dc323c828f", "nicNames" : "4000‐00:cd:56:88:56:ba‐1000‐eth0 " }, { "uuid" : "62238d31b‐2377‐0098‐9c1f‐f8dc3cab828f", "nicNames" : "4000‐00:50:56:88:56:ba‐1000E‐Local Area Connection " } ] }
uuids Comma separated list of virtual machine UUIDs.
sessionid Session Id as a header parameter.
Parameters Description
0 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
addNicNamesForVMOnRdServer
Use this API to add virtual machines NIC names identified by UUIDs.
Method - POST
Request
https://{HOST}/arm/api/upgrade/addNicNamesForVMOnRdServer
Body param [ { "uuid" : "5008d31b‐6f73‐0098‐9c1f‐f8dc303b828f", "nicNames" : "4000‐00:cd:34:09:56:ba‐1000E‐eth0 " }, { "uuid" : "5008ddfb‐6f73‐0098‐9c1f‐f8dc323c828f", "nicNames" : "4000‐00:cd:56:88:56:ba‐1000‐eth0 " }, { "uuid" : "62238d31b‐2377‐0098‐9c1f‐f8dc3cab828f", "nicNames" : "4000‐00:50:56:88:56:ba‐1000E‐Local Area Connection " } ]
Response
{ "status": "success", "statusCode": "1000", "statusMessage": "Application group added successfully.", "responseData": "" }
UuidNickMap List of virtual machine UUIDs with NIC names.
sessionid Session Id as a header parameter.
Parameters Description
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 61
6
Downloading Help - IRestHelpFileDownload
This interface and corresponding RESTful API allows you to download the help file. This interface contains the following the RESTful API:
getHelpFile
getHelpFile
Use this API to download the help file given as query parameter.
Method: GET
Request:
https://{HOST}:{PORT}/arm/api/helpfile/download/ReleaseNote.pdf
Response:
Returns given file as PDF format.
Parameters Session id - As a header parameter.
file - File name to download.
sessionid Session Id as a header parameter.
file File name to download.
Parameters Description
2 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
Appendix A: JavaScript Example
var HOST = '172.29.10.195';
var NAME = 'admin';
var PASSWORD = 'password';
var SESSIONID = '';
var actifio = actifio || {};
actifio.version = new function() {
function getVersion() {
var config = {
method : actifio.ajax.GET
}
actifio.ajax.fireAjax(actifio.ajax.createUrl('version'),
versionSuccess, versionError, config);
}
function versionSuccess(response) {
console.log(JSON.stringify(response));
versionInfoCode = response.statusCode;
if (response.status == "success") {
var major = response.responseData.major;
var minor = response.responseData.minor;
console.log(major + minor);
} else {
console.log('error occured');
}
}
function versionError(response) {
console.log('error occured');
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 63
6
}
this.getVersion = getVersion;
}
actifio.session={
function login() {
var username = NAME;
var password = PASSWORD;
var data = '{"username":"' + username + '","password":"' + password
+ '"}';
var config = {
method : actifio.ajax.POST,
data : data
}
actifio.ajax.fireAjax(actifio.ajax.createUrl('login'),
loginSuccess, loginError, config);
}
function loginSuccess(response) {
console.log(JSON.stringify(response));
loginInfoCode = response.statusCode;
if (response.status == "success") {
var username = response.responseData.username;
SESSIONID = response.responseData.sessionid;
console.log(username + sSESSIONID);
} else {
4 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
console.log('error occured');
}
}
function loginError(response) {
console.log('error occured');
}
function logout() {
var config = {
method : actifio.ajax.GET
}
actifio.ajax.fireAjax(actifio.ajax.createUrl('logout', SESSIONID),
logoutSuccess, logoutError, config);
}
function logoutSuccess(response) {
console.log(JSON.stringify(response));
logoutInfoCode = response.statusCode;
if (response.status == "success") {
console.log('Logout successfull');
} else {
console.log('error occured');
}
}
function logoutError(response) {
console.log('error occured');
}
this.logout = logout;
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 65
6
this.login = login;
};
actifio.ajax = new function() {
function fireAjax(url, successFn, errorFn, config) {
config = config || {};
var ajaxConfig = {
type : config.method || 'GET',
dataType : 'json',
contentType : "application/json; charset=UTF‐8",
url : url,
data : config.data || {},
cache : config.cache || false,
async : config.async || true,
success : successFn,
error : errorFn
};
$.ajax(ajaxConfig);
}
function createUrl(request, query) {
var url = 'https://' + HOST + '/arm/api/' + request;
if (query) {
url += '?' + query.join('&');
}
return url;
}
this.fireAjax = fireAjax;
this.createUrl = createUrl;
6 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
this.GET = 'GET';
this.POST = 'POST';
}
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 67
6
Appendix B: Java Example
public class RestApi {
public static final String HOST = "172.29.10.195";
public static final String NAME = "admin";
public static final String PASSWORD = "password";
public RestApi() {
try {
// Create a trust manager that does not validate certificate chains
TrustManager[] trustAllCerts = new TrustManager[] { new
X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers()
{
return null;
}
public void checkClientTrusted(X509Certificate[] certs,
String authType) {
}
public void checkServerTrusted(X509Certificate[] certs,
String authType) {
}
} };
// Install the all‐trusting trust manager
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection
.setDefaultSSLSocketFactory(sc.getSocketFactory());
// Create all‐trusting host name verifier
HostnameVerifier allHostsValid = new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session) {
return true;
}
};
8 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
// Install the all‐trusting host verifier
HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (KeyManagementException e) {
e.printStackTrace();
}
}
public static void main(String[] args) throws JSONException {
RestApi api = new RestApi();
String sessionid = api.login(NAME, PASSWORD);
api.version();
api.logout(sessionid);
}
// Function to get version
public void version() {
String params = "";
String json = apiRequest("GET", "version", params);
System.out.println(json);
}
// Function for Login
public String login(String name, String password) throws JSONException {
JSONObject obj = new JSONObject();
try {
obj.put("username", name);
obj.put("password", password);
} catch (JSONException e) {
// TODO Auto‐generated catch block
e.printStackTrace();
}
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 69
7
String json = apiRequest("POST", "login", obj.toString());
JSONObject jObject = new JSONObject(json); // json
JSONObject data = jObject.getJSONObject("responseData");
String sessionid = data.getString("sessionid");
System.out.println("session id is: " + sessionid);
System.out.println(json);
return sessionid;
}
// Function for Logout
public void logout(String sessionid) {
StringBuilder urlbuilder = new StringBuilder();
urlbuilder.append("?");
urlbuilder.append("sessionid=" + sessionid);
urlbuilder.append("&");
// Get the json response
String json = apiRequest("GET", "logout", urlbuilder.toString());
System.out.println(json);
}
// Generate the URL from the parameters and return the response
private String apiRequest(String method, String apiCall, String param) {
BufferedReader bufferedReader = null;
String response = null;
try {
StringBuilder urlBuilder = new StringBuilder("https://" + HOST
+ "/arm/api/" + apiCall);
if (method == "GET") {
urlBuilder.append(param);
}
// Open connection
URL url = new URL(urlBuilder.toString());
0 | actifio.com |Using the Actifio Resiliency Director RESTful APIs
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
// Set GET or POST
connection.setRequestMethod(method);
connection.setRequestProperty("Content‐Type", "application/json");
if (method == "POST") {
connection.setDoOutput(true);
OutputStreamWriter writer = new OutputStreamWriter(
connection.getOutputStream());
writer.write(param);
writer.flush();
}
// Make request
connection.connect();
// Read json from proper stream
if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {
bufferedReader = new BufferedReader(new InputStreamReader(
connection.getInputStream()));
} else {
bufferedReader = new BufferedReader(new InputStreamReader(
connection.getErrorStream()));
}
response = bufferedReader.readLine();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
// Close BufferedReader
try {
| actifio.com | Using the Actifio Resiliency Director RESTful APIs 71
7
if (bufferedReader != null) {
bufferedReader.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
// Return the json
return response;
}
}
2 | actifio.com |Using the Actifio Resiliency Director RESTful APIs