All URIs are relative to https://api.qovery.com
Method | HTTP request | Description |
---|---|---|
AddBackupDatabase | Post /database/{databaseId}/backup | Add a backup to the Database |
ListDatabaseBackup | Get /database/{databaseId}/backup | List database backups |
RemoveDatabaseBackup | Delete /database/{databaseId}/backup/{backupId} | Remove database backup |
Backup AddBackupDatabase(ctx, databaseId).BackupRequest(backupRequest).Execute()
Add a backup to the Database
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID
backupRequest := *openapiclient.NewBackupRequest("Name_example", "Message_example") // BackupRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BackupsAPI.AddBackupDatabase(context.Background(), databaseId).BackupRequest(backupRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BackupsAPI.AddBackupDatabase``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddBackupDatabase`: Backup
fmt.Fprintf(os.Stdout, "Response from `BackupsAPI.AddBackupDatabase`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
databaseId | string | Database ID |
Other parameters are passed through a pointer to a apiAddBackupDatabaseRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
backupRequest | BackupRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BackupPaginatedResponseList ListDatabaseBackup(ctx, databaseId).StartId(startId).Execute()
List database backups
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID
startId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Starting point after which to return results (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BackupsAPI.ListDatabaseBackup(context.Background(), databaseId).StartId(startId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BackupsAPI.ListDatabaseBackup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDatabaseBackup`: BackupPaginatedResponseList
fmt.Fprintf(os.Stdout, "Response from `BackupsAPI.ListDatabaseBackup`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
databaseId | string | Database ID |
Other parameters are passed through a pointer to a apiListDatabaseBackupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
startId | string | Starting point after which to return results |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveDatabaseBackup(ctx, databaseId, backupId).Execute()
Remove database backup
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/qovery/qovery-client-go"
)
func main() {
databaseId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database ID
backupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Database Backup ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.BackupsAPI.RemoveDatabaseBackup(context.Background(), databaseId, backupId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BackupsAPI.RemoveDatabaseBackup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
databaseId | string | Database ID | |
backupId | string | Database Backup ID |
Other parameters are passed through a pointer to a apiRemoveDatabaseBackupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]