latest
Models
Powered By GitBook
ServerApi
All URIs are relative to https://api.ionos.com/cloudapi/v5
Method
HTTP request
Description
Delete /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}
Detach a CD-ROM
Get /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}
Retrieve an attached CD-ROM
Get /datacenters/{datacenterId}/servers/{serverId}/cdroms
List attached CD-ROMs
Post /datacenters/{datacenterId}/servers/{serverId}/cdroms
Attach a CD-ROM
Delete /datacenters/{datacenterId}/servers/{serverId}
Delete a Server
Get /datacenters/{datacenterId}/servers/{serverId}
Retrieve a Server
Get /datacenters/{datacenterId}/servers
List Servers
Patch /datacenters/{datacenterId}/servers/{serverId}
Partially modify a Server
Post /datacenters/{datacenterId}/servers
Create a Server
Put /datacenters/{datacenterId}/servers/{serverId}
Modify a Server
Post /datacenters/{datacenterId}/servers/{serverId}/reboot
Reboot a Server
Post /datacenters/{datacenterId}/servers/{serverId}/start
Start a Server
Post /datacenters/{datacenterId}/servers/{serverId}/stop
Stop a Server
Post /datacenters/{datacenterId}/servers/{serverId}/upgrade
Upgrade a Server
Delete /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}
Detach a volume
Get /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}
Retrieve an attached volume
Get /datacenters/{datacenterId}/servers/{serverId}/volumes
List Attached Volumes
Post /datacenters/{datacenterId}/servers/{serverId}/volumes
Attach a volume

DatacentersServersCdromsDelete

1
var result map[string]interface{} = DatacentersServersCdromsDelete(ctx, datacenterId, serverId, cdromId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Detach a CD-ROM

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
12
serverId := "serverId_example" // string | The unique ID of the Server
13
cdromId := "cdromId_example" // string | The unique ID of the CD-ROM
14
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
15
depth := int32(56) // int32 | 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)
16
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
17
18
configuration := openapiclient.NewConfiguration()
19
api_client := openapiclient.NewAPIClient(configuration)
20
resp, r, err := api_client.ServerApi.DatacentersServersCdromsDelete(context.Background(), datacenterId, serverId, cdromId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
21
if err != nil {
22
fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.DatacentersServersCdromsDelete``: %v\n", err)
23
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24
}
25
// response from `DatacentersServersCdromsDelete`: map[string]interface{}
26
fmt.Fprintf(os.Stdout, "Response from `ServerApi.DatacentersServersCdromsDelete`: %v\n", resp)
27
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the Datacenter
serverId
string
The unique ID of the Server
cdromId
string
The unique ID of the CD-ROM

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersCdromsDeleteRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
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
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

map[string]interface{}

HTTP request headers

    Content-Type: Not defined
    Accept: application/json

DatacentersServersCdromsFindById

1
var result Image = DatacentersServersCdromsFindById(ctx, datacenterId, serverId, cdromId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Retrieve an attached CD-ROM

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
12
serverId := "serverId_example" // string | The unique ID of the Server
13
cdromId := "cdromId_example" // string | The unique ID of the CD-ROM
14
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
15
depth := int32(56) // int32 | 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)
16
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
17
18
configuration := openapiclient.NewConfiguration()
19
api_client := openapiclient.NewAPIClient(configuration)
20
resp, r, err := api_client.ServerApi.DatacentersServersCdromsFindById(context.Background(), datacenterId, serverId, cdromId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
21
if err != nil {
22
fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.DatacentersServersCdromsFindById``: %v\n", err)
23
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24
}
25
// response from `DatacentersServersCdromsFindById`: Image
26
fmt.Fprintf(os.Stdout, "Response from `ServerApi.DatacentersServersCdromsFindById`: %v\n", resp)
27
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the Datacenter
serverId
string
The unique ID of the Server
cdromId
string
The unique ID of the CD-ROM

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersCdromsFindByIdRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
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
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

Image

HTTP request headers

    Content-Type: Not defined
    Accept: application/json

DatacentersServersCdromsGet

1
var result Cdroms = DatacentersServersCdromsGet(ctx, datacenterId, serverId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Offset(offset)
6
.Limit(limit)
7
.Execute()
Copied!
List attached CD-ROMs

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
12
serverId := "serverId_example" // string | The unique ID of the Server
13
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
14
depth := int32(56) // int32 | 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)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
offset := int32(56) // int32 | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (optional) (default to 0)
17
limit := int32(56) // int32 | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
18
19
configuration := openapiclient.NewConfiguration()
20
api_client := openapiclient.NewAPIClient(configuration)
21
resp, r, err := api_client.ServerApi.DatacentersServersCdromsGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
22
if err != nil {
23
fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.DatacentersServersCdromsGet``: %v\n", err)
24
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25
}
26
// response from `DatacentersServersCdromsGet`: Cdroms
27
fmt.Fprintf(os.Stdout, "Response from `ServerApi.DatacentersServersCdromsGet`: %v\n", resp)
28
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the Datacenter
serverId
string
The unique ID of the Server

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersCdromsGetRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
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
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
offset
int32
the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
[default to 0]
limit
int32
the maximum number of elements to return (use together with <code>offset</code> for pagination)
[default to 1000]

Return type

Cdroms

HTTP request headers

    Content-Type: Not defined
    Accept: application/json

DatacentersServersCdromsPost

1
var result Image = DatacentersServersCdromsPost(ctx, datacenterId, serverId)
2
.Cdrom(cdrom)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Attach a CD-ROM

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the Datacenter
12
serverId := "serverId_example" // string | The unique ID of the Server
13
cdrom := *openapiclient.NewImage(*openapiclient.NewImageProperties("LINUX")) // Image | CD-ROM to be attached
14
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
15
depth := int32(56) // int32 | 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)
16
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
17
18
configuration := openapiclient.NewConfiguration()
19
api_client := openapiclient.NewAPIClient(configuration)
20
resp, r, err := api_client.ServerApi.DatacentersServersCdromsPost(context.Background(), datacenterId, serverId).Cdrom(cdrom).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
21
if err != nil {
22
fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.DatacentersServersCdromsPost``: %v\n", err)
23
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24
}
25
// response from `DatacentersServersCdromsPost`: Image
26
fmt.Fprintf(os.Stdout, "Response from `ServerApi.DatacentersServersCdromsPost`: %v\n", resp)
27
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the Datacenter
serverId
string
The unique ID of the Server

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersCdromsPostRequest struct via the builder pattern
Name
Type
Description
Notes
cdrom
Image
CD-ROM to be attached
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
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
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

Image

HTTP request headers

    Content-Type: application/json
    Accept: application/json

DatacentersServersDelete

1
var result map[string]interface{} = DatacentersServersDelete(ctx, datacenterId, serverId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Delete a Server

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
serverId := "serverId_example" // string | The unique ID of the Server
13
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
14
depth := int32(56) // int32 | 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)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
17
configuration := openapiclient.NewConfiguration()
18
api_client := openapiclient.NewAPIClient(configuration)
19
resp, r, err := api_client.ServerApi.DatacentersServersDelete(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.DatacentersServersDelete``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `DatacentersServersDelete`: map[string]interface{}
25
fmt.Fprintf(os.Stdout, "Response from `ServerApi.DatacentersServersDelete`: %v\n", resp)
26
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
serverId
string
The unique ID of the Server

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersDeleteRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
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
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

map[string]interface{}

HTTP request headers

    Content-Type: Not defined
    Accept: application/json

DatacentersServersFindById

1
var result Server = DatacentersServersFindById(ctx, datacenterId, serverId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Retrieve a Server

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
serverId := "serverId_example" // string | The unique ID of the Server
13
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
14
depth := int32(56) // int32 | 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)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
17
configuration := openapiclient.NewConfiguration()
18
api_client := openapiclient.NewAPIClient(configuration)
19
resp, r, err := api_client.ServerApi.DatacentersServersFindById(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
20
if err != nil {
21
fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.DatacentersServersFindById``: %v\n", err)
22
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23
}
24
// response from `DatacentersServersFindById`: Server
25
fmt.Fprintf(os.Stdout, "Response from `ServerApi.DatacentersServersFindById`: %v\n", resp)
26
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
serverId
string
The unique ID of the Server

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersFindByIdRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
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
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed

Return type

Server

HTTP request headers

    Content-Type: Not defined
    Accept: application/json

DatacentersServersGet

1
var result Servers = DatacentersServersGet(ctx, datacenterId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.UpgradeNeeded(upgradeNeeded)
5
.XContractNumber(xContractNumber)
6
.Offset(offset)
7
.Limit(limit)
8
.Execute()
Copied!
List Servers

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
13
depth := int32(56) // int32 | 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)
14
upgradeNeeded := true // bool | It can be used to filter which servers can be upgraded which can not be upgraded. (optional)
15
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
16
offset := int32(56) // int32 | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (optional) (default to 0)
17
limit := int32(56) // int32 | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
18
19
configuration := openapiclient.NewConfiguration()
20
api_client := openapiclient.NewAPIClient(configuration)
21
resp, r, err := api_client.ServerApi.DatacentersServersGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).UpgradeNeeded(upgradeNeeded).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
22
if err != nil {
23
fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.DatacentersServersGet``: %v\n", err)
24
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25
}
26
// response from `DatacentersServersGet`: Servers
27
fmt.Fprintf(os.Stdout, "Response from `ServerApi.DatacentersServersGet`: %v\n", resp)
28
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersGetRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
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
[default to 0]
upgradeNeeded
bool
It can be used to filter which servers can be upgraded which can not be upgraded.
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
offset
int32
the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
[default to 0]
limit
int32
the maximum number of elements to return (use together with <code>offset</code> for pagination)
[default to 1000]

Return type

Servers

HTTP request headers

    Content-Type: Not defined
    Accept: application/json

DatacentersServersPatch

1
var result Server = DatacentersServersPatch(ctx, datacenterId, serverId)
2
.Server(server)
3
.Pretty(pretty)
4
.Depth(depth)
5
.XContractNumber(xContractNumber)
6
.Execute()
Copied!
Partially modify a Server

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
12
serverId := "serverId_example" // string | The unique ID of the server
13
server := *openapiclient.NewServerProperties(int32(4), int32(4096)) // ServerProperties | Modified properties of Server
14
pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
15
depth := int32(56) // int32 | 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)
16
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
17
18
configuration := openapiclient.NewConfiguration()
19
api_client := openapiclient.NewAPIClient(configuration)
20
resp, r, err := api_client.ServerApi.DatacentersServersPatch(context.Background(), datacenterId, serverId).Server(server).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
21
if err != nil {
22
fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.DatacentersServersPatch``: %v\n", err)
23
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24
}
25
// response from `DatacentersServersPatch`: Server
26
fmt.Fprintf(os.Stdout, "Response from `ServerApi.DatacentersServersPatch`: %v\n", resp)
27
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
serverId
string
The unique ID of the server

Other Parameters

Other parameters are passed through a pointer to a apiDatacentersServersPatchRequest struct via the builder pattern
Name
Type
Description
Notes
server
Modified properties of Server
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
<