All URIs are relative to https://api.ionos.com/databases/postgresql
| Method | HTTP request | Description |
|---|---|---|
| infos_version_get | GET /infos/version | Get the current API version |
| infos_versions_get | GET /infos/versions | Fetch all API versions |
| versions_get | GET /versions | PostgreSQL versions for new clusters |
APIVersion infos_version_get()
Get the current API version
Retrieves the current version of the responding API.
- Basic Authentication (basicAuth):
- Api Key Authentication (tokenAuth):
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.models.api_version import APIVersion
from ionoscloud_dbaas_postgres.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.ionos.com/databases/postgresql
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_dbaas_postgres.Configuration(
host = "https://api.ionos.com/databases/postgresql"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = ionoscloud_dbaas_postgres.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with ionoscloud_dbaas_postgres.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_dbaas_postgres.MetadataApi(api_client)
try:
# Get the current API version
api_response = api_instance.infos_version_get()
print("The response of MetadataApi->infos_version_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MetadataApi->infos_version_get: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation. | - |
| 0 | Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient permissions), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), 503 (maintenance) | * Content-Type - application/problem+json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[APIVersion] infos_versions_get()
Fetch all API versions
Retrieves all available versions of the responding API.
- Basic Authentication (basicAuth):
- Api Key Authentication (tokenAuth):
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.models.api_version import APIVersion
from ionoscloud_dbaas_postgres.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.ionos.com/databases/postgresql
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_dbaas_postgres.Configuration(
host = "https://api.ionos.com/databases/postgresql"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = ionoscloud_dbaas_postgres.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with ionoscloud_dbaas_postgres.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_dbaas_postgres.MetadataApi(api_client)
try:
# Fetch all API versions
api_response = api_instance.infos_versions_get()
print("The response of MetadataApi->infos_versions_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MetadataApi->infos_versions_get: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation. | - |
| 0 | Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient permissions), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), 503 (maintenance) | * Content-Type - application/problem+json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PostgresVersionList versions_get()
PostgreSQL versions for new clusters
Retrieves a list of available PostgreSQL versions for new clusters.
- Basic Authentication (basicAuth):
- Api Key Authentication (tokenAuth):
import ionoscloud_dbaas_postgres
from ionoscloud_dbaas_postgres.models.postgres_version_list import PostgresVersionList
from ionoscloud_dbaas_postgres.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.ionos.com/databases/postgresql
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_dbaas_postgres.Configuration(
host = "https://api.ionos.com/databases/postgresql"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = ionoscloud_dbaas_postgres.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with ionoscloud_dbaas_postgres.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_dbaas_postgres.MetadataApi(api_client)
try:
# PostgreSQL versions for new clusters
api_response = api_instance.versions_get()
print("The response of MetadataApi->versions_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MetadataApi->versions_get: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful operation. | - |
| 0 | Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient permissions), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), 503 (maintenance) | * Content-Type - application/problem+json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]