POST /cloud/gateways
Configures a new cloud gateway on the 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, send the POST HTTP request to the URL of the /cloud/gateways resource.
HTTP Request
POST https://<Enterprise-Manager>:9398/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. For details, see Authentication and Security. |
Content-Type | True | Identifies the format of the request body message. Possible values:
|
Accept | False | Identifies the format of the response. Possible values:
If the request does not contain the header, the server will return the response in the XML format. |
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 REST API.
Important |
If you use the XML media type, make sure that the order of parameters in the request body is correct. For details, see request body examples in this section. |
The request body must contain the following elements:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
BackupServerIdOr | String | UID or DNS name of the backup server on which the cloud gateway must be created. This parameter is supported by previous versions of Veeam Backup Enterprise Manager REST API. In current version of REST 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 |
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' backup servers must communicate with the cloud gateway. By default, port number 6180 is used. | Yes | 0/1 |
NetworkType | CloudGatewayNetworking | Mode in which the cloud gateway must function. Possible values:
| 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 |
UID | UID of the backup server on which the cloud gateway must be created. | No | 0/1 |
For example:
XML Representation
<?xml version="1.0" encoding="utf-8"?> |
JSON Representation
{ "ServerHostName": "srv01.tech.local", "Description": "Cloud gateway server 01", "ExternalPort": 6180, "NetworkType": "Direct", "InternalPort": 6180, "BackupServerUid": "urn:veeam:BackupServer:29e5d158-1f58-44bc-bbaa-2752d787a91d" } |
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. Possible values:
|
Response Body
None.
Example
The example below creates a cloud gateway on the 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 https://localhost:9398/api/cloud/gateways
Request Headers: X-RestSvcSessionId NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj
Request Body: <?xml version="1.0" encoding="utf-8"?>
Response: 202 Accepted
Response Body: <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="https://localhost:9398/api/tasks/task-1"> |
To track the status of the operation, send the GET HTTP request to the URL of the received task resource:
Request: GET https://localhost:9398/api/tasks/task-1
Request Header: X-RestSvcSessionId NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj
Response: 200 OK
Response Body: <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="https://localhost:9398/api/tasks/task-1"> |