All URIs are relative to https://dns.de-fra.ionos.com
Method
HTTP request
Description
Get /records
Retrieve all records
Delete /zones/{zoneId}/records/{recordId}
Delete a record
Get /zones/{zoneId}/records/{recordId}
Retrieve a record
Get /zones/{zoneId}/records
Retrieve records
Post /zones/{zoneId}/records
Create a record
Put /zones/{zoneId}/records/{recordId}
Ensure a record
RecordsGet
var result RecordReadList=RecordsGet(ctx) .FilterZoneId(filterZoneId) .FilterName(filterName) .FilterState(filterState) .Offset(offset) .Limit(limit) .Execute()
Retrieve all records
Example
packagemainimport ("context""fmt""os" ionoscloud "github.com/ionos-cloud/sdk-go-dns")funcmain() { filterZoneId := TODO // string | Filter used to fetch only the records that contain specified zoneId. (optional) filterName :="app"// string | Filter used to fetch only the records that contain specified record name. (optional) filterState := openapiclient.ProvisioningState("PROVISIONING") // ProvisioningState | Filter used to fetch only the records that are in certain state. (optional) offset :=int32(56) // int32 | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. (optional) (default to 0) limit :=int32(56) // int32 | The maximum number of elements to return. Use together with offset for pagination. (optional) (default to 100) configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.RecordsApi.RecordsGet(context.Background()).FilterZoneId(filterZoneId).FilterName(filterName).FilterState(filterState).Offset(offset).Limit(limit).Execute()if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `RecordsApi.RecordsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) }// response from `RecordsGet`: RecordReadList fmt.Fprintf(os.Stdout, "Response from `RecordsApi.RecordsGet`: %v\n", resource)}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiRecordsGetRequest struct via the builder pattern
Name
Type
Description
Notes
filterZoneId
Filter used to fetch only the records that contain specified zoneId.
filterName
string
Filter used to fetch only the records that contain specified record name.
filterState
Filter used to fetch only the records that are in certain state.
offset
int32
The first element (of the total list of elements) to include in the response. Use together with limit for pagination.
[default to 0]
limit
int32
The maximum number of elements to return. Use together with offset for pagination.