Help Center
Choose product document...
Veeam Backup & Replication 9.5
RESTful API Reference

(POST) /cloud/gateways

Configures a new cloud gateway on the Veeam backup server connected to Veeam Backup Enterprise Manager.

To configure a cloud gateway, Veeam Backup & Replication assigns the cloud gateway role to a Microsoft Windows server. Note that the Microsoft Windows server must be added to the backup infrastructure beforehand.

Request

To create a new cloud gateway, you need to send the POST HTTP request to the URL of the /cloud/gateways resource.

HTTP Request

POST http://<Enterprise-Manager>:9399/api/cloud/gateways

Request Header

The request contains the following headers:

Header

Required

Description

X-RestSvcSessionId

True

The request requires authorization. In the header, the client must send a session ID copied from the server reply to the request creating a new logon session. To learn more, see Authentication and Security.

Request Body

In the request body, the client must send parameters for the new cloud gateway. The body of the request must conform to the XML Schema Definition of Veeam Backup Enterprise Manager RESTful API.

The request body must contain the following elements:

Element

Type

Description

Modifiable

Min/Max Occurrence

BackupServerIdOr
Name

String

UID or DNS name of the Veeam backup server on which the cloud gateway must be created.

This parameter is supported by previous versions of Veeam Backup Enterprise Manager RESTful API. In current version of RESTful API, it is recommended that the new BackupServerUid parameter is used in the request body.

No

0/1

ServerHostName

String

DNS name or IP address of the Microsoft Windows server to which the cloud gateway role must be assigned.

Yes

1/1

Description

String

Description for the cloud gateway.

Yes

0/1

IncomingPort

UShort

Port on the NAT gateway used for listening to connections from users. By default, port 8080 is used. This parameter must be specified if the cloud gateway is located behind the NAT.

Yes

0/1

ExternalIp

String

External IP address of the NAT gateway. This parameter must be specified if the cloud gateway is located behind the NAT.

Yes

0/1

ExternalPort

UShort

TCP/IP port over which users' Veeam backup servers must communicate with the cloud gateway. By default, port number 6180 is used.

Yes

0/1

NetworkType

CloudGatewayNetworking
Mode

Mode in which the cloud gateway must function. Possible values:

  • Direct (if clients have a direct connection to the cloud gateway)
  • NAT (if the cloud gateway is located behind the NAT)

Yes

1/1

InternalPort

UShort

Port on the NAT gateway used for listening to connections from users. By default, port 8080 is used. This parameter must be specified if the cloud gateway is located behind the NAT.

Yes

0/1

BackupServerUid

UID

UID of the Veeam backup server on which the cloud gateway must be created.

No

0/1

For example:

<?xml version="1.0" encoding="utf-8"?>
<CreateCloudGatewaySpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <ServerHostName>srv01.veeam.local</ServerHostName>
 <Description>Cloud gateway server 01</Description>
 <ExternalPort>6180</ExternalPort>
 <NetworkType>Direct</NetworkType>
 <InternalPort>6180</InternalPort>
 <BackupServerUid>urn:veeam:BackupServer:29e5d158-1f58-44bc-bbaa-2752d787a91d</BackupServerUid>
</CreateCloudGatewaySpec>

Query Parameters

None.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns response code 202 Accepted.

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTP headers.

Header

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the request body message: application/xml.

Response Body

None.

Example

The example below creates a cloud gateway on the Veeam backup server having UID urn:veeam:BackupServer:29e5d158-1f58-44bc-bbaa-2752d787a91d. The cloud gateway role is assigned to a Microsoft Windows machine that has IP address 172.16.13.119.

Request:

POST http://localhost:9399/api/cloud/gateways

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Request Body:

<?xml version="1.0" encoding="utf-8"?>
<CreateCloudGatewaySpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <ServerHostName>172.16.13.119</ServerHostName>
 <Description>Cloud gateway server 01</Description>
 <ExternalPort>6180</ExternalPort>
 <NetworkType>Direct</NetworkType>
 <InternalPort>6180</InternalPort>
 <BackupServerUid>urn:veeam:BackupServer:29e5d158-1f58-44bc-bbaa-2752d787a91d</BackupServerUid>
</CreateCloudGatewaySpec>

 

Response:

202 Accepted

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
 <Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Running</State>
 <Operation>CreateCloudGateway</Operation>
</Task>

To trace the status of the operation, send the GET HTTP request to the URL of the received task resource:

Request:

GET http://localhost:9399/api/tasks/task-1

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Response:

200 Success

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
 <Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
   <Link Rel="Related" Type="CloudGateway" Href="http://localhost:9399/api/cloud/gateways/917be225-6744-4777-8096-cbabaec55006?format=Entity" Name="" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Finished</State>
 <Operation>CreateCloudGateway</Operation>
 <Result Success="true">
   <Message>Ok</Message>
 </Result>
</Task>

 

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Endpoint Backup Documentation

Veeam Management Pack Documentation