You can call this operation to query detailed information of columns in a specified table.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListColumns

The operation that you want to perform. Set the value to ListColumns.

Logic Boolean Yes false

Specifies whether the table is a logical table.

TableId String Yes 1

The ID of the table.

Tid Long Yes 0

The ID of the tenant in Data Management (DMS) Enterprise.

Response parameters

Parameter Type Example Description
ColumnList

The detailed information of columns.

Column

The detailed information of a column.

AutoIncrement Boolean false

Indicates whether the column was an auto-increment column.

ColumnId String 1

The ID of the field.

ColumnName String name

The name of the field.

ColumnType String varchar

The type of the field.

DataLength Long 32

The length of the field.

DataPrecision Integer 0

The precision of the field.

DataScale Integer 0

The scale of the field.

DefaultValue String def_value

The default value of the field.

Description String test

The description of the field.

FunctionType String default

The masking algorithm type of the field. Valid values:

  • null: No masking algorithm was applied.
  • DEFAULT: A full masking algorithm was applied.
  • FIX_POS: The fixed position was masked.
  • FIX_CHAR: The fixed characters were replaced.
Nullable Boolean true

Indicates whether the column can be null.

SecurityLevel String INNER

The security level of the field. Valid values:

  • INNER
  • SENSITIVE
  • CONFIDENTIAL
Sensitive Boolean false

Indicates whether the field was a sensitive field.

ErrorCode String UnknownError

The error code.

ErrorMessage String UnknownError

The error message.

RequestId String 0AD9AC55-5873-474A-9F33-4285806A3619

The ID of the request.

Success Boolean true

Indicates whether the request was successful.

Examples

Sample requests


http(s)://[Endpoint]/? Action=ListColumns
&Logic=false
&TableId=1
&Tid=0
&<Common request parameters>

Sample success responses

XML format

<ColumnList>
    <Column>
        <ColumnId>314036829</ColumnId>
        <DataScale>0</DataScale>
        <Sensitive>false</Sensitive>
        <Description>Primary key ID</Description>
        <DataPrecision>20</DataPrecision>
        <ColumnType>bigint(20) unsigned</ColumnType>
        <ColumnName>id</ColumnName>
        <SecurityLevel>INNER</SecurityLevel>
        <AutoIncrement>true</AutoIncrement>
        <Nullable>false</Nullable>
    </Column>
    <Column>
        <ColumnId>314036830</ColumnId>
        <Sensitive>false</Sensitive>
        <Description>Creation time</Description>
        <DefaultValue>CURRENT_TIMESTAMP</DefaultValue>
        <ColumnType>datetime</ColumnType>
        <ColumnName>gmt_create</ColumnName>
        <SecurityLevel>INNER</SecurityLevel>
        <AutoIncrement>false</AutoIncrement>
        <Nullable>false</Nullable>
    </Column>
    <Column>
        <ColumnId>314036831</ColumnId>
        <Sensitive>false</Sensitive>
        <Description>Modification time</Description>
        <DefaultValue>CURRENT_TIMESTAMP</DefaultValue>
        <ColumnType>datetime</ColumnType>
        <ColumnName>gmt_modified</ColumnName>
        <SecurityLevel>INNER</SecurityLevel>
        <AutoIncrement>false</AutoIncrement>
        <Nullable>false</Nullable>
    </Column>
    <Column>
        <ColumnId>314036832</ColumnId>
        <Sensitive>false</Sensitive>
        <Description>base_user</Description>
        <ColumnType>varchar(64)</ColumnType>
        <DataLength>64</DataLength>
        <ColumnName>user_name</ColumnName>
        <SecurityLevel>INNER</SecurityLevel>
        <AutoIncrement>false</AutoIncrement>
        <Nullable>true</Nullable>
    </Column>
</ColumnList>
<RequestId>0AD9AC55-5873-474A-9F33-4285806A3619</RequestId>
<Success>true</Success>

JSON format

{
	"ColumnList":{
		"Column":[
			{
				"ColumnId":314036829,
				"Description":"Primary key ID",
				"Sensitive":false,
				"DataScale":0,
				"DataPrecision":20,
				"ColumnType":"bigint(20) unsigned",
				"ColumnName":"id",
				"AutoIncrement":true,
				"SecurityLevel":"INNER",
				"Nullable":false
			},
			{
				"ColumnId":314036830,
				"Description":"Creation time",
				"Sensitive":false,
				"DefaultValue":"CURRENT_TIMESTAMP",
				"ColumnType":"datetime",
				"ColumnName":"gmt_create",
				"AutoIncrement":false,
				"SecurityLevel":"INNER",
				"Nullable":false
			},
			{
				"ColumnId":314036831,
				"Description":"Modification time",
				"Sensitive":false,
				"DefaultValue":"CURRENT_TIMESTAMP",
				"ColumnType":"datetime",
				"ColumnName":"gmt_modified",
				"AutoIncrement":false,
				"SecurityLevel":"INNER",
				"Nullable":false
			},
			{
				"ColumnId":314036832,
				"Description":"base_user",
				"Sensitive":false,
				"ColumnType":"varchar(64)",
				"ColumnName":"user_name",
				"DataLength":64,
				"AutoIncrement":false,
				"SecurityLevel":"INNER",
				"Nullable":true
			}
		]
	},
	"RequestId":"0AD9AC55-5873-474A-9F33-4285806A3619",
	"Success":true
}

Error codes

For a list of error codes, visit the API Error Center.