Skip to main content

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

ParameterTypeRequiredDescriptionExample
datasourceIdStringYesData source ID. Call Retrieve Data Source List to get the value.ds-d92qvqp8o1fw
databaseNameStringNoDatabase name. Optional; when supplied, the API queries the specified database. Call Get Database List to get the value.9zcloud
currentIntegerNoPage number, starting from 1. The default is 1.1
pageSizeIntegerNoPage size. The default is 10.10

Response parameters

ParameterTypeDescriptionExample
successBoolWhether the call succeeded. Values: true or false.true
requestIdStringRequest ID.Ci8z3CJA-EKHHvMPnFKLq2XPdDFn7VWQ
dataArraySchema list. Each item includes schemaName.{"schemaName":"public"}
currentIntegerCurrent page number.1
pageSizeIntegerPage size.10
totalIntegerTotal number of schemas.2

Schema details

Each schema object in data contains the following field.

ParameterTypeDescriptionExample
schemaNameStringSchema name.public

Successful response

{
"success": true,
"requestId": "Ci8z3CJA-EKHHvMPnFKLq2XPdDFn7VWQ",
"data": [
{ "schemaName": "ninedata" },
{ "schemaName": "public" }
],
"current": 1,
"pageSize": 10,
"total": 2
}