Skip to content

Latest commit

 

History

History
222 lines (143 loc) · 6.22 KB

BackupsAPI.md

File metadata and controls

222 lines (143 loc) · 6.22 KB

\BackupsAPI

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

AddBackupDatabase

Backup AddBackupDatabase(ctx, databaseId).BackupRequest(backupRequest).Execute()

Add a backup to the Database

Example

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

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

Name Type Description Notes

backupRequest | BackupRequest | |

Return type

Backup

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListDatabaseBackup

BackupPaginatedResponseList ListDatabaseBackup(ctx, databaseId).StartId(startId).Execute()

List database backups

Example

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseId string Database ID

Other Parameters

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 |

Return type

BackupPaginatedResponseList

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RemoveDatabaseBackup

RemoveDatabaseBackup(ctx, databaseId, backupId).Execute()

Remove database backup

Example

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

Path Parameters

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

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]