> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/go/go-bundle/sdks/psql/api/backuplocationsapi.md).

# BackupLocationsApi

All URIs are relative to *<https://postgresql.de-txl.ionos.com>*

| Method                                                  | HTTP request                                 | Description                  |
| ------------------------------------------------------- | -------------------------------------------- | ---------------------------- |
| [**BackuplocationsFindById**](#BackuplocationsFindById) | **Get** /backup-locations/{backupLocationId} | Retrieve BackupLocation      |
| [**BackuplocationsGet**](#BackuplocationsGet)           | **Get** /backup-locations                    | Retrieve all BackupLocations |

## BackuplocationsFindById

```go
var result BackupLocationRead = BackuplocationsFindById(ctx, backupLocationId)
                      .Execute()
```

Retrieve BackupLocation

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    psql "github.com/ionos-cloud/sdk-go-bundle/products/psql"
    "github.com/ionos-cloud/sdk-go-bundle/shared"
)

func main() {
    backupLocationId := "7fa1dd11-59dd-53a5-ab67-50f649c8e3eb" // string | The ID (UUID) of the BackupLocation.

    configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := psql.NewAPIClient(configuration)
    resource, resp, err := apiClient.BackupLocationsApi.BackuplocationsFindById(context.Background(), backupLocationId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BackupLocationsApi.BackuplocationsFindById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `BackuplocationsFindById`: BackupLocationRead
    fmt.Fprintf(os.Stdout, "Response from `BackupLocationsApi.BackuplocationsFindById`: %v\n", resource)
}
```

### Path Parameters

| Name                 | Type                | Description                                                                 | Notes |
| -------------------- | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**              | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **backupLocationId** | **string**          | The ID (UUID) of the BackupLocation.                                        |       |

### Other Parameters

Other parameters are passed through a pointer to an apiBackuplocationsFindByIdRequest struct via the builder pattern

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

### Return type

[**BackupLocationRead**](/cloud/go/go-bundle/sdks/psql/models/backuplocationread.md)

### HTTP request headers

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

## BackuplocationsGet

```go
var result BackupLocationReadList = BackuplocationsGet(ctx)
                      .Offset(offset)
                      .Limit(limit)
                      .Execute()
```

Retrieve all BackupLocations

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    psql "github.com/ionos-cloud/sdk-go-bundle/products/psql"
    "github.com/ionos-cloud/sdk-go-bundle/shared"
)

func main() {
    offset := int32(0) // int32 | The first element (of the total list of elements) to include in the response. Use this parameter together with the limit for pagination. (optional) (default to 0)
    limit := int32(100) // int32 | The maximum number of elements to return. Use this parameter together with the offset for pagination. (optional) (default to 100)

    configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := psql.NewAPIClient(configuration)
    resource, resp, err := apiClient.BackupLocationsApi.BackuplocationsGet(context.Background()).Offset(offset).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BackupLocationsApi.BackuplocationsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `BackuplocationsGet`: BackupLocationReadList
    fmt.Fprintf(os.Stdout, "Response from `BackupLocationsApi.BackuplocationsGet`: %v\n", resource)
}
```

### Path Parameters

### Other Parameters

Other parameters are passed through a pointer to an apiBackuplocationsGetRequest struct via the builder pattern

| Name       | Type      | Description                                                                                                                              | Notes             |
| ---------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| **offset** | **int32** | The first element (of the total list of elements) to include in the response. Use this parameter together with the limit for pagination. | \[default to 0]   |
| **limit**  | **int32** | The maximum number of elements to return. Use this parameter together with the offset for pagination.                                    | \[default to 100] |

### Return type

[**BackupLocationReadList**](/cloud/go/go-bundle/sdks/psql/models/backuplocationreadlist.md)

### HTTP request headers

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/go/go-bundle/sdks/psql/api/backuplocationsapi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
