BackupsApi

BackupsApi

All URIs are relative to https://api.ionos.com/databases/postgresql

Method
HTTP request
Description

GET /clusters/{clusterId}/backups

List backups of cluster

GET /clusters/backups/{backupId}

Fetch a cluster backup

GET /clusters/backups

List cluster backups

cluster_backups_get

ClusterBackupList cluster_backups_get(cluster_id, limit=limit, offset=offset)

List backups of cluster

Retrieves a list of all backups of the given PostgreSQL cluster.

Example

from __future__ import print_function
import time
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/databases/postgresql
configuration = ionoscloud_dbaas_postgres.Configuration(
    host = 'https://api.ionos.com/databases/postgresql',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud_dbaas_postgres.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_dbaas_postgres.BackupsApi(api_client)
    cluster_id = '498ae72f-411f-11eb-9d07-046c59cc737e' # str | The unique ID of the cluster.
    try:
        # List backups of cluster
        api_response = api_instance.cluster_backups_get(cluster_id)
        print(api_response)
    except ApiException as e:
        print('Exception when calling BackupsApi.cluster_backups_get: %s\n' % e)

Parameters

Name
Type
Description
Notes

cluster_id

str

The unique ID of the cluster.

limit

int

The maximum number of elements to return. Use together with 'offset' for pagination.

[optional] [default to 100]

offset

int

The first element to return. Use together with 'limit' for pagination.

[optional] [default to 0]

Return type

ClusterBackupList

Authorization

basicAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

clusters_backups_find_by_id

BackupResponse clusters_backups_find_by_id(backup_id)

Fetch a cluster backup

Retrieve a PostgreSQL cluster backup by using its ID. This value can be found when you GET a list of PostgreSQL cluster backups.

Example

from __future__ import print_function
import time
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/databases/postgresql
configuration = ionoscloud_dbaas_postgres.Configuration(
    host = 'https://api.ionos.com/databases/postgresql',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud_dbaas_postgres.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_dbaas_postgres.BackupsApi(api_client)
    backup_id = '498ae72f-411f-11eb-9d07-046c59cc737e-4oymiqu-12' # str | The unique ID of the backup.
    try:
        # Fetch a cluster backup
        api_response = api_instance.clusters_backups_find_by_id(backup_id)
        print(api_response)
    except ApiException as e:
        print('Exception when calling BackupsApi.clusters_backups_find_by_id: %s\n' % e)

Parameters

Name
Type
Description
Notes

backup_id

str

The unique ID of the backup.

Return type

BackupResponse

Authorization

basicAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

clusters_backups_get

ClusterBackupList clusters_backups_get(limit=limit, offset=offset)

List cluster backups

Retrieves a list of all PostgreSQL cluster backups.

Example

from __future__ import print_function
import time
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com/databases/postgresql
configuration = ionoscloud_dbaas_postgres.Configuration(
    host = 'https://api.ionos.com/databases/postgresql',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud_dbaas_postgres.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_dbaas_postgres.BackupsApi(api_client)
    try:
        # List cluster backups
        api_response = api_instance.clusters_backups_get()
        print(api_response)
    except ApiException as e:
        print('Exception when calling BackupsApi.clusters_backups_get: %s\n' % e)

Parameters

Name
Type
Description
Notes

limit

int

The maximum number of elements to return. Use together with 'offset' for pagination.

[optional] [default to 100]

offset

int

The first element to return. Use together with 'limit' for pagination.

[optional] [default to 0]

Return type

ClusterBackupList

Authorization

basicAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

Last updated