Models

ImageApi

ImageApi

All URIs are relative to https://api.ionos.com/cloudapi/v5

Method

HTTP request

Description

imagesDelete

DELETE /images/{imageId}

Delete an Image

imagesFindById

GET /images/{imageId}

Retrieve an Image

imagesGet

GET /images

List Images

imagesPatch

PATCH /images/{imageId}

Partially modify an Image

imagesPut

PUT /images/{imageId}

Modify an Image

imagesDelete

Object imagesDelete(imageId, pretty, depth, xContractNumber)

Delete an Image

Deletes the specified image. This operation is permitted on private image only.

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ImageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ImageApi apiInstance = new ImageApi(defaultClient);
String imageId = "imageId_example"; // String |
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Object result = apiInstance.imagesDelete(imageId, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ImageApi#imagesDelete");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

imageId

String

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional] [default to 0]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Object

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

imagesFindById

Image imagesFindById(imageId, pretty, depth, xContractNumber)

Retrieve an Image

Retrieves the attributes of a given image.

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ImageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ImageApi apiInstance = new ImageApi(defaultClient);
String imageId = "imageId_example"; // String |
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Image result = apiInstance.imagesFindById(imageId, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ImageApi#imagesFindById");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

imageId

String

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional] [default to 0]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Image

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

imagesGet

Images imagesGet(pretty, depth, xContractNumber)

List Images

Retrieve a list of images within the datacenter

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ImageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ImageApi apiInstance = new ImageApi(defaultClient);
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Images result = apiInstance.imagesGet(pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ImageApi#imagesGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional] [default to 0]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Images

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

imagesPatch

Image imagesPatch(imageId, image, pretty, depth, xContractNumber)

Partially modify an Image

You can use update attributes of a resource

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ImageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ImageApi apiInstance = new ImageApi(defaultClient);
String imageId = "imageId_example"; // String |
ImageProperties image = new ImageProperties(); // ImageProperties | Modified Image
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Image result = apiInstance.imagesPatch(imageId, image, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ImageApi#imagesPatch");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

imageId

String

image

ImageProperties

Modified Image

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional] [default to 0]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Image

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

imagesPut

Image imagesPut(imageId, image, pretty, depth, xContractNumber)

Modify an Image

You can use update attributes of a resource

Example

// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.ImageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic Authentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
ImageApi apiInstance = new ImageApi(defaultClient);
String imageId = "imageId_example"; // String |
Image image = new Image(); // Image | Modified Image
Boolean pretty = true; // Boolean | Controls whether response is pretty-printed (with indentation and new lines)
Integer depth = 0; // Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
Integer xContractNumber = 56; // Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
try {
Image result = apiInstance.imagesPut(imageId, image, pretty, depth, xContractNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ImageApi#imagesPut");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

Name

Type

Description

Notes

imageId

String

image

Image

Modified Image

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional] [default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional] [default to 0]

xContractNumber

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Image

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json