master
Models
RequestsApi
All URIs are relative to https://api.ionos.com/cloudapi/v6
Method
HTTP request
Description
​RequestsFindById​
Get /requests/{requestId}
Retrieve requests
​RequestsGet​
Get /requests
List requests
​RequestsStatusGet​
Get /requests/{requestId}/status
Retrieve request status

RequestsFindById

1
var result Request = RequestsFindById(ctx, requestId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Retrieve requests

Example

1
package main
2
​
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
​
10
func main() {
11
requestId := "requestId_example" // string | The unique ID of the request.
12
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
13
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)
14
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
15
​
16
configuration := openapiclient.NewConfiguration()
17
apiClient := openapiclient.NewAPIClient(configuration)
18
resp, r, err := apiClient.RequestsApi.RequestsFindById(context.Background(), requestId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `RequestsApi.RequestsFindById``: %v\n", err)
21
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22
}
23
// response from `RequestsFindById`: Request
24
fmt.Fprintf(os.Stdout, "Response from `RequestsApi.RequestsFindById`: %v\n", resp)
25
}
Copied!

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiRequestsFindByIdRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
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]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
​

Return type

​Request​

HTTP request headers

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

RequestsGet

1
var result Requests = RequestsGet(ctx)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.FilterStatus(filterStatus)
6
.FilterCreatedAfter(filterCreatedAfter)
7
.FilterCreatedBefore(filterCreatedBefore)
8
.FilterCreatedDate(filterCreatedDate)
9
.FilterCreatedBy(filterCreatedBy)
10
.FilterEtag(filterEtag)
11
.FilterRequestStatus(filterRequestStatus)
12
.FilterMethod(filterMethod)
13
.FilterHeaders(filterHeaders)
14
.FilterBody(filterBody)
15
.FilterUrl(filterUrl)
16
.Offset(offset)
17
.Limit(limit)
18
.Execute()
Copied!
List requests

Example

1
package main
2
​
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
​
10
func main() {
11
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
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
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
14
filterStatus := "filterStatus_example" // string | Filter the list by request status [QUEUED, RUNNING, DONE, FAILED]. Filter is not affected by the depth query parameter. (optional)
15
filterCreatedAfter := "filterCreatedAfter_example" // string | Filter the list to only include the requests created after the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. (optional)
16
filterCreatedBefore := "filterCreatedBefore_example" // string | Filter the list to only include the requests created before the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. (optional)
17
filterCreatedDate := "filterCreatedDate_example" // string | Filter the list to only include the requests that contain the createdDate, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
18
filterCreatedBy := "filterCreatedBy_example" // string | Filter the list to only include the requests that contain the createdBy, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
19
filterEtag := "filterEtag_example" // string | Filter the list to only include the requests that contain the specified etag. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
20
filterRequestStatus := "filterRequestStatus_example" // string | Filter the list to only include the requests that contain the specified requestStatus. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
21
filterMethod := "filterMethod_example" // string | Filter the list to only include the requests that contain the specified method. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
22
filterHeaders := "filterHeaders_example" // string | Filter the list to only include the requests that contain the specified headers. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
23
filterBody := "filterBody_example" // string | Filter the list to only include the requests that contain the specified body. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
24
filterUrl := "filterUrl_example" // string | Filter the list to only include the requests that contain the specified URL. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
25
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
26
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
27
​
28
configuration := openapiclient.NewConfiguration()
29
apiClient := openapiclient.NewAPIClient(configuration)
30
resp, r, err := apiClient.RequestsApi.RequestsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).FilterStatus(filterStatus).FilterCreatedAfter(filterCreatedAfter).FilterCreatedBefore(filterCreatedBefore).FilterCreatedDate(filterCreatedDate).FilterCreatedBy(filterCreatedBy).FilterEtag(filterEtag).FilterRequestStatus(filterRequestStatus).FilterMethod(filterMethod).FilterHeaders(filterHeaders).FilterBody(filterBody).FilterUrl(filterUrl).Offset(offset).Limit(limit).Execute()
31
if err != nil {
32
fmt.Fprintf(os.Stderr, "Error when calling `RequestsApi.RequestsGet``: %v\n", err)
33
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
34
}
35
// response from `RequestsGet`: Requests
36
fmt.Fprintf(os.Stdout, "Response from `RequestsApi.RequestsGet`: %v\n", resp)
37
}
Copied!

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiRequestsGetRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
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]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
​
filterStatus
string
Filter the list by request status [QUEUED, RUNNING, DONE, FAILED]. Filter is not affected by the depth query parameter.
​
filterCreatedAfter
string
Filter the list to only include the requests created after the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter.
​
filterCreatedBefore
string
Filter the list to only include the requests created before the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter.
​
filterCreatedDate
string
Filter the list to only include the requests that contain the createdDate, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero.
​
filterCreatedBy
string
Filter the list to only include the requests that contain the createdBy, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero.
​
filterEtag
string
Filter the list to only include the requests that contain the specified etag. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero.
​
filterRequestStatus
string
Filter the list to only include the requests that contain the specified requestStatus. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero.
​
filterMethod
string
Filter the list to only include the requests that contain the specified method. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero.
​
filterHeaders
string
Filter the list to only include the requests that contain the specified headers. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero.
​
filterBody
string
Filter the list to only include the requests that contain the specified body. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero.
​
filterUrl
string
Filter the list to only include the requests that contain the specified URL. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero.
​
offset
int32
The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
[default to 0]
limit
int32
The maximum number of elements to return (use together with offset for pagination).
[default to 1000]

Return type

​Requests​

HTTP request headers

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

RequestsStatusGet

1
var result RequestStatus = RequestsStatusGet(ctx, requestId)
2
.Pretty(pretty)
3
.Depth(depth)
4
.XContractNumber(xContractNumber)
5
.Execute()
Copied!
Retrieve request status

Example

1
package main
2
​
3
import (
4
"context"
5
"fmt"
6
"os"
7
openapiclient "./openapi"
8
)
9
​
10
func main() {
11
requestId := "requestId_example" // string | The unique ID of the request.
12
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
13
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)
14
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
15
​
16
configuration := openapiclient.NewConfiguration()
17
apiClient := openapiclient.NewAPIClient(configuration)
18
resp, r, err := apiClient.RequestsApi.RequestsStatusGet(context.Background(), requestId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `RequestsApi.RequestsStatusGet``: %v\n", err)
21
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22
}
23
// response from `RequestsStatusGet`: RequestStatus
24
fmt.Fprintf(os.Stdout, "Response from `RequestsApi.RequestsStatusGet`: %v\n", resp)
25
}
Copied!

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiRequestsStatusGetRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[default to true]
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]
xContractNumber
int32
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
​

Return type

​RequestStatus​

HTTP request headers

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