# Public Cloud › Analytics › Lakehouse › Lakehouses API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Public Cloud product's sections: https://developers.eu.ovhcloud.com/reference/public-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 2 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/lakehouses/

OpenAPI v1: https://api.eu.ovhcloud.com/v1/__schemas/developer-hub-navigation/public-cloud/analytics/lakehouse/lakehouses.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/analytics/lakehouse/lakehouses.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/usage` — Get the query activity of your lakehouse
- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/connection` — Get the connection details of your lakehouse

## Get the query activity of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/usage`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/lakehouses/#getLakehouseUsage

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/usage/get`

Returns the queries your lakehouse ran over the last seven UTC days, today included, and the seven days before: counts, failures, data scanned, CPU time and latency, in total, per day, per catalog and per engine. The figures are read live from the region at each call and are indicative: they are not what you are billed. They carry no statement, user or table name. The data console of the lakehouse shows those.

Latency figures are upper bounds of buckets of elapsed time, which includes queueing. Counters the region started to record on countersSince are null for a period that starts before it. A lakehouse with no query activity yet answers zeros, over seven days and five bands. Only while the region does not hold the lakehouse yet, or does not serve its activity yet, are daily and latencyBands empty.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.Usage | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `activity` | publicCloud.lakehouse.UsageActivity | read-only | Counters of every engine of the lakehouse |
| `activity.bytesScanned` | integer | read-only | Compressed bytes the queries read from storage |
| `activity.cpuTimeMilliseconds` | integer | read-only | CPU time the queries used in milliseconds. Not compute units. |
| `activity.daily` | publicCloud.lakehouse.UsageDay[] | read-only | The seven days of the window, oldest first, today last, zeros on an idle day. Empty only while the region does not hold the lakehouse yet, or does not serve its activity yet. |
| `activity.daily[].bytesScanned` | integer | read-only | Compressed bytes the queries read from storage |
| `activity.daily[].cpuTimeMilliseconds` | integer | read-only | CPU time the queries used in milliseconds. Not compute units. |
| `activity.daily[].date` | string (date-time) | read-only | First instant of the UTC day, at 00:00 |
| `activity.daily[].elapsedMedianUpperBoundMilliseconds` | integer | read-only | Upper bound of the median elapsed time, in milliseconds: the largest value of the latency bucket the median falls in, 3600000 when it is one hour or more. Elapsed time runs from submission to end, queueing included. Null when no query of latencyScope ran. |
| `activity.daily[].elapsedP95UpperBoundMilliseconds` | integer | read-only | Upper bound of the 95th percentile of the elapsed time in milliseconds read as the median is. Null when fewer than 20 queries of latencyScope ran. |
| `activity.daily[].elapsedTotalMilliseconds` | integer | read-only | Summed elapsed time of the queries in milliseconds. Null when the period starts before countersSince. |
| `activity.daily[].failedQueries` | integer | read-only | Queries that ended in error. Null when the period starts before countersSince. |
| `activity.daily[].latencyScope` | publicCloud.lakehouse.UsageLatencyScopeEnum | read-only | Queries the latency figures cover: STATEMENTS when the period starts on or after countersSince, QUERIES before — one of `QUERIES`, `STATEMENTS` |
| `activity.daily[].partial` | boolean | read-only | Whether the day is today, still running |
| `activity.daily[].queries` | integer | read-only | Queries run: statements, previews and metadata queries |
| `activity.daily[].statements` | integer | read-only | Statements among the queries: the queries that read or changed data, excluding previews and metadata queries |
| `activity.elapsedMedianUpperBoundMilliseconds` | integer | read-only | Upper bound of the median elapsed time, in milliseconds: the largest value of the latency bucket the median falls in, 3600000 when it is one hour or more. Elapsed time runs from submission to end, queueing included. Null when no query of latencyScope ran. |
| `activity.elapsedP95UpperBoundMilliseconds` | integer | read-only | Upper bound of the 95th percentile of the elapsed time in milliseconds read as the median is. Null when fewer than 20 queries of latencyScope ran. |
| `activity.elapsedTotalMilliseconds` | integer | read-only | Summed elapsed time of the queries in milliseconds. Null when the period starts before countersSince. |
| `activity.failedQueries` | integer | read-only | Queries that ended in error. Null when the period starts before countersSince. |
| `activity.latencyBands` | publicCloud.lakehouse.UsageLatencyBand[] | read-only | Five bands of elapsed time over the window, shortest first, counting the queries of latencyScope, zeros when idle. Empty only while the region does not hold the lakehouse yet, or does not serve its activity yet. |
| `activity.latencyBands[].queries` | integer | read-only | Queries of latencyScope whose elapsed time falls in the band |
| `activity.latencyBands[].upToMilliseconds` | integer | read-only | Upper bound of the band in milliseconds included. Null for the last band, which holds every longer query. |
| `activity.latencyScope` | publicCloud.lakehouse.UsageLatencyScopeEnum | read-only | Queries the latency figures cover: STATEMENTS when the period starts on or after countersSince, QUERIES before — one of `QUERIES`, `STATEMENTS` |
| `activity.previous` | publicCloud.lakehouse.UsageFigures | read-only | The same counters over the seven days before the window, its last day prorated to the share of today already elapsed, so the change against it does not depend on the hour |
| `activity.previous.bytesScanned` | integer | read-only | Compressed bytes the queries read from storage |
| `activity.previous.cpuTimeMilliseconds` | integer | read-only | CPU time the queries used in milliseconds. Not compute units. |
| `activity.previous.elapsedMedianUpperBoundMilliseconds` | integer | read-only | Upper bound of the median elapsed time, in milliseconds: the largest value of the latency bucket the median falls in, 3600000 when it is one hour or more. Elapsed time runs from submission to end, queueing included. Null when no query of latencyScope ran. |
| `activity.previous.elapsedP95UpperBoundMilliseconds` | integer | read-only | Upper bound of the 95th percentile of the elapsed time in milliseconds read as the median is. Null when fewer than 20 queries of latencyScope ran. |
| `activity.previous.elapsedTotalMilliseconds` | integer | read-only | Summed elapsed time of the queries in milliseconds. Null when the period starts before countersSince. |
| `activity.previous.failedQueries` | integer | read-only | Queries that ended in error. Null when the period starts before countersSince. |
| `activity.previous.latencyScope` | publicCloud.lakehouse.UsageLatencyScopeEnum | read-only | Queries the latency figures cover: STATEMENTS when the period starts on or after countersSince, QUERIES before — one of `QUERIES`, `STATEMENTS` |
| `activity.previous.queries` | integer | read-only | Queries run: statements, previews and metadata queries |
| `activity.previous.statements` | integer | read-only | Statements among the queries: the queries that read or changed data, excluding previews and metadata queries |
| `activity.queries` | integer | read-only | Queries run: statements, previews and metadata queries |
| `activity.statements` | integer | read-only | Statements among the queries: the queries that read or changed data, excluding previews and metadata queries |
| `catalogs` | publicCloud.lakehouse.UsageCatalog[] | read-only | One entry per catalog read during the window, the most data scanned first, then one entry with a null catalogId summing the catalogs deleted since, when they were read |
| `catalogs[].bytesScanned` | integer | read-only | Compressed bytes the queries read from the catalog |
| `catalogs[].catalogId` | string (uuid) | read-only | Identifier of the catalog. Null for the entry summing the catalogs deleted since. |
| `catalogs[].queries` | integer | read-only | Queries that read the catalog |
| `catalogs[].storedBytes` | integer | read-only | Bytes of live data the catalog stores. Null until the region measures storage. |
| `compute` | publicCloud.lakehouse.UsageCompute[] | read-only | The shared SQL endpoint first, then one entry per DEDICATED Compute Pool that ran queries, then one entry with a null computePoolId summing the DEDICATED Compute Pools deleted since, when they ran queries |
| `compute[].bytesScanned` | integer | read-only | Compressed bytes the queries read from storage |
| `compute[].computePoolId` | string (uuid) | read-only | Identifier of the DEDICATED Compute Pool. Null for the shared SQL endpoint, and for the entry summing the DEDICATED Compute Pools deleted since. |
| `compute[].computeUnitSeconds` | integer | read-only | Compute units the DEDICATED Compute Pool used, times seconds. Null for the shared SQL endpoint, and until the region measures it. |
| `compute[].cpuTimeMilliseconds` | integer | read-only | CPU time the queries used in milliseconds. Not compute units. |
| `compute[].elapsedMedianUpperBoundMilliseconds` | integer | read-only | Upper bound of the median elapsed time, in milliseconds: the largest value of the latency bucket the median falls in, 3600000 when it is one hour or more. Elapsed time runs from submission to end, queueing included. Null when no query of latencyScope ran. |
| `compute[].elapsedP95UpperBoundMilliseconds` | integer | read-only | Upper bound of the 95th percentile of the elapsed time in milliseconds read as the median is. Null when fewer than 20 queries of latencyScope ran. |
| `compute[].elapsedTotalMilliseconds` | integer | read-only | Summed elapsed time of the queries in milliseconds. Null when the period starts before countersSince. |
| `compute[].failedQueries` | integer | read-only | Queries that ended in error. Null when the period starts before countersSince. |
| `compute[].latencyScope` | publicCloud.lakehouse.UsageLatencyScopeEnum | read-only | Queries the latency figures cover: STATEMENTS when the period starts on or after countersSince, QUERIES before — one of `QUERIES`, `STATEMENTS` |
| `compute[].queries` | integer | read-only | Queries run: statements, previews and metadata queries |
| `compute[].statements` | integer | read-only | Statements among the queries: the queries that read or changed data, excluding previews and metadata queries |
| `compute[].tier` | publicCloud.lakehouse.ComputePoolTierEnum | read-only | SHARED for the region's shared SQL endpoint, DEDICATED for a DEDICATED Compute Pool — one of `DEDICATED`, `SHARED` |
| `countersSince` | string (date-time) | read-only | Start of the first UTC day from which failedQueries, elapsedTotalMilliseconds and the statements-only latency are counted. A period starting before it has them null and its latency covers every query. |
| `dataSince` | string (date-time) | read-only | Start of the first UTC day the region counted a query of the lakehouse. Null when it has counted none. |
| `dedicatedComputeMeasured` | boolean | read-only | Whether the region counts the queries of DEDICATED Compute Pools. While false, compute lists the shared SQL endpoint only. |
| `generatedAt` | string (date-time) | read-only | When the counters were read: the end of the window |
| `previousWindowStart` | string (date-time) | read-only | Start of the previous window, seven days before windowStart |
| `windowStart` | string (date-time) | read-only | Start of the window: 00:00 UTC six days before today |

```json
{
  "activity": {
    "bytesScanned": 0,
    "cpuTimeMilliseconds": 0,
    "daily": [
      {
        "bytesScanned": 0,
        "cpuTimeMilliseconds": 0,
        "date": "2024-01-01T12:00:00Z",
        "elapsedMedianUpperBoundMilliseconds": 0,
        "elapsedP95UpperBoundMilliseconds": 0,
        "elapsedTotalMilliseconds": 0,
        "failedQueries": 0,
        "latencyScope": "QUERIES",
        "partial": true,
        "queries": 0,
        "statements": 0
      }
    ],
    "elapsedMedianUpperBoundMilliseconds": 0,
    "elapsedP95UpperBoundMilliseconds": 0,
    "elapsedTotalMilliseconds": 0,
    "failedQueries": 0,
    "latencyBands": [
      {
        "queries": 0,
        "upToMilliseconds": 0
      }
    ],
    "latencyScope": "QUERIES",
    "previous": {
      "bytesScanned": 0,
      "cpuTimeMilliseconds": 0,
      "elapsedMedianUpperBoundMilliseconds": 0,
      "elapsedP95UpperBoundMilliseconds": 0,
      "elapsedTotalMilliseconds": 0,
      "failedQueries": 0,
      "latencyScope": "QUERIES",
      "queries": 0,
      "statements": 0
    },
    "queries": 0,
    "statements": 0
  },
  "catalogs": [
    {
      "bytesScanned": 0,
      "catalogId": "00000000-0000-0000-0000-000000000000",
      "queries": 0,
      "storedBytes": 0
    }
  ],
  "compute": [
    {
      "bytesScanned": 0,
      "computePoolId": "00000000-0000-0000-0000-000000000000",
      "computeUnitSeconds": 0,
      "cpuTimeMilliseconds": 0,
      "elapsedMedianUpperBoundMilliseconds": 0,
      "elapsedP95UpperBoundMilliseconds": 0,
      "elapsedTotalMilliseconds": 0,
      "failedQueries": 0,
  …
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/usage" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/usage")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/usage");

print_r($result);
?>
```

## Get the connection details of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/connection`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/lakehouses/#getLakehouseConnection

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/connection/get`

Returns everything a client needs to reach the lakehouse, except the credentials: the realm and the header carrying it, the Apache Iceberg REST catalog and its OAuth2 token service, the SQL endpoint and its JDBC and Trino URIs, the S3 endpoint and bucket, the data console when the region publishes one, and one entry per catalog with its warehouse name, the name the SQL endpoint serves it under and its JDBC and Trino URIs. The credentials come from a credential of a user: its client identifier and secret are the OAuth2 pair of every client and the user name and password of the SQL endpoint, and its S3 key, when it has one, signs the storage reads and writes.

The facts are those of the lakehouse: a lakehouse with a source-address allowlist is served on hosts of its own, which this call returns. Each section is null until the region reports it, and catalogs lists the READY catalogs the SQL endpoint serves, leaving out the catalogs being created or deleted: a client renders what is there and waits for the rest.

<sup>*</sup> S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.Connection | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `catalogs` | publicCloud.lakehouse.ConnectionCatalog[] | read-only | The READY catalogs of the lakehouse that the SQL endpoint serves, sorted by name. Catalogs being created or deleted are left out. Empty until the first catalog is READY and the SQL endpoint is published. |
| `catalogs[].jdbcUri` | string | read-only | JDBC URL of the SQL endpoint opening this catalog. The user name is the client identifier of a credential and the password its client secret. |
| `catalogs[].name` | string | read-only | Name of the catalog |
| `catalogs[].sqlCatalog` | string | read-only | Name the SQL endpoint serves the catalog under: a table is `<sqlCatalog>.<schema>.<table>` |
| `catalogs[].trinoUri` | string | read-only | Trino URI of the SQL endpoint opening this catalog, for the clients taking a `trino://` URI. The user name is the client identifier of a credential and the password its client secret. |
| `catalogs[].warehouse` | string | read-only | Warehouse name of the catalog, the value your Apache Iceberg REST client sends as its warehouse |
| `console` | publicCloud.lakehouse.ConnectionConsole | read-only | The data console of the lakehouse. Null when the region publishes none, and until the region reports the endpoints of the lakehouse. |
| `console.uri` | string | read-only | Address of the data console, where a user signs in with the client identifier and secret of one of its credentials |
| `iceberg` | publicCloud.lakehouse.ConnectionIceberg | read-only | How an Apache Iceberg client reaches the catalogs of the lakehouse. Null until the region reports the endpoints of the lakehouse. |
| `iceberg.scope` | publicCloud.lakehouse.IcebergScopeEnum | read-only | OAuth2 scope your client requests with the client identifier and secret of a credential: `PRINCIPAL_ROLE:ALL` — one of `PRINCIPAL_ROLE:ALL` |
| `iceberg.tokenUri` | string | read-only | URI of the OAuth2 token service, where your client exchanges the client identifier and secret of a credential for a token |
| `iceberg.uri` | string | read-only | Base URI of the Apache Iceberg REST catalog. Your client sends the realm in the realmHeader header and the warehouse of the catalog it opens. |
| `realm` | string | read-only | Realm of the lakehouse in the Apache Iceberg REST catalog of the region, the value your client sends in the header named by realmHeader. Null until the region reserves the realm. |
| `realmHeader` | string | read-only | Name of the HTTP header carrying the realm: `Polaris-Realm` |
| `s3` | publicCloud.lakehouse.ConnectionS3 | read-only | How a client reaches the storage of the lakehouse, signing with the S3 key of a credential. Null until the region reports the bucket. |
| `s3.bucket` | string | read-only | Bucket holding the data of every catalog of the lakehouse |
| `s3.endpoint` | string | read-only | S3 endpoint of the bucket of the lakehouse. Use path-style addressing. |
| `s3.region` | publicCloud.lakehouse.RegionEnum | read-only | Region name to sign S3 requests with — one of `eu-west-par`, `eu-west-poc` |
| `sql` | publicCloud.lakehouse.ConnectionSql | read-only | How a SQL client reaches the SQL endpoint of the lakehouse. Null until the region reports the SQL endpoint. |
| `sql.jdbcUri` | string | read-only | JDBC URL of the SQL endpoint, without a catalog. The user name is the client identifier of a credential and the password its client secret. |
| `sql.trinoUri` | string | read-only | Trino URI of the SQL endpoint, without a catalog, for the clients taking a `trino://` URI. The user name is the client identifier of a credential and the password its client secret. |
| `sql.uri` | string | read-only | Base URI of the SQL endpoint. Authenticate with HTTP Basic, using the client identifier of a credential as the user name and its client secret as the password. |

```json
{
  "catalogs": [
    {
      "jdbcUri": "string",
      "name": "string",
      "sqlCatalog": "string",
      "trinoUri": "string",
      "warehouse": "string"
    }
  ],
  "console": {
    "uri": "string"
  },
  "iceberg": {
    "scope": "PRINCIPAL_ROLE:ALL",
    "tokenUri": "string",
    "uri": "string"
  },
  "realm": "string",
  "realmHeader": "string",
  "s3": {
    "bucket": "string",
    "endpoint": "string",
    "region": "eu-west-par"
  },
  "sql": {
    "jdbcUri": "string",
    "trinoUri": "string",
    "uri": "string"
  }
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/connection" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/connection")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/connection");

print_r($result);
?>
```
