All URIs are relative to https://api.upcloud.com/1.2
Method | HTTP request | Description |
---|---|---|
addIp | POST /ip_address | Assign IP address |
deleteIp | DELETE /ip_address/{ip} | Release IP address |
getDetails | GET /ip_address/{ip} | Get IP address details |
listIps | GET /ip_address | List IP addresses |
modifyIp | PUT /ip_address/{ip} | Modify IP address |
AssignIpResponse addIp(opts)
Assign IP address
Assigns a new IP address to a server.
var upcloud = require('upcloud');
var defaultClient = upcloud.ApiClient.instance;
// Configure HTTP basic authorization: baseAuth
var baseAuth = defaultClient.authentications['baseAuth'];
baseAuth.username = 'YOUR USERNAME';
baseAuth.password = 'YOUR PASSWORD';
var apiInstance = new upcloud.IPAddressApi();
var opts = {
'ipAddress': new upcloud.AddIpRequest() // AddIpRequest |
};
apiInstance.addIp(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
ipAddress | AddIpRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
deleteIp(ip)
Release IP address
Removes an IP address from a server.
var upcloud = require('upcloud');
var defaultClient = upcloud.ApiClient.instance;
// Configure HTTP basic authorization: baseAuth
var baseAuth = defaultClient.authentications['baseAuth'];
baseAuth.username = 'YOUR USERNAME';
baseAuth.password = 'YOUR PASSWORD';
var apiInstance = new upcloud.IPAddressApi();
var ip = "ip_example"; // String | Ip address
apiInstance.deleteIp(ip).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
ip | String | Ip address |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
AssignIpResponse getDetails(ip)
Get IP address details
Returns detailed information about a specific IP address.
var upcloud = require('upcloud');
var defaultClient = upcloud.ApiClient.instance;
// Configure HTTP basic authorization: baseAuth
var baseAuth = defaultClient.authentications['baseAuth'];
baseAuth.username = 'YOUR USERNAME';
baseAuth.password = 'YOUR PASSWORD';
var apiInstance = new upcloud.IPAddressApi();
var ip = "ip_example"; // String | Ip address
apiInstance.getDetails(ip).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
ip | String | Ip address |
- Content-Type: application/json
- Accept: application/json
IpAddressListResponse listIps()
List IP addresses
Returns a list of all IP addresses assigned to servers on the current user account.
var upcloud = require('upcloud');
var defaultClient = upcloud.ApiClient.instance;
// Configure HTTP basic authorization: baseAuth
var baseAuth = defaultClient.authentications['baseAuth'];
baseAuth.username = 'YOUR USERNAME';
baseAuth.password = 'YOUR PASSWORD';
var apiInstance = new upcloud.IPAddressApi();
apiInstance.listIps().then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
AssignIpResponse modifyIp(ip, opts)
Modify IP address
Modifies the reverse DNS PTR record corresponding to an IP address. The PTR record can only be set to public IP address.
var upcloud = require('upcloud');
var defaultClient = upcloud.ApiClient.instance;
// Configure HTTP basic authorization: baseAuth
var baseAuth = defaultClient.authentications['baseAuth'];
baseAuth.username = 'YOUR USERNAME';
baseAuth.password = 'YOUR PASSWORD';
var apiInstance = new upcloud.IPAddressApi();
var ip = "ip_example"; // String | Ip address
var opts = {
'ipAddress': new upcloud.ModifyIpRequest() // ModifyIpRequest |
};
apiInstance.modifyIp(ip, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
ip | String | Ip address | |
ipAddress | ModifyIpRequest | [optional] |
- Content-Type: application/json
- Accept: application/json