All URIs are relative to https://api.upcloud.com/1.2
| Method | HTTP request | Description |
|---|---|---|
| assignTag | POST /server/{serverId}/tag/{tagList} | Assign tag to a server |
| attachStorage | POST /server/{serverId}/storage/attach | Attach storage |
| createFirewallRule | POST /server/{serverId}/firewall_rule | Create firewall rule |
| createServer | POST /server | Create server |
| deleteFirewallRule | DELETE /server/{serverId}/firewall_rule/{firewallRuleNumber} | Remove firewall rule |
| deleteServer | DELETE /server/{serverId} | Delete server |
| detachStorage | POST /server/{serverId}/storage/detach | Detach storage |
| ejectCdrom | POST /server/{serverId}/cdrom/eject | Eject CD-ROM |
| getFirewallRule | GET /server/{serverId}/firewall_rule/{firewallRuleNumber} | Get firewall rule details |
| listServerConfigurations | GET /server_size | List server configurations |
| listServers | GET /server | List of servers |
| loadCdrom | POST /server/{serverId}/storage/cdrom/load | Load CD-ROM |
| modifyServer | PUT /server/{serverId} | Modify server |
| restartServer | POST /server/{serverId}/restart | Restart server |
| serverDetails | GET /server/{serverId} | Get server details |
| serverServerIdFirewallRuleGet | GET /server/{serverId}/firewall_rule | List firewall rules |
| startServer | POST /server/{serverId}/start | Start server |
| stopServer | POST /server/{serverId}/stop | Stop server |
| untag | POST /server/{serverId}/untag/{tagName} | Remove tag from server |
CreateServerResponse assignTag(serverId, tagList)
Assign tag to a server
Servers can be tagged with one or more tags. The tags used must exist
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.ServerApi();
var serverId = "serverId_example"; // String | Server id
var tagList = "tagList_example"; // String | List of tags
apiInstance.assignTag(serverId, tagList).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Server id | |
| tagList | String | List of tags |
- Content-Type: application/json
- Accept: application/json
CreateServerResponse attachStorage(serverId, storageDevice)
Attach storage
Attaches a storage as a device 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.ServerApi();
var serverId = "serverId_example"; // String | Server id
var storageDevice = new upcloud.AttachStorageDeviceRequest(); // AttachStorageDeviceRequest |
apiInstance.attachStorage(serverId, storageDevice).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Server id | |
| storageDevice | AttachStorageDeviceRequest |
- Content-Type: application/json
- Accept: application/json
FirewallRuleCreateResponse createFirewallRule(serverId, firewallRule)
Create firewall rule
Creates a new firewall rule
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.ServerApi();
var serverId = "serverId_example"; // String | Server id
var firewallRule = new upcloud.FirewallRuleRequest(); // FirewallRuleRequest |
apiInstance.createFirewallRule(serverId, firewallRule).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Server id | |
| firewallRule | FirewallRuleRequest |
- Content-Type: application/json
- Accept: application/json
CreateServerResponse createServer(opts)
Create server
Creates a new server instance.
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.ServerApi();
var opts = {
'server': new upcloud.CreateServerRequest() // CreateServerRequest |
};
apiInstance.createServer(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| server | CreateServerRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
deleteFirewallRule(serverId, firewallRuleNumber)
Remove firewall rule
Removes a firewall rule from a server. Firewall rules must be removed individually. The positions of remaining firewall rules will be adjusted after a rule is removed.
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.ServerApi();
var serverId = "serverId_example"; // String | Server id
var firewallRuleNumber = 3.4; // Number | Denotes the index of the firewall rule in the server's firewall rule list
apiInstance.deleteFirewallRule(serverId, firewallRuleNumber).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Server id | |
| firewallRuleNumber | Number | Denotes the index of the firewall rule in the server's firewall rule list |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteServer(serverId)
Delete 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.ServerApi();
var serverId = "serverId_example"; // String | Id of server to delete
apiInstance.deleteServer(serverId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Id of server to delete |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateServerResponse detachStorage(serverId, storageDevice)
Detach storage
Detaches a storage resource 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.ServerApi();
var serverId = "serverId_example"; // String | Server id
var storageDevice = new upcloud.StorageDeviceDetachRequest(); // StorageDeviceDetachRequest |
apiInstance.detachStorage(serverId, storageDevice).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Server id | |
| storageDevice | StorageDeviceDetachRequest |
- Content-Type: application/json
- Accept: application/json
ejectCdrom(serverId)
Eject CD-ROM
Ejects the storage from the CD-ROM device of 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.ServerApi();
var serverId = "serverId_example"; // String | Server id
apiInstance.ejectCdrom(serverId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Server id |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
FirewallRuleCreateResponse getFirewallRule(serverId, firewallRuleNumber)
Get firewall rule details
Returns detailed information about a specific firewall rule
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.ServerApi();
var serverId = "serverId_example"; // String | Server id
var firewallRuleNumber = 3.4; // Number | Denotes the index of the firewall rule in the server's firewall rule list
apiInstance.getFirewallRule(serverId, firewallRuleNumber).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Server id | |
| firewallRuleNumber | Number | Denotes the index of the firewall rule in the server's firewall rule list |
- Content-Type: application/json
- Accept: application/json
ConfigurationListResponse listServerConfigurations()
List server configurations
Returns a list of available server configurations. A server configuration consists of a combination of CPU core count and main memory amount. All servers are created using these configurations.
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.ServerApi();
apiInstance.listServerConfigurations().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
ServerListResponse listServers()
List of servers
Returns a list of all servers associated with the current 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.ServerApi();
apiInstance.listServers().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
CreateServerResponse loadCdrom(serverId, opts)
Load CD-ROM
Loads a storage as a CD-ROM in the CD-ROM device of 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.ServerApi();
var serverId = "serverId_example"; // String | Server id
var opts = {
'storageDevice': new upcloud.StorageDeviceLoadRequest() // StorageDeviceLoadRequest |
};
apiInstance.loadCdrom(serverId, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Server id | |
| storageDevice | StorageDeviceLoadRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
CreateServerResponse modifyServer(serverId, opts)
Modify 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.ServerApi();
var serverId = "serverId_example"; // String | Id of server to modify
var opts = {
'server': new upcloud.Server() // Server |
};
apiInstance.modifyServer(serverId, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Id of server to modify | |
| server | Server | [optional] |
- Content-Type: application/json
- Accept: application/json
CreateServerResponse restartServer(serverId, restartServer)
Restart server
Stops and starts a server. The server state must be `started`.
var upcloud = require('upcloud');
var apiInstance = new upcloud.ServerApi();
var serverId = "serverId_example"; // String | Id of server to restart
var restartServer = new upcloud.RestartServer(); // RestartServer |
apiInstance.restartServer(serverId, restartServer).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Id of server to restart | |
| restartServer | RestartServer |
No authorization required
- Content-Type: application/json
- Accept: application/json
CreateServerResponse serverDetails(serverId)
Get server details
Returns detailed information about a specific 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.ServerApi();
var serverId = "serverId_example"; // String | Id of server to return
apiInstance.serverDetails(serverId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Id of server to return |
- Content-Type: application/json
- Accept: application/json
FirewallRuleListResponse serverServerIdFirewallRuleGet(serverId, )
List firewall rules
Returns a list of firewall rules for a specific 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.ServerApi();
var serverId = "serverId_example"; // String | Server id
apiInstance.serverServerIdFirewallRuleGet(serverId, ).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Server id |
- Content-Type: application/json
- Accept: application/json
CreateServerResponse startServer(serverId)
Start server
Starts a stopped server. The server state must be `stopped`.
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.ServerApi();
var serverId = "serverId_example"; // String | Id of server to start
apiInstance.startServer(serverId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Id of server to start |
- Content-Type: application/json
- Accept: application/json
CreateServerResponse stopServer(serverId, stopServerRequest)
Stop server
Stops a started server. The server state must be `started`.
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.ServerApi();
var serverId = "serverId_example"; // String | Id of server to stop
var stopServerRequest = new upcloud.StopServer(); // StopServer |
apiInstance.stopServer(serverId, stopServerRequest).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Id of server to stop | |
| stopServerRequest | StopServer |
- Content-Type: application/json
- Accept: application/json
CreateServerResponse untag(serverId, tagName)
Remove tag from server
Untags tags from given server. The tag(s) must exist
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.ServerApi();
var serverId = "serverId_example"; // String | Server id
var tagName = "tagName_example"; // String | Tag name
apiInstance.untag(serverId, tagName).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | String | Server id | |
| tagName | String | Tag name |
- Content-Type: application/json
- Accept: application/json