For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.us.ovhcloud.com/en/public-cloud/data-analytics/getting-started-apis.md.
  • English

Databases & Analytics - Getting started with APIs

View as Markdown

Learn how to order a database or analytics service using the OVHcloud API.

Cloud Databases and Analytics* allow you to focus on building and deploying cloud applications while OVHcloud takes care of the service infrastructure and maintenance.

 

Requirements

 

Instructions

Info

We will use a PostgreSQL® database service as an example for this guide. Please substitute API calls and parameters as appropriate for your chosen database or analytics service.

Step 1: Gather the set of required parameters

To create a service, you will need to specify at minimum:

  • an engine, and its version (e.g. "PostgreSQL v15")
  • the plan (e.g. "business")
  • the nodes of the cluster (e.g. "2 nodes with 4 cores, 15 GiB memory, 320 GiB disk")

 

List the capabilities

The capabilities endpoint lists the allowed values for the engine, plan, and flavor the service knows about.

The call returns an object listing allowed values for:

  • the various engines, with the various versions for each engine
  • the plans
  • and the flavors

 

Get the availability

The availability endpoint lists what combination of parameters the service allows. For example, a PostgreSQL® Essential plan currently allows clusters with a single node, whereas Business services allow two nodes. You should decide which set of parameters among those listed best fits your needs.

The call returns an array listing the available set of parameters. Each entry in this array lists (among other data): an engine, a version, a plan, a flavor, a region, if it supports public or private networking, a minimum number of nodes, and a maximum number of nodes.

 

Step 2: Create a service

Warning

NOTE: By creating a cluster, you will be billed accordingly.

Use this endpoint to create a new database cluster:

Warning

NOTE: All options within the _ API should be set to NULL or EMPTY except for the fields listed below.

  • description: A human-readable description of the service you wish to create.

    Info

    For security reasons, the default network configuration does not allow any incoming connections. You must authorize a suitable IP address to successfully access your service.

  • ipRestrictions: Declare the IP address blocks allowed to connect to your cluster.

    Info

    description is a human-readable label for the IP block
    ip is a string representing an IP block or network, using the syntax aaa.bbb.ccc.ddd/xy. If you want to specify a single IP address, use aaa.bbb.ccc.ddd/32.
    You can add authorize multiple IP blocks.

  • nodeslist: Specify the flavor and Region of the service you want to create. Role is not required.

  • plan: The desired plan for the service.

  • Version: The PostgreSQL® version you want to use.

If you want to use public networking, no further information is needed. If you want to use private networking, you'll also want to specify:

  • networkId: The ID of the vRack you want to use.
  • subnetId: The ID of the vRack subnet you want your cluster to be attached to.

The call returns an object describing the cluster you asked for. Initially, its status property will be CREATING. Take note of the id property of the newly-created cluster for the next step.

 

Step 3: Wait for your service to be ready

The cluster will take a few minutes to become fully usable. You can check its status using:

The call returns an object describing the cluster. Its status property will transition to READY when the cluster becomes available.

 

Step 4: Reset the primary user password

At this point, you don't know your cluster primary user's password.

Start by getting your new cluster’s ID:

List your cluster's users with:

Note the id of your admin user. Reset its password with:

Note the new password of the user to later be able to connect to the cluster.

Warning

NOTE: That password won't ever be available later on. OVHcloud never stores users' passwords.

 

Step 5: Start using the cluster

You’ll find the cluster connection information in your OVHcloud Control Panel, where you can start using the cluster! More information about connecting to the PostgreSQL® database is available here.

 

Go further

Configuring vRack for Public Cloud

Browse all the Databases guides.

Browse the rest of the OVHcloud US documentation for guides on our other products and services.

Learn more about Managed Databases on the OVHcloud US website.

OVHcloud Managed Databases and Analytics:

  • Grafana® is a registered trademark of Grafana Labs and is used with the permission of Grafana Labs. OVH SAS and its subsidiaries are not affiliated with or endorsed by Grafana Labs.
  • Kafka® is a registered trademark of The Apache Software Foundation and has been licensed for use by OVHcloud, who has no affiliation with and is not endorsed by The Apache Software Foundation.
  • MongoDB® is a registered trademark of MongoDB, Inc.
  • MySQL® is a registered trademark of Oracle and/or its affiliates.
  • PostgreSQL® is a registered trademark of the PostgreSQL Community Association of Canada.