An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based "Data Center Designer" (DCD) tool or via an easy to use API.
The API allows you to create additional PostgreSQL database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 1.1.4
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional
Put the package under your project folder and add the following in import:
import "./ionoscloud"
All available server URLs are:
- https://api.ionos.com/databases/postgresql - Production
By default, https://api.ionos.com/databases/postgresql is used, however this can be overriden at authentication, either
by setting the IONOS_API_URL
environment variable or by specifying the hostUrl
parameter when
initializing the sdk client.
NOTE: We recommend passing the URL without the https://
or http://
prefix. The SDK
checks and adds it if necessary when configurations are created using NewConfiguration
or
NewConfigurationFromEnv
. This is to avoid issues caused by typos in the prefix that cannot
be easily detected and debugged.
The username and password or the authentication token can be manually specified when initializing the sdk client:
client := ionoscloud.NewAPIClient(ionoscloud.NewConfiguration(username, password, token, hostUrl))
Environment variables can also be used. The sdk uses the following variables:
- IONOS_TOKEN - login via token. This is the recommended way to authenticate.
- IONOS_USERNAME - to specify the username used to login
- IONOS_PASSWORD - to specify the password
- IONOS_API_URL - to specify the API server URL
In this case, the client configuration needs to be initialized using NewConfigurationFromEnv()
.
client := ionoscloud.NewAPIClient(ionoscloud.NewConfigurationFromEnv())
All URIs are relative to https://api.ionos.com/databases/postgresql
API Endpoints table
Class | Method | HTTP request | Description |
---|---|---|---|
BackupsApi | ClusterBackupsGet | Get /clusters/{clusterId}/backups | List backups of cluster |
BackupsApi | ClustersBackupsFindById | Get /clusters/backups/{backupId} | Fetch a cluster backup |
BackupsApi | ClustersBackupsGet | Get /clusters/backups | List cluster backups |
ClustersApi | ClusterPostgresVersionsGet | Get /clusters/{clusterId}/postgresversions | List PostgreSQL versions |
ClustersApi | ClustersDelete | Delete /clusters/{clusterId} | Delete a cluster |
ClustersApi | ClustersFindById | Get /clusters/{clusterId} | Fetch a cluster |
ClustersApi | ClustersGet | Get /clusters | List clusters |
ClustersApi | ClustersPatch | Patch /clusters/{clusterId} | Patch a cluster |
ClustersApi | ClustersPost | Post /clusters | Create a cluster |
ClustersApi | ClustersVersionsGet | Get /clusters/{clusterId}/versions | Supported PostgreSQL versions of cluster |
ClustersApi | PostgresVersionsGet | Get /clusters/postgresversions | List all PostgreSQL versions |
DatabasesApi | DatabasesDelete | Delete /clusters/{clusterId}/databases/{databasename} | Delete database |
DatabasesApi | DatabasesGet | Get /clusters/{clusterId}/databases/{databasename} | Get database |
DatabasesApi | DatabasesList | Get /clusters/{clusterId}/databases | List databases |
DatabasesApi | DatabasesPost | Post /clusters/{clusterId}/databases | Create a database |
LogsApi | ClusterLogsGet | Get /clusters/{clusterId}/logs | Get logs of your cluster |
MetadataApi | InfosVersionGet | Get /infos/version | Get the current API version |
MetadataApi | InfosVersionsGet | Get /infos/versions | Fetch all API versions |
MetadataApi | VersionsGet | Get /versions | PostgreSQL versions for new clusters |
RestoresApi | ClusterRestorePost | Post /clusters/{clusterId}/restore | In-place restore of a cluster |
UsersApi | UsersDelete | Delete /clusters/{clusterId}/users/{username} | Delete user |
UsersApi | UsersGet | Get /clusters/{clusterId}/users/{username} | Get user |
UsersApi | UsersList | Get /clusters/{clusterId}/users | List users |
UsersApi | UsersPatch | Patch /clusters/{clusterId}/users/{username} | Patch user |
UsersApi | UsersPost | Post /clusters/{clusterId}/users | Create a user |
All URIs are relative to https://api.ionos.com/databases/postgresql
API models list
- APIVersion
- BackupMetadata
- BackupResponse
- ClusterBackup
- ClusterBackupList
- ClusterBackupListAllOf
- ClusterList
- ClusterListAllOf
- ClusterLogs
- ClusterLogsInstances
- ClusterLogsInstancesMessages
- ClusterMetadata
- ClusterProperties
- ClusterResponse
- Connection
- ConnectionPooler
- CreateClusterProperties
- CreateClusterRequest
- CreateRestoreRequest
- DBUser
- Database
- DatabaseItems
- DatabaseList
- DatabaseProperties
- DatabaseResource
- DayOfTheWeek
- DeprecatedPagination
- ErrorMessage
- ErrorResponse
- MaintenanceWindow
- Metadata
- Pagination
- PaginationLinks
- PatchClusterProperties
- PatchClusterRequest
- PatchUserProperties
- PoolMode
- PostgresVersionList
- PostgresVersionListData
- Resource
- ResourceMetadata
- ResourceType
- State
- StorageType
- SynchronizationMode
- User
- UserItems
- UserList
- UserProperties
- UserResource
- UsersPatchRequest