Package: ionoscloud-dbaas-mongo
Python API client for ionoscloud_dbaas_mongoWith IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API.MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas.The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use.OverviewThe IONOS Cloud SDK for Python provides you with access to the IONOS Cloud Dbaas Postgres API. The client library supports both simple and complex requests. It is designed for developers who are building applications in Python. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.Installation & UsageRequirements:Python >= 3.5pip installSince this package is hosted onPypiyou can install it by using:pipinstallionoscloud-dbaas-mongoIf the python package is hosted on a repository, you can install directly using:pipinstallgit+https://github.com/ionos-cloud/sdk-python-dbaas-mongo.gitNote: you may need to runpipwith root permission:sudo pip install git+https://github.com/ionos-cloud/sdk-python-dbaas-mongo.gitThen import the package:importionoscloud_dbaas_mongoSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--userorsudo python setup.py installto install the package for all usersThen import the package:importionoscloud_dbaas_mongoNOTE:The Python SDK does not support Python 2. It only supports Python >= 3.5.AuthenticationThe username and passwordorthe authentication token can be manually specified when initializing the SDK client:configuration=ionoscloud_dbaas_mongo.Configuration(username='YOUR_USERNAME',password='YOUR_PASSWORD',token='YOUR_TOKEN')client=ionoscloud_dbaas_mongo.ApiClient(configuration)Environment variables can also be used. This is an example of how one would do that:importosconfiguration=ionoscloud_dbaas_mongo.Configuration(username=os.environ.get('IONOS_USERNAME'),password=os.environ.get('IONOS_PASSWORD'),token=os.environ.get('IONOS_TOKEN'))client=ionoscloud_dbaas_mongo.ApiClient(configuration)Warning: Make sure to follow the Information Security Best Practices when using credentials within your code or storing them in a file.HTTP proxiesYou can use http proxies by setting the following environment variables:IONOS_HTTP_PROXY- proxy URLIONOS_HTTP_PROXY_HEADERS- proxy headersChanging the base URLBase URL for the HTTP operation can be changed in the following way:importosconfiguration=ionoscloud_dbaas_mongo.Configuration(username=os.environ.get('IONOS_USERNAME'),password=os.environ.get('IONOS_PASSWORD'),host=os.environ.get('IONOS_API_URL'),server_index=None,)client=ionoscloud_dbaas_mongo.ApiClient(configuration)Certificate pinning:You can enable certificate pinning if you want to bypass the normal certificate checking procedure,
by doing the following:Set env variable IONOS_PINNED_CERT=<insert_sha256_public_fingerprint_here>You can get the sha256 fingerprint most easily from the browser by inspecting the certificate.Documentation for API EndpointsAll URIs are relative tohttps://api.ionos.com/databases/mongodbAPI Endpoints tableClassMethodHTTP requestDescriptionClustersApiclusters_deleteDELETE/clusters/{clusterId}Delete a ClusterClustersApiclusters_find_by_idGET/clusters/{clusterId}Get a cluster by idClustersApiclusters_getGET/clustersGet ClustersClustersApiclusters_patchPATCH/clusters/{clusterId}Patch a clusterClustersApiclusters_postPOST/clustersCreate a ClusterLogsApiclusters_logs_getGET/clusters/{clusterId}/logsGet logs of your clusterMetadataApiinfos_version_getGET/infos/versionGet API VersionMetadataApiinfos_versions_getGET/infos/versionsGet All API VersionsRestoresApiclusters_restore_postPOST/clusters/{clusterId}/restoreIn-place restore of a clusterSnapshotsApiclusters_snapshots_getGET/clusters/{clusterId}/snapshotsGet the snapshots of your clusterTemplatesApitemplates_getGET/templatesGet TemplatesUsersApiclusters_users_deleteDELETE/clusters/{clusterId}/users/{username}Delete a MongoDB User by IDUsersApiclusters_users_find_by_idGET/clusters/{clusterId}/users/{username}Get a MongoDB User by IDUsersApiclusters_users_getGET/clusters/{clusterId}/usersGet all Cluster UsersUsersApiclusters_users_patchPATCH/clusters/{clusterId}/users/{username}Patch a MongoDB User by IDUsersApiclusters_users_postPOST/clusters/{clusterId}/usersCreate MongoDB UserDocumentation For ModelsAll URIs are relative tohttps://api.ionos.com/databases/mongodbAPI models listAPIVersionClusterListClusterListAllOfClusterLogsClusterLogsInstancesClusterLogsMessagesClusterPropertiesClusterResponseConnectionCreateClusterPropertiesCreateClusterRequestCreateRestoreRequestDayOfTheWeekErrorMessageErrorResponseHealthMaintenanceWindowMetadataPaginationPaginationLinksPatchClusterPropertiesPatchClusterRequestPatchUserPropertiesPatchUserRequestResourceTypeSnapshotListSnapshotListAllOfSnapshotPropertiesSnapshotResponseStateTemplateListTemplateListAllOfTemplatePropertiesTemplateResponseUserUserMetadataUserPropertiesUserRolesUsersList[Back to API list][Back to Model list]