CloudEndure API

Important! The information provided in this section is for general guidance only. The information is provided on "AS IS" basis, with no guarantee of completeness, accuracy or timeliness, and without warranty or representations of any kind, expressed or implied. In no event will CloudEndure and/or its subsidiaries and/or their employees or service providers be liable to you or anyone else for any decision made or action taken in reliance on the information provided above or for any direct, indirect, consequential, special or similar damages (including any kind of loss), even if advised of the possibility of such damages. CloudEndure is not responsible for the update, validation or support of this information.

Accessing the API

You can use the CloudEndure API to perform a large variety of tasks within your CloudEndure AccountThe entity that signed up with CloudEndure., including managing:

The API allows for a great level of customization and automation. The API can be accessed through a Python based interface.

Understanding APIs

Application Program Interfaces (APIs) are sets of rules that allow programs to talk to each other that are used to retrieve data from remote websites. APIs are utilized by many websites in order to allow users to easily make changes or pull data without having to navigate through a user interface.

APIs are hosted on web servers and store all data in JSON format.

Users ask APIs for data through Requests, the web server that hosts the API replies to the user's Request via a Response. All API Responses are accompanied by status codes, which indicate a successful response or an error.

APIs utilize a variety of requests, such as GET (pull data), DELETE (delete data), PUSH (add data), etc.

The API consists of three parts:

Companies such as CloudEndure store API documentation on a server. This documentation lets users know the structure of the data on the server, allowing them to use that structure to manipulate the data.

APIs offer several benefits, including:

APIs are often used by programmers who are familiar with API terminology to:

All CloudEndure APIs are Public APIs, which are publicly available and are not in danger of breaking. CloudEndure does not utilize Private APIs.

API Structure

The first part of using the API is constructing the URL. You can refer to CloudEndure's API documentation for exact URL structures. The following example shows the URL structure for the login POST request:

https://console.cloudendure.com/api/latest/login

The following is the breakdown of the URL structure:

The API URL will change based on the Request you are trying to send. Each request has a specific URL.

RESTful API

CloudEndure utilizes a RESTFul (representational State Transfer) API in order to:

RESTful API takes advantage of HTTP methodologies to perform API commands. With RESTful API, networked components are resources that are requested.

RESTful API is based on the following architectural properties:

Using RESTFul API

RESTFul API is highly accessible. Every concept within the API is a Resource, including users, commands, machines, etc.

Every Resource is Addressable, meaning that it has a URI that is designed based on the hierarchical structure of our software.

Ex. Account/User/Project/Machine.

Every Resource can have multiple Representations (pdf, json, xml, jpg, etc.) The Representation is what is returned in response to a request.

All of the Resources in the API are accessed using the same interface. This interface utilized HTTP verbs in order to identify certain commands. RESTful API is built around utilizing HTTP verbs correctly, resulting in a smaller amount of commands and greater accessibility and ease of use for the end user.

HTTP Verbs

The following HTTP Verbs are utilized by the CloudEndure API:

GET

The GET command requests data from a specific Resource. The GET command is only used to retrieve data.

Ex.

Obtaining Information for a Specific Machine

GET - get: /projects/{projectId}/machines/{machineId}

DELETE

The DELETE command deletes a specified Resource.

Ex.

Deleting the CloudEndure AgentThe Agent is a software program that is installed on machines in the Source location that need to be migrated or replicated to the Target location. from a Machine

DELETE - delete: /projects/{projectId}/machines/{machineID}

POST

The POST command creates new Resources.

Ex.

Creating a new ProjectA Project is the basic organizational unit for running a CloudEndure solution.

POST - post: /projects

PATCH

The PATCH command is used to modify an existing Resource. The PATCH command body contains a set of instructions that describes how a Resource that is currently residing on the server should be modified to produce a new version.

Ex.

Updating a ProjectA Project is the basic organizational unit for running a CloudEndure solution.'s Blueprint

PATCH - patch: /projects/{projectId}/blueprints/{blueprintId}

API Strings

Each specific API action is achieved by inputting specific strings or values into the body of the Request.

Ex.

The post: /projects Request, which creates a new ProjectA Project is the basic organizational unit for running a CloudEndure solution. is achieved by inputting the following values:

{

"targetCloudId": "string", (the UUID of the Cloud)

"name": "string", (the name of your new ProjectA Project is the basic organizational unit for running a CloudEndure solution.)

"cloudCredentialsIDs": [ (the IDs of the cloud credentials to use with the ProjectA Project is the basic organizational unit for running a CloudEndure solution.)

"string"

],

"sourceRegion": "string", (the ID of the region to use as the SourceThe location of the Source machine; Currently either a specific Region or Other Infrastructure. infrastructure for the ProjectA Project is the basic organizational unit for running a CloudEndure solution.)

"replicationConfiguration": "string" (the ID of the replication configuration object to use to define the ProjectA Project is the basic organizational unit for running a CloudEndure solution.'s Replication SettingsIn the Console UI, a set of settings affecting the data replication process, including Replication Servers subnet and IP, data throttling, use dedicated replicator, use multiple connections, etc..)

}

Each "string" value requires manual input on your part in order to create a ProjectA Project is the basic organizational unit for running a CloudEndure solution. successfully. The CloudEndure API automatically generates the code needed and you only need to fill in the values.

Once the Request is sent, the API generates a Response. The Response for the post: /projects Request is as follows. Here, you will see a variety of new variables, which the API will generate for you.

{

"targetCloudId": "string", (the UUID of the Cloud)

"agentInstallationToken": "string", (the Installation Token associated with the ProjectA Project is the basic organizational unit for running a CloudEndure solution.)

"name": "string",

"cloudCredentialsIDs": [ (the IDs of the cloud credentials to use with the ProjectA Project is the basic organizational unit for running a CloudEndure solution.)

"string"

],

"sourceRegion": "string", (the ID of the region to use as the SourceThe location of the Source machine; Currently either a specific Region or Other Infrastructure. infrastructure for the ProjectA Project is the basic organizational unit for running a CloudEndure solution.)

"licensesIDs": [ (the IDs of LicensesAllows the installation of the Agent on one machine. One License enables one Agent. Licenses are a part of the License Package. associated with this ProjectA Project is the basic organizational unit for running a CloudEndure solution.)

"string"

],

"replicationReversed": true/false, (whether the replication has been reversed)

"replicationConfiguration": "string", (the ID of the region to use as the SourceThe location of the Source machine; Currently either a specific Region or Other Infrastructure. infrastructure for the ProjectA Project is the basic organizational unit for running a CloudEndure solution.)

"type": "MIGRATION/DR", (the ProjectA Project is the basic organizational unit for running a CloudEndure solution. type: CloudEndure MigrationThe CloudEndure solution that allows you to move data, applications, and other business elements from an onsite network or a cloud environment to another physical location or cloud environment. or Disaster RecoveryThe CloudEndure solution that enables the recovery or continuation of vital technology infrastructure and systems in case of a crippling event.)

"id": "string",

"features": { (a variety of advanced ProjectA Project is the basic organizational unit for running a CloudEndure solution. features)

"awsExtendedHddTypes": true,

"isDemo": true,

"pit": true,

"enableVolumeEncryption": true,

"drTier2": true

}

}

API Hierarchy

The CloudEndure API is governed by a strict hierarchy that repeats itself through all CloudEndure products. Everything within the CloudEndure universe starts with an AccountThe entity that signed up with CloudEndure.. The AccountThe entity that signed up with CloudEndure. is the main unit of organization, and everything else falls under it. All of the other facets of the system implicitly fall within your AccountThe entity that signed up with CloudEndure..

The AccountThe entity that signed up with CloudEndure. serves as the root directory of the API. You must log into the AccountThe entity that signed up with CloudEndure. using your credentials every time prior to using the API. Once you have logged into your AccountThe entity that signed up with CloudEndure., you can make changes within the resources that exist within an account, such as LicensesAllows the installation of the Agent on one machine. One License enables one Agent. Licenses are a part of the License Package., ProjectsA Project is the basic organizational unit for running a CloudEndure solution., Users, and CredentialsAccount login information, including the Username and Password.. These categories fall under the AccountThe entity that signed up with CloudEndure. and are unique to each individual AccountThe entity that signed up with CloudEndure..

Certain resources can be further broken down. ProjectsA Project is the basic organizational unit for running a CloudEndure solution. can be broken down into Machines and Replication. These can be further broken down into Machine actions and Blueprint settings as well as Replication actions and Replication SettingsIn the Console UI, a set of settings affecting the data replication process, including Replication Servers subnet and IP, data throttling, use dedicated replicator, use multiple connections, etc..

CloudEndure API Requests

CloudEndure's API is broken down by a hierarchical structure. Each category contains corresponding Requests. The categories CloudEndure utilizes are:

As the hierarchy states, some of these Requests can only be performed within the context of another requests (ex. Actions can only be performed within the confines of a certain ProjectA Project is the basic organizational unit for running a CloudEndure solution., Blueprints can only be modified within the confines of a certain Machine, within a certain ProjectA Project is the basic organizational unit for running a CloudEndure solution..) You can assign resources to one another (assign the resource of "Users" to the resource of "ProjectA Project is the basic organizational unit for running a CloudEndure solution.".

Logging In

You can log into the API through an iPython client or a browser-based extension such as Postman.

You will log into the API through the POST https://console.cloudendure.com/api/latest/login command and filling out the appropriate body arguments:

{

"username": "user@example.com", (your username)

"password": "pa$$word", (your password)

"agentInstallationToken": "string",

"googleOauthCode": "string"

}

Logging in Using the API Token

You can also log in using the API Token instead of your username and password.

To log in with the API Token, use the following API parameter:

{

"userApiToken":"<API TOKEN>"

}

You can obtain an API Token in the CloudEndure User ConsoleCloudEndure SaaS User Interface. A web-based UI for setting up, managing, and monitoring the Migration and Disaster Recovery solutions. by navigating to Setup & Info > OTHER SETTINGS > API Token

Note: When logging in, you need to enter your API token without the dashes.

Click on GENERATE NEW TOKEN to generate a new API Token.

Click on REGENERATE TOKEN to re-generate an API Token.

Navigating the API Interface

You can utilize the API by navigating to the Request you would like to initiate within the left-hand menu. The menu is divided into a variety of sections, including GENERAL, BLUEPRINT, ACTIONS, USERS, etc. Click on the appropriate section and choose the Request you want below.

The Request information will be pulled up within the central menu, displaying the Parameters needed to perform the Request.

The parameters will also show on the right-hand menu under the REQUEST SAMPLES tab (in the case of a multi-line Request.)

The right-hand menu will also show RESPONSE SAMPLES, which are the API's direct Response to the Request.

If can also click on the green highlighted X Request acknowledged line under the Responses header on the middle menu to see sample Responses.

API Response codes

All API Responses are returned as HTTP status codes. All successful Requests are returned with a code in the "200" range.

Certain API errors are also returned as status codes. These codes are generated when a common error occurs. You can use these codes to identify the exact issue that you are encountering.

The CloudEndure API always returns responses in the following format:

{

error:

message:

}

The error will correspond to an error code, while the message will provide details on why the error occurred.

The errors codes used by the CloudEndure API are:

Examples:

Successful API Response Codes include:

API Throttling

CloudEndure throttles UI API calls from each individual CloudEndure AccountThe entity that signed up with CloudEndure.. This limit exists in order to ensure that clients' automation efforts do not overload CloudEndure systems.

Each single CloudEndure AccountThe entity that signed up with CloudEndure. is limited to 200 API calls per minute. CloudEndure begins counting the minute after receiving the first API call. An AccountThe entity that signed up with CloudEndure. that exceeds this limit will receive a "429" error code. This limit cannot be altered.

In addition, CloudEndure separately throttles Login API calls. Each CloudEndure AccountThe entity that signed up with CloudEndure. is limited to 30 Login API calls per minute.

API Sample Scripts

Important! The information provided in this section is for general guidance only. The information is provided on "AS IS" basis, with no guarantee of completeness, accuracy or timeliness, and without warranty or representations of any kind, expressed or implied. In no event will CloudEndure and/or its subsidiaries and/or their employees or service providers be liable to you or anyone else for any decision made or action taken in reliance on the information provided above or for any direct, indirect, consequential, special or similar damages (including any kind of loss), even if advised of the possibility of such damages. CloudEndure is not responsible for the update, validation or support of scripts.

Note: CloudEndure has developed the following Python scripts to quickly automate different tasks within the API. Download the script and run it in a Python 2.7 environment.

CloudEndure has developed the following Python scripts to quickly automate different tasks within the API. Simply download the script and run it in a Python environment.

  1. CloudEndureAPIExample - Use this script to log into your AccountThe entity that signed up with CloudEndure. and print all of the machines in all of your ProjectA Project is the basic organizational unit for running a CloudEndure solution..
  2. get_installation_tokens - Use this script to create a CSV file with the ProjectA Project is the basic organizational unit for running a CloudEndure solution. name and its Installation Token.
  3. CE_AccountCredentials - Use this script to rotate the AWS credentials per ProjectA Project is the basic organizational unit for running a CloudEndure solution. according to the CSV input file..
  4. Mass blueprint setter (zip file with scripts and instructions) - Use this script to update the Blueprint for one or more machines in an account using a CSV input file.
  5. CloudEndure One Click Migration - Use this script to migrate SourceThe location of the Source machine; Currently either a specific Region or Other Infrastructure. machines by installing the CloudEndure AgentThe Agent is a software program that is installed on machines in the Source location that need to be migrated or replicated to the Target location., completing Data ReplicationThe process of copying all data blocks from selected disks on a Source Machine to Staging Disks., configuring Target machineThe Machine created during Test, Cutover or Recovery. Blueprint settings, and performing the CutoverThe process of transitioning from one system to a replacement system. of the machines as soon as replication is completed. Learn how to use this script in this video.
  6. Install Agent and Wait for Replication - Use this script to add SourceThe location of the Source machine; Currently either a specific Region or Other Infrastructure. machines by installing the CloudEndure AgentThe Agent is a software program that is installed on machines in the Source location that need to be migrated or replicated to the Target location., complete Data ReplicationThe process of copying all data blocks from selected disks on a Source Machine to Staging Disks., and configure Target machineThe Machine created during Test, Cutover or Recovery. Blueprint settings.
  7. Launch Target Machine - Use this script to launch TargetThe location where the Replication Server will be located and where Target machines will be created (as a result of Test, Cutover or Recovery). machines for existing SourceThe location of the Source machine; Currently either a specific Region or Other Infrastructure. machines.
  8. Report Replication Status - Use this script to verify the status of Data ReplicationThe process of copying all data blocks from selected disks on a Source Machine to Staging Disks..



©2020 COPYRIGHT CloudEndure - Terms of Service - Privacy Policy - AWS Vulnerability Reporting Guidelines - Report a Security Issue