{"openapi":"3.0.0","info":{"title":"OVHcloud API specification","description":"Specification for OVHcloud API","version":"1.0","contact":{"name":"OVH","email":"api@ml.ovh.net"}},"servers":[{"url":"https://api.eu.ovhcloud.com/v2"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"duration":{"type":"string","description":"Duration (e.g., P1Y2M3DT4H6M9S)","example":"P1Y2M3DT4H6M9S"},"email":{"type":"string","description":"Email address (e.g., api@ml.ovh.net)","format":"email","example":"api@ml.ovh.net"},"internationalPhoneNumber":{"type":"string","description":"International phone number","format":"phone-number"},"ip":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipBlock":{"type":"string","description":"IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)","format":"ip-block","example":"192.0.2.0/24"},"ipInterface":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4":{"type":"string","description":"IPv4 address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4Block":{"type":"string","description":"IPv4 CIDR notation (e.g., 192.0.2.0/24)","format":"ipv4-block","example":"192.0.2.0/24"},"ipv6":{"type":"string","description":"IPv6 address (e.g., 2001:41d0:1:1994::1)","format":"ipv6","example":"2001:41d0:1:1994::1"},"ipv6Block":{"type":"string","description":"IPv6 CIDR notation (e.g., 2001:41d0::/128)","format":"ipv6-block","example":"2001:41d0::/128"},"macAddress":{"type":"string","description":"MAC address (e.g., 00:00:5e:00:53:01)","format":"mac-address","example":"00:00:5e:00:53:01"},"phoneNumber":{"type":"string","description":"Phone number","format":"phone-number"},"publicCloud.lakehouse.ComputePoolTierEnum":{"type":"string","description":"Tier of a Compute Pool","enum":["DEDICATED","SHARED"]},"publicCloud.lakehouse.Connection":{"type":"object","description":"How to connect a client to a lakehouse: every fact but the credentials, which a credential of a user holds","properties":{"catalogs":{"type":"array","description":"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.","items":{"$ref":"#/components/schemas/publicCloud.lakehouse.ConnectionCatalog"},"readOnly":true},"console":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.ConnectionConsole"}],"description":"The data console of the lakehouse. Null when the region publishes none, and until the region reports the endpoints of the lakehouse.","nullable":true,"readOnly":true},"iceberg":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.ConnectionIceberg"}],"description":"How an Apache Iceberg client reaches the catalogs of the lakehouse. Null until the region reports the endpoints of the lakehouse.","nullable":true,"readOnly":true},"realm":{"type":"string","description":"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.","nullable":true,"readOnly":true},"realmHeader":{"type":"string","description":"Name of the HTTP header carrying the realm: `Polaris-Realm`","readOnly":true},"s3":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.ConnectionS3"}],"description":"How a client reaches the storage of the lakehouse, signing with the S3 key of a credential. Null until the region reports the bucket.","nullable":true,"readOnly":true},"sql":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.ConnectionSql"}],"description":"How a SQL client reaches the SQL endpoint of the lakehouse. Null until the region reports the SQL endpoint.","nullable":true,"readOnly":true}}},"publicCloud.lakehouse.ConnectionCatalog":{"type":"object","description":"A READY catalog of a lakehouse and the names each client addresses it by","properties":{"jdbcUri":{"type":"string","description":"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.","readOnly":true},"name":{"type":"string","description":"Name of the catalog","readOnly":true},"sqlCatalog":{"type":"string","description":"Name the SQL endpoint serves the catalog under: a table is `<sqlCatalog>.<schema>.<table>`","readOnly":true},"trinoUri":{"type":"string","description":"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.","readOnly":true},"warehouse":{"type":"string","description":"Warehouse name of the catalog, the value your Apache Iceberg REST client sends as its warehouse","readOnly":true}}},"publicCloud.lakehouse.ConnectionConsole":{"type":"object","description":"The data console of a lakehouse","properties":{"uri":{"type":"string","description":"Address of the data console, where a user signs in with the client identifier and secret of one of its credentials","readOnly":true}}},"publicCloud.lakehouse.ConnectionIceberg":{"type":"object","description":"The Apache Iceberg REST catalog of a lakehouse, as an Iceberg client configures it","properties":{"scope":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.IcebergScopeEnum"}],"description":"OAuth2 scope your client requests with the client identifier and secret of a credential: `PRINCIPAL_ROLE:ALL`","readOnly":true},"tokenUri":{"type":"string","description":"URI of the OAuth2 token service, where your client exchanges the client identifier and secret of a credential for a token","readOnly":true},"uri":{"type":"string","description":"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.","readOnly":true}}},"publicCloud.lakehouse.ConnectionS3":{"type":"object","description":"The storage of a lakehouse, as an S3 client configures it with the S3 key of a credential","properties":{"bucket":{"type":"string","description":"Bucket holding the data of every catalog of the lakehouse","readOnly":true},"endpoint":{"type":"string","description":"S3 endpoint of the bucket of the lakehouse. Use path-style addressing.","readOnly":true},"region":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.RegionEnum"}],"description":"Region name to sign S3 requests with","readOnly":true}}},"publicCloud.lakehouse.ConnectionSql":{"type":"object","description":"The SQL endpoint of a lakehouse, which speaks the Trino client protocol","properties":{"jdbcUri":{"type":"string","description":"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.","readOnly":true},"trinoUri":{"type":"string","description":"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.","readOnly":true},"uri":{"type":"string","description":"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.","readOnly":true}}},"publicCloud.lakehouse.IcebergScopeEnum":{"type":"string","description":"OAuth2 scope a client requests from the token service of the Apache Iceberg REST catalog. `PRINCIPAL_ROLE:ALL`: every principal role of the credential.","enum":["PRINCIPAL_ROLE:ALL"]},"publicCloud.lakehouse.RegionEnum":{"type":"string","description":"Region name of a lakehouse. The lakehouse region reference lists the regions open to new lakehouses.","enum":["eu-west-par","eu-west-poc"]},"publicCloud.lakehouse.Usage":{"type":"object","description":"Query activity of a lakehouse over the last seven UTC days, today included, and the seven days before. The figures are indicative and not used for billing: counters only, no statement, user or table name.","properties":{"activity":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.UsageActivity"}],"description":"Counters of every engine of the lakehouse","readOnly":true},"catalogs":{"type":"array","description":"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","items":{"$ref":"#/components/schemas/publicCloud.lakehouse.UsageCatalog"},"readOnly":true},"compute":{"type":"array","description":"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","items":{"$ref":"#/components/schemas/publicCloud.lakehouse.UsageCompute"},"readOnly":true},"countersSince":{"type":"string","description":"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.","format":"date-time","readOnly":true},"dataSince":{"type":"string","description":"Start of the first UTC day the region counted a query of the lakehouse. Null when it has counted none.","nullable":true,"format":"date-time","readOnly":true},"dedicatedComputeMeasured":{"type":"boolean","description":"Whether the region counts the queries of DEDICATED Compute Pools. While false, compute lists the shared SQL endpoint only.","readOnly":true},"generatedAt":{"type":"string","description":"When the counters were read: the end of the window","format":"date-time","readOnly":true},"previousWindowStart":{"type":"string","description":"Start of the previous window, seven days before windowStart","format":"date-time","readOnly":true},"windowStart":{"type":"string","description":"Start of the window: 00:00 UTC six days before today","format":"date-time","readOnly":true}}},"publicCloud.lakehouse.UsageActivity":{"type":"object","description":"Query counters of a lakehouse over the window, the previous window, per day and per latency band","properties":{"bytesScanned":{"type":"integer","description":"Compressed bytes the queries read from storage","readOnly":true},"cpuTimeMilliseconds":{"type":"integer","description":"CPU time the queries used in milliseconds. Not compute units.","readOnly":true},"daily":{"type":"array","description":"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.","items":{"$ref":"#/components/schemas/publicCloud.lakehouse.UsageDay"},"readOnly":true},"elapsedMedianUpperBoundMilliseconds":{"type":"integer","description":"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.","nullable":true,"readOnly":true},"elapsedP95UpperBoundMilliseconds":{"type":"integer","description":"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.","nullable":true,"readOnly":true},"elapsedTotalMilliseconds":{"type":"integer","description":"Summed elapsed time of the queries in milliseconds. Null when the period starts before countersSince.","nullable":true,"readOnly":true},"failedQueries":{"type":"integer","description":"Queries that ended in error. Null when the period starts before countersSince.","nullable":true,"readOnly":true},"latencyBands":{"type":"array","description":"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.","items":{"$ref":"#/components/schemas/publicCloud.lakehouse.UsageLatencyBand"},"readOnly":true},"latencyScope":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.UsageLatencyScopeEnum"}],"description":"Queries the latency figures cover: STATEMENTS when the period starts on or after countersSince, QUERIES before","readOnly":true},"previous":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.UsageFigures"}],"description":"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","readOnly":true},"queries":{"type":"integer","description":"Queries run: statements, previews and metadata queries","readOnly":true},"statements":{"type":"integer","description":"Statements among the queries: the queries that read or changed data, excluding previews and metadata queries","readOnly":true}}},"publicCloud.lakehouse.UsageCatalog":{"type":"object","description":"Queries that read a catalog during the window","properties":{"bytesScanned":{"type":"integer","description":"Compressed bytes the queries read from the catalog","readOnly":true},"catalogId":{"type":"string","description":"Identifier of the catalog. Null for the entry summing the catalogs deleted since.","nullable":true,"format":"uuid","readOnly":true},"queries":{"type":"integer","description":"Queries that read the catalog","readOnly":true},"storedBytes":{"type":"integer","description":"Bytes of live data the catalog stores. Null until the region measures storage.","nullable":true,"readOnly":true}}},"publicCloud.lakehouse.UsageCompute":{"type":"object","description":"Queries one engine ran for the lakehouse during the window","properties":{"bytesScanned":{"type":"integer","description":"Compressed bytes the queries read from storage","readOnly":true},"computePoolId":{"type":"string","description":"Identifier of the DEDICATED Compute Pool. Null for the shared SQL endpoint, and for the entry summing the DEDICATED Compute Pools deleted since.","nullable":true,"format":"uuid","readOnly":true},"computeUnitSeconds":{"type":"integer","description":"Compute units the DEDICATED Compute Pool used, times seconds. Null for the shared SQL endpoint, and until the region measures it.","nullable":true,"readOnly":true},"cpuTimeMilliseconds":{"type":"integer","description":"CPU time the queries used in milliseconds. Not compute units.","readOnly":true},"elapsedMedianUpperBoundMilliseconds":{"type":"integer","description":"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.","nullable":true,"readOnly":true},"elapsedP95UpperBoundMilliseconds":{"type":"integer","description":"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.","nullable":true,"readOnly":true},"elapsedTotalMilliseconds":{"type":"integer","description":"Summed elapsed time of the queries in milliseconds. Null when the period starts before countersSince.","nullable":true,"readOnly":true},"failedQueries":{"type":"integer","description":"Queries that ended in error. Null when the period starts before countersSince.","nullable":true,"readOnly":true},"latencyScope":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.UsageLatencyScopeEnum"}],"description":"Queries the latency figures cover: STATEMENTS when the period starts on or after countersSince, QUERIES before","readOnly":true},"queries":{"type":"integer","description":"Queries run: statements, previews and metadata queries","readOnly":true},"statements":{"type":"integer","description":"Statements among the queries: the queries that read or changed data, excluding previews and metadata queries","readOnly":true},"tier":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.ComputePoolTierEnum"}],"description":"SHARED for the region's shared SQL endpoint, DEDICATED for a DEDICATED Compute Pool","readOnly":true}}},"publicCloud.lakehouse.UsageDay":{"type":"object","description":"Query counters of a lakehouse over one UTC day","properties":{"bytesScanned":{"type":"integer","description":"Compressed bytes the queries read from storage","readOnly":true},"cpuTimeMilliseconds":{"type":"integer","description":"CPU time the queries used in milliseconds. Not compute units.","readOnly":true},"date":{"type":"string","description":"First instant of the UTC day, at 00:00","format":"date-time","readOnly":true},"elapsedMedianUpperBoundMilliseconds":{"type":"integer","description":"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.","nullable":true,"readOnly":true},"elapsedP95UpperBoundMilliseconds":{"type":"integer","description":"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.","nullable":true,"readOnly":true},"elapsedTotalMilliseconds":{"type":"integer","description":"Summed elapsed time of the queries in milliseconds. Null when the period starts before countersSince.","nullable":true,"readOnly":true},"failedQueries":{"type":"integer","description":"Queries that ended in error. Null when the period starts before countersSince.","nullable":true,"readOnly":true},"latencyScope":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.UsageLatencyScopeEnum"}],"description":"Queries the latency figures cover: STATEMENTS when the period starts on or after countersSince, QUERIES before","readOnly":true},"partial":{"type":"boolean","description":"Whether the day is today, still running","readOnly":true},"queries":{"type":"integer","description":"Queries run: statements, previews and metadata queries","readOnly":true},"statements":{"type":"integer","description":"Statements among the queries: the queries that read or changed data, excluding previews and metadata queries","readOnly":true}}},"publicCloud.lakehouse.UsageFigures":{"type":"object","description":"Query counters of a lakehouse over one period","properties":{"bytesScanned":{"type":"integer","description":"Compressed bytes the queries read from storage","readOnly":true},"cpuTimeMilliseconds":{"type":"integer","description":"CPU time the queries used in milliseconds. Not compute units.","readOnly":true},"elapsedMedianUpperBoundMilliseconds":{"type":"integer","description":"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.","nullable":true,"readOnly":true},"elapsedP95UpperBoundMilliseconds":{"type":"integer","description":"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.","nullable":true,"readOnly":true},"elapsedTotalMilliseconds":{"type":"integer","description":"Summed elapsed time of the queries in milliseconds. Null when the period starts before countersSince.","nullable":true,"readOnly":true},"failedQueries":{"type":"integer","description":"Queries that ended in error. Null when the period starts before countersSince.","nullable":true,"readOnly":true},"latencyScope":{"allOf":[{"$ref":"#/components/schemas/publicCloud.lakehouse.UsageLatencyScopeEnum"}],"description":"Queries the latency figures cover: STATEMENTS when the period starts on or after countersSince, QUERIES before","readOnly":true},"queries":{"type":"integer","description":"Queries run: statements, previews and metadata queries","readOnly":true},"statements":{"type":"integer","description":"Statements among the queries: the queries that read or changed data, excluding previews and metadata queries","readOnly":true}}},"publicCloud.lakehouse.UsageLatencyBand":{"type":"object","description":"A range of elapsed time and the queries that ended in it","properties":{"queries":{"type":"integer","description":"Queries of latencyScope whose elapsed time falls in the band","readOnly":true},"upToMilliseconds":{"type":"integer","description":"Upper bound of the band in milliseconds included. Null for the last band, which holds every longer query.","nullable":true,"readOnly":true}}},"publicCloud.lakehouse.UsageLatencyScopeEnum":{"type":"string","description":"Queries the latency figures of a period cover","enum":["QUERIES","STATEMENTS"]},"time":{"type":"string","description":"Time (e.g., 15:04:05)","format":"time","example":"15:04:05"}},"securitySchemes":{"oAuth2AuthCode":{"type":"oauth2","description":"Oauth2","x-client-id":"1bb9c7df371741c0","x-client-secret":"a5b4de870aca620d10fbf63cd18d205b","flows":{"authorizationCode":{"authorizationUrl":"https://auth.eu.ovhcloud.com/oauth2/authorize","tokenUrl":"https://auth.eu.ovhcloud.com/oauth2/token","scopes":{"account/all":"Manage your account","all":"Manage your whole account and all your services","services/all":"Manage your services lifecycle and billing"}}}}}},"paths":{"/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/connection":{"get":{"operationId":"getLakehouseConnection","summary":"Get the connection details of your lakehouse","description":"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.\n\nThe 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.\n\n<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.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"lakehouseId","description":"Lakehouse ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.lakehouse.Connection"},"examples":{"A READY lakehouse":{"value":{"catalogs":[{"jdbcUri":"jdbc:trino://sql.eu-west-par.lakehouse.ovhcloud.example:443/t5f1c2b3a_lkh-8b0f6d2e_sales_main?SSL=true","name":"main","sqlCatalog":"t5f1c2b3a_lkh-8b0f6d2e_sales_main","trinoUri":"trino://sql.eu-west-par.lakehouse.ovhcloud.example:443/t5f1c2b3a_lkh-8b0f6d2e_sales_main?SSL=true","warehouse":"sales_main"}],"console":{"uri":"https://console.eu-west-par.lakehouse.ovhcloud.example"},"iceberg":{"scope":"PRINCIPAL_ROLE:ALL","tokenUri":"https://iceberg.eu-west-par.lakehouse.ovhcloud.example/api/catalog/v1/oauth/tokens","uri":"https://iceberg.eu-west-par.lakehouse.ovhcloud.example/api/catalog"},"realm":"lkh-8b0f6d2e","realmHeader":"Polaris-Realm","s3":{"bucket":"lkh-8b0f6d2e","endpoint":"https://s3.eu-west-par.lakehouse.ovhcloud.example","region":"eu-west-par"},"sql":{"jdbcUri":"jdbc:trino://sql.eu-west-par.lakehouse.ovhcloud.example:443?SSL=true","trinoUri":"trino://sql.eu-west-par.lakehouse.ovhcloud.example:443?SSL=true","uri":"https://sql.eu-west-par.lakehouse.ovhcloud.example"}},"summary":"A lakehouse with one READY catalog, in a region that publishes the data console."},"A lakehouse being created":{"value":{"catalogs":[],"console":null,"iceberg":null,"realm":null,"realmHeader":"Polaris-Realm","s3":null,"sql":null},"summary":"Until the region reports the endpoints: the realm once it is reserved, nothing else."}}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::InvalidParameter":{"value":{"class":"Client::BadRequest::InvalidParameter","message":"Invalid parameter in the request"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::LakehouseDoesNotExist":{"value":{"class":"Client::NotFound::LakehouseDoesNotExist","message":"Lakehouse not found"}}}}}}},"tags":["Managed Analytics","Lakehouse"],"x-developer-hub-navigation":[["Public Cloud","Analytics","Lakehouse","Lakehouses@@@95"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/connection\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/connection\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:analytics/lakehouse/connection/get","required":true}]}},"/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/usage":{"get":{"operationId":"getLakehouseUsage","summary":"Get the query activity of your lakehouse","description":"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.\n\nLatency 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.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"lakehouseId","description":"Lakehouse ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.lakehouse.Usage"},"examples":{"A week of queries":{"value":{"activity":{"bytesScanned":1840000000000,"cpuTimeMilliseconds":166320000,"daily":[{"bytesScanned":230000000000,"cpuTimeMilliseconds":20900000,"date":"2026-09-29T00:00:00Z","elapsedMedianUpperBoundMilliseconds":880,"elapsedP95UpperBoundMilliseconds":11375,"elapsedTotalMilliseconds":4851000,"failedQueries":12,"latencyScope":"STATEMENTS","partial":false,"queries":2310,"statements":1500},{"bytesScanned":265000000000,"cpuTimeMilliseconds":23900000,"date":"2026-09-30T00:00:00Z","elapsedMedianUpperBoundMilliseconds":880,"elapsedP95UpperBoundMilliseconds":8261,"elapsedTotalMilliseconds":5565000,"failedQueries":9,"latencyScope":"STATEMENTS","partial":false,"queries":2650,"statements":1720},{"bytesScanned":248000000000,"cpuTimeMilliseconds":22400000,"date":"2026-10-01T00:00:00Z","elapsedMedianUpperBoundMilliseconds":639,"elapsedP95UpperBoundMilliseconds":11375,"elapsedTotalMilliseconds":5208000,"failedQueries":15,"latencyScope":"STATEMENTS","partial":false,"queries":2480,"statements":1610},{"bytesScanned":289000000000,"cpuTimeMilliseconds":26100000,"date":"2026-10-02T00:00:00Z","elapsedMedianUpperBoundMilliseconds":880,"elapsedP95UpperBoundMilliseconds":15662,"elapsedTotalMilliseconds":6069000,"failedQueries":8,"latencyScope":"STATEMENTS","partial":false,"queries":2890,"statements":1880},{"bytesScanned":321000000000,"cpuTimeMilliseconds":29000000,"date":"2026-10-03T00:00:00Z","elapsedMedianUpperBoundMilliseconds":880,"elapsedP95UpperBoundMilliseconds":11375,"elapsedTotalMilliseconds":6741000,"failedQueries":21,"latencyScope":"STATEMENTS","partial":false,"queries":3210,"statements":2085},{"bytesScanned":262000000000,"cpuTimeMilliseconds":23600000,"date":"2026-10-04T00:00:00Z","elapsedMedianUpperBoundMilliseconds":880,"elapsedP95UpperBoundMilliseconds":11375,"elapsedTotalMilliseconds":5502000,"failedQueries":11,"latencyScope":"STATEMENTS","partial":false,"queries":2620,"statements":1700},{"bytesScanned":225000000000,"cpuTimeMilliseconds":20420000,"date":"2026-10-05T00:00:00Z","elapsedMedianUpperBoundMilliseconds":639,"elapsedP95UpperBoundMilliseconds":8261,"elapsedTotalMilliseconds":4746000,"failedQueries":6,"latencyScope":"STATEMENTS","partial":true,"queries":2260,"statements":1465}],"elapsedMedianUpperBoundMilliseconds":880,"elapsedP95UpperBoundMilliseconds":11375,"elapsedTotalMilliseconds":38682000,"failedQueries":82,"latencyBands":[{"queries":4300,"upToMilliseconds":93},{"queries":4650,"upToMilliseconds":880},{"queries":2200,"upToMilliseconds":8261},{"queries":740,"upToMilliseconds":56299},{"queries":70,"upToMilliseconds":null}],"latencyScope":"STATEMENTS","previous":{"bytesScanned":1620000000000,"cpuTimeMilliseconds":147600000,"elapsedMedianUpperBoundMilliseconds":880,"elapsedP95UpperBoundMilliseconds":11375,"elapsedTotalMilliseconds":34747500,"failedQueries":75,"latencyScope":"STATEMENTS","queries":16950,"statements":11010},"queries":18420,"statements":11960},"catalogs":[{"bytesScanned":1120000000000,"catalogId":"c41a7e92-6b3d-4f05-8a2e-91d7b3c6e540","queries":9812,"storedBytes":null},{"bytesScanned":498000000000,"catalogId":"6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d5a60","queries":5430,"storedBytes":null},{"bytesScanned":4100000000,"catalogId":null,"queries":312,"storedBytes":null}],"compute":[{"bytesScanned":1840000000000,"computePoolId":null,"computeUnitSeconds":null,"cpuTimeMilliseconds":166320000,"elapsedMedianUpperBoundMilliseconds":880,"elapsedP95UpperBoundMilliseconds":11375,"elapsedTotalMilliseconds":38682000,"failedQueries":82,"latencyScope":"STATEMENTS","queries":18420,"statements":11960,"tier":"SHARED"}],"countersSince":"2026-09-22T00:00:00Z","dataSince":"2026-09-12T00:00:00Z","dedicatedComputeMeasured":false,"generatedAt":"2026-10-05T09:12:44Z","previousWindowStart":"2026-09-22T00:00:00Z","windowStart":"2026-09-29T00:00:00Z"},"summary":"The activity of a lakehouse queried on the shared SQL endpoint."}}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::InvalidParameter":{"value":{"class":"Client::BadRequest::InvalidParameter","message":"Invalid parameter in the request"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::LakehouseDoesNotExist":{"value":{"class":"Client::NotFound::LakehouseDoesNotExist","message":"Lakehouse not found"}}}}}},"500":{"description":"Error 500 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Server::InternalServerError::RegionUnavailable":{"value":{"class":"Server::InternalServerError::RegionUnavailable","message":"The lakehouse service of this region is temporarily unavailable. Retry later"}}}}}}},"tags":["Managed Analytics","Lakehouse"],"x-developer-hub-navigation":[["Public Cloud","Analytics","Lakehouse","Lakehouses@@@90"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/usage\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/usage\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:analytics/lakehouse/usage/get","required":true}]}}},"tags":[{"name":"Managed Analytics","x-tag-expanded":false,"description":"Missing description"},{"name":"Lakehouse","x-tag-expanded":false,"description":"Missing description"}]}
