Get Schema List
Query the schema list by data source ID and database name. This endpoint applies to three-level data sources such as SQL Server and PostgreSQL.
Endpoint: /openapi/v1/metadata/schema/list
Method: GET
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
datasourceId | String | Yes | Data source ID. Call Retrieve Data Source List to get the value. | ds-d92qvqp8o1fw |
databaseName | String | No | Database name. Optional; when supplied, the API queries the specified database. Call Get Database List to get the value. | 9zcloud |
current | Integer | No | Page number, starting from 1. The default is 1. | 1 |
pageSize | Integer | No | Page size. The default is 10. | 10 |
Response parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
success | Bool | Whether the call succeeded. Values: true or false. | true |
requestId | String | Request ID. | Ci8z3CJA-EKHHvMPnFKLq2XPdDFn7VWQ |
data | Array | Schema list. Each item includes schemaName. | {"schemaName":"public"} |
current | Integer | Current page number. | 1 |
pageSize | Integer | Page size. | 10 |
total | Integer | Total number of schemas. | 2 |
Schema details
Each schema object in data contains the following field.
| Parameter | Type | Description | Example |
|---|---|---|---|
schemaName | String | Schema name. | public |
Successful response
{
"success": true,
"requestId": "Ci8z3CJA-EKHHvMPnFKLq2XPdDFn7VWQ",
"data": [
{ "schemaName": "ninedata" },
{ "schemaName": "public" }
],
"current": 1,
"pageSize": 10,
"total": 2
}