All URIs are relative to https://api.upcloud.com/1.2
| Method | HTTP request | Description |
|---|---|---|
| attachStorage | POST /server/{serverId}/storage/attach | Attach storage |
| backupStorage | POST /storage/{storageId}/backup | Create backup |
| cancelOperation | POST /storage/{storageId}/cancel | Cancel storage operation |
| cloneStorage | POST /storage/{storageId}/clone | Clone storage |
| createStorage | POST /storage | Create storage |
| deleteStorage | DELETE /storage/{storageId} | Delete storage |
| detachStorage | POST /server/{serverId}/storage/detach | Detach storage |
| ejectCdrom | POST /server/{serverId}/cdrom/eject | Eject CD-ROM |
| favoriteStorage | POST /storage/{storageId}/favorite | Add storage to favorites |
| getStorageDetails | GET /storage/{storageId} | Get storage details |
| listStorageTypes | GET /storage/{type}/ | List of storages by type |
| listStorages | GET /storage | List of storages |
| loadCdrom | POST /server/{serverId}/storage/cdrom/load | Load CD-ROM |
| modifyStorage | PUT /storage/{storageId} | Modify storage |
| restoreStorage | POST /storage/{storageId}/restore | Restore backup |
| templatizeStorage | POST /storage/{storageId}/templatize | Templatize storage |
| unfavoriteStorage | DELETE /storage/{storageId}/favorite | Remove storage from favorites |
CreateServerResponse attachStorage(serverId, storageDevice)
Attach storage
Attaches a storage as a device to a server.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID serverId = new UUID(); // UUID | Server id
AttachStorageDeviceRequest storageDevice = new AttachStorageDeviceRequest(); // AttachStorageDeviceRequest |
try {
CreateServerResponse result = apiInstance.attachStorage(serverId, storageDevice);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#attachStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | UUID | Server id | |
| storageDevice | AttachStorageDeviceRequest |
- Content-Type: application/json
- Accept: application/json
CreateStorageResponse backupStorage(storageId, storage)
Create backup
Creates a point-in-time backup of a storage resource. For automatic, scheduled backups, see `backup_rule` in Create storage or Modify storage.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID storageId = new UUID(); // UUID | Storage id
CreateBackupStorageRequest storage = new CreateBackupStorageRequest(); // CreateBackupStorageRequest |
try {
CreateStorageResponse result = apiInstance.backupStorage(storageId, storage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#backupStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storageId | UUID | Storage id | |
| storage | CreateBackupStorageRequest |
- Content-Type: application/json
- Accept: application/json
cancelOperation(storageId)
Cancel storage operation
Cancels a running cloning operation and deletes the incomplete copy.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID storageId = new UUID(); // UUID | Strage id
try {
apiInstance.cancelOperation(storageId);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#cancelOperation");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storageId | UUID | Strage id |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateStorageResponse cloneStorage(storageId, storage)
Clone storage
Creates an exact copy of an existing storage resource.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID storageId = new UUID(); // UUID | Storage id
CloneStorageRequest storage = new CloneStorageRequest(); // CloneStorageRequest |
try {
CreateStorageResponse result = apiInstance.cloneStorage(storageId, storage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#cloneStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storageId | UUID | Storage id | |
| storage | CloneStorageRequest |
- Content-Type: application/json
- Accept: application/json
CreateStorageResponse createStorage(storage)
Create storage
Creates a new storage resource.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
CreateStorageRequest storage = new CreateStorageRequest(); // CreateStorageRequest |
try {
CreateStorageResponse result = apiInstance.createStorage(storage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#createStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storage | CreateStorageRequest |
- Content-Type: application/json
- Accept: application/json
deleteStorage(storageId)
Delete storage
Deleted an existing storage resource.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID storageId = new UUID(); // UUID |
try {
apiInstance.deleteStorage(storageId);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#deleteStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storageId | UUID |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateServerResponse detachStorage(serverId, storageDevice)
Detach storage
Detaches a storage resource from a server.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID serverId = new UUID(); // UUID | Server id
StorageDeviceDetachRequest storageDevice = new StorageDeviceDetachRequest(); // StorageDeviceDetachRequest |
try {
CreateServerResponse result = apiInstance.detachStorage(serverId, storageDevice);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#detachStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | UUID | 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.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID serverId = new UUID(); // UUID | Server id
try {
apiInstance.ejectCdrom(serverId);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#ejectCdrom");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | UUID | Server id |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
favoriteStorage(storageId)
Add storage to favorites
Adds a storage to the list of favorite storages. To list favorite storages, see List storages. This operations succeeds even if the storage is already on the list of favorites.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID storageId = new UUID(); // UUID | Storage id
try {
apiInstance.favoriteStorage(storageId);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#favoriteStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storageId | UUID | Storage id |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateStorageResponse getStorageDetails(storageId)
Get storage details
Returns detailed information about a specific storage resource.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID storageId = new UUID(); // UUID |
try {
CreateStorageResponse result = apiInstance.getStorageDetails(storageId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#getStorageDetails");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storageId | UUID |
- Content-Type: application/json
- Accept: application/json
SuccessStoragesResponse listStorageTypes(type)
List of storages by type
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
String type = "type_example"; // String | Storage's access type (`public` or `private`) or storage type (`normal`, `backup`, `cdrom` or `template`) or `favorite` status
try {
SuccessStoragesResponse result = apiInstance.listStorageTypes(type);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#listStorageTypes");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| type | String | Storage's access type (`public` or `private`) or storage type (`normal`, `backup`, `cdrom` or `template`) or `favorite` status | [enum: public, private, normal, backup, cdrom, template, favorite] |
- Content-Type: application/json
- Accept: application/json
SuccessStoragesResponse listStorages()
List of storages
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
try {
SuccessStoragesResponse result = apiInstance.listStorages();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#listStorages");
e.printStackTrace();
}This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
CreateServerResponse loadCdrom(serverId, storageDevice)
Load CD-ROM
Loads a storage as a CD-ROM in the CD-ROM device of a server.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID serverId = new UUID(); // UUID | Server id
StorageDeviceLoadRequest storageDevice = new StorageDeviceLoadRequest(); // StorageDeviceLoadRequest |
try {
CreateServerResponse result = apiInstance.loadCdrom(serverId, storageDevice);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#loadCdrom");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| serverId | UUID | Server id | |
| storageDevice | StorageDeviceLoadRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
CreateStorageResponse modifyStorage(storageId, storage)
Modify storage
Modifies an existing storage resource. This operation is used to rename or resize the storage.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID storageId = new UUID(); // UUID |
ModifyStorageRequest storage = new ModifyStorageRequest(); // ModifyStorageRequest |
try {
CreateStorageResponse result = apiInstance.modifyStorage(storageId, storage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#modifyStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storageId | UUID | ||
| storage | ModifyStorageRequest |
- Content-Type: application/json
- Accept: application/json
restoreStorage(storageId)
Restore backup
Restores the origin storage with data from the specified backup storage.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID storageId = new UUID(); // UUID | Storage id
try {
apiInstance.restoreStorage(storageId);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#restoreStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storageId | UUID | Storage id |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateStorageResponse templatizeStorage(storageId, storage)
Templatize storage
Creates an exact copy of an existing storage resource which can be used as a template for creating new servers.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID storageId = new UUID(); // UUID | Storage id
TemplitizeStorageRequest storage = new TemplitizeStorageRequest(); // TemplitizeStorageRequest |
try {
CreateStorageResponse result = apiInstance.templatizeStorage(storageId, storage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#templatizeStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storageId | UUID | Storage id | |
| storage | TemplitizeStorageRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
unfavoriteStorage(storageId)
Remove storage from favorites
Delete a storage from the list of favorite storages. To list favorite storages, see List storages. This operations succeeds even if the storage is already on the list of favorites.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.StorageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
StorageApi apiInstance = new StorageApi();
UUID storageId = new UUID(); // UUID | Storage id
try {
apiInstance.unfavoriteStorage(storageId);
} catch (ApiException e) {
System.err.println("Exception when calling StorageApi#unfavoriteStorage");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| storageId | UUID | Storage id |
null (empty response body)
- Content-Type: application/json
- Accept: application/json