latest
Models
Powered By GitBook
RequestApi
All URIs are relative to https://api.ionos.com/cloudapi/v5
Method
HTTP request
Description
Get /requests/{requestId}
Retrieve a Request
Get /requests
List Requests
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 a Request

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 |
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
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
15
16
configuration := openapiclient.NewConfiguration()
17
api_client := openapiclient.NewAPIClient(configuration)
18
resp, r, err := api_client.RequestApi.RequestsFindById(context.Background(), requestId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `RequestApi.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 `RequestApi.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

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 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

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 response is pretty-printed (with indentation and new lines) (optional) (default to true)
12
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)
13
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
14
filterStatus := "filterStatus_example" // string | Request filter to fetch all requests based on a particular status [QUEUED, RUNNING, DONE, FAILED]. It doesn't depend on depth query parameter (optional)
15
filterCreatedAfter := "filterCreatedAfter_example" // string | Request filter to fetch all requests created after the specified date. It doesn't depend on depth query parameter. Date format e.g. 2021-01-01+00:00:00 (optional)
16
filterCreatedBefore := "filterCreatedBefore_example" // string | Request filter to fetch all requests created before the specified date. It doesn't depend on depth query parameter. Date format e.g. 2021-01-01+00:00:00 (optional)
17
filterCreatedDate := "filterCreatedDate_example" // string | Response filter to select and display only the requests that contains the specified createdDate. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0. Date format e.g. 2020-11-16T17:42:59Z (optional)
18
filterCreatedBy := "filterCreatedBy_example" // string | Response filter to select and display only the requests that contains the specified createdBy. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0. (optional)
19
filterEtag := "filterEtag_example" // string | Response filter to select and display only the requests that contains the specified etag. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0. (optional)
20
filterRequestStatus := "filterRequestStatus_example" // string | Response filter to select and display only the requests that contains the specified requestStatus. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0. (optional)
21
filterMethod := "filterMethod_example" // string | Response filter to select and display only the requests that contains the specified method. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0. (optional)
22
filterHeaders := "filterHeaders_example" // string | Response filter to select and display only the requests that contains the specified headers. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0. (optional)
23
filterBody := "filterBody_example" // string | Response filter to select and display only the requests that contains the specified body. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0. (optional)
24
filterUrl := "filterUrl_example" // string | Response filter to select and display only the requests that contains the specified url. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0. (optional)
25
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)
26
limit := int32(56) // int32 | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
27
28
configuration := openapiclient.NewConfiguration()
29
api_client := openapiclient.NewAPIClient(configuration)
30
resp, r, err := api_client.RequestApi.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 `RequestApi.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 `RequestApi.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 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
filterStatus
string
Request filter to fetch all requests based on a particular status [QUEUED, RUNNING, DONE, FAILED]. It doesn't depend on depth query parameter
filterCreatedAfter
string
Request filter to fetch all requests created after the specified date. It doesn't depend on depth query parameter. Date format e.g. 2021-01-01+00:00:00
filterCreatedBefore
string
Request filter to fetch all requests created before the specified date. It doesn't depend on depth query parameter. Date format e.g. 2021-01-01+00:00:00
filterCreatedDate
string
Response filter to select and display only the requests that contains the specified createdDate. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0. Date format e.g. 2020-11-16T17:42:59Z
filterCreatedBy
string
Response filter to select and display only the requests that contains the specified createdBy. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0.
filterEtag
string
Response filter to select and display only the requests that contains the specified etag. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0.
filterRequestStatus
string
Response filter to select and display only the requests that contains the specified requestStatus. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0.
filterMethod
string
Response filter to select and display only the requests that contains the specified method. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0.
filterHeaders
string
Response filter to select and display only the requests that contains the specified headers. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0.
filterBody
string
Response filter to select and display only the requests that contains the specified body. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0.
filterUrl
string
Response filter to select and display only the requests that contains the specified url. The value is case insensitive and it depends on depth query parameter that should have a value greater than 0.
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

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 |
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
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
15
16
configuration := openapiclient.NewConfiguration()
17
api_client := openapiclient.NewAPIClient(configuration)
18
resp, r, err := api_client.RequestApi.RequestsStatusGet(context.Background(), requestId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
19
if err != nil {
20
fmt.Fprintf(os.Stderr, "Error when calling `RequestApi.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 `RequestApi.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

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 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

HTTP request headers

    Content-Type: Not defined
    Accept: application/json
Last modified 14d ago