---
title: "Databases & Analytics - Getting started with APIs"
description: "Learn how to order a database or analytics service using the OVHcloud API."
url: https://docs.us.ovhcloud.com/en/public-cloud/data-analytics/getting-started-apis
lang: en
---
> 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.

# Databases & Analytics - Getting started with APIs

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

Cloud Databases and Analytics[\*](#go-further) allow you to focus on building and deploying cloud applications while OVHcloud takes care of the service infrastructure and maintenance.

 

## Requirements

- Access to the [OVHcloud API](https://api.us.ovhcloud.com/) (create your credentials by consulting [this guide](https://docs.us.ovhcloud.com/en/manage-and-operate/api/first-steps.md))
- A [Public Cloud project](https://us.ovhcloud.com/public-cloud/) in your OVHcloud account

 

## Instructions

**Note:**

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.

[GET /cloud/project/{serviceName}/database/capabilities](https://api.us.ovhcloud.com/console/?section=/cloud/project&branch=v1#get-/cloud/project/-serviceName-/database/capabilities)

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[®](#go-further) `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.

[GET /cloud/project/{serviceName}/database/availability](https://api.us.ovhcloud.com/console/?section=/cloud/project&branch=v1#get-/cloud/project/-serviceName-/database/availability)

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:

[POST /cloud/project/{serviceName}/database/postgresql](https://api.us.ovhcloud.com/console/?section=/cloud/project&branch=v1#post-/cloud/project/-serviceName-/database/postgresql)

**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.

  **Note:**

  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.

  **Note:**

  **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:

[GET /cloud/project/{serviceName}/database/postgresql/{clusterId}](https://api.us.ovhcloud.com/console/?section=/cloud/project&branch=v1#get-/cloud/project/-serviceName-/database/postgresql/-clusterId-)

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:

[GET /cloud/project/{serviceName}/database/postgresql](https://api.us.ovhcloud.com/console/?section=/cloud/project&branch=v1#get-/cloud/project/-serviceName-/database/postgresql)

List your cluster's users with:

[GET /cloud/project/{serviceName}/database/postgresql/{clusterId}/user](https://api.us.ovhcloud.com/console/?section=/cloud/project&branch=v1#get-/cloud/project/-serviceName-/database/postgresql/-clusterId-/user)

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

[POST /cloud/project/{serviceName}/database/postgresql/{clusterId}/user/{userId}/credentials/reset](https://api.us.ovhcloud.com/console/?section=/cloud/project&branch=v1#post-/cloud/project/-serviceName-/database/postgresql/-clusterId-/user/-userId-/credentials/reset)

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](https://manager.us.ovhcloud.com/), where you can start using the cluster! More information about connecting to the PostgreSQL® database is [available here](https://docs.us.ovhcloud.com/en/public-cloud/databases/postgresql-capabilities-limitations.md).

 

## Go further

[Configuring vRack for Public Cloud](https://docs.us.ovhcloud.com/en/public-cloud/network-services/configure-vrack.md)

Browse all the [Databases guides](https://docs.us.ovhcloud.com/en/public-cloud/databases/landing-page-databases.md).

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.

Learn more about [Managed Databases](https://us.ovhcloud.com/public-cloud/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.
