master
Models
TemplatesApi
All URIs are relative to https://api.ionos.com/cloudapi/v6
Method
HTTP request
Description
Get /templates/{templateId}
Retrieve Cubes Templates
Get /templates
List Cubes Templates

TemplatesFindById

1
var result Template = TemplatesFindById(ctx, templateId)
2
.Depth(depth)
3
.Execute()
Copied!
Retrieve Cubes Templates

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
templateId := "templateId_example" // string | The unique Template ID.
12
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
13
14
configuration := openapiclient.NewConfiguration()
15
apiClient := openapiclient.NewAPIClient(configuration)
16
resp, r, err := apiClient.TemplatesApi.TemplatesFindById(context.Background(), templateId).Depth(depth).Execute()
17
if err != nil {
18
fmt.Fprintf(os.Stderr, "Error when calling `TemplatesApi.TemplatesFindById``: %v\n", err)
19
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
20
}
21
// response from `TemplatesFindById`: Template
22
fmt.Fprintf(os.Stdout, "Response from `TemplatesApi.TemplatesFindById`: %v\n", resp)
23
}
Copied!

Path Parameters

Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
templateId
string
The unique Template ID.

Other Parameters

Other parameters are passed through a pointer to a apiTemplatesFindByIdRequest struct via the builder pattern
Name
Type
Description
Notes
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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]

Return type

Template

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

TemplatesGet

1
var result Templates = TemplatesGet(ctx)
2
.Depth(depth)
3
.Execute()
Copied!
List Cubes Templates

Example

1
package main
2
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
10
func main() {
11
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
12
13
configuration := openapiclient.NewConfiguration()
14
apiClient := openapiclient.NewAPIClient(configuration)
15
resp, r, err := apiClient.TemplatesApi.TemplatesGet(context.Background()).Depth(depth).Execute()
16
if err != nil {
17
fmt.Fprintf(os.Stderr, "Error when calling `TemplatesApi.TemplatesGet``: %v\n", err)
18
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
19
}
20
// response from `TemplatesGet`: Templates
21
fmt.Fprintf(os.Stdout, "Response from `TemplatesApi.TemplatesGet`: %v\n", resp)
22
}
Copied!

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiTemplatesGetRequest struct via the builder pattern
Name
Type
Description
Notes
depth
int32
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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]

Return type

Templates

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json