Queries the fields in a 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.

Tid Long Yes 3***

The ID of the tenant. You can call the GetUserActiveTenant operation to obtain the tenant ID.

TableId String Yes 39281****

The ID of the table. You can call the ListTables operation to obtain the table ID.

Logic Boolean Yes false

Specifies whether the database is a logical database. Valid values:

  • true: The database is a logical database.
  • false: The database is a physical database.
RegionId String No cn-hangzhou

The ID of the region in which Data Management (DMS) is activated. For more information, see RegionID parameter.

Response parameters

Parameter Type Example Description
RequestId String 0AD9AC55-5873-474A-9F33-4285806A3619

The ID of the request.

ErrorCode String UnknownError

The error code returned.

ColumnList Array of Column

The information about the columns returned.

Column
ColumnType String varchar

The data type of the field.

AutoIncrement Boolean false

Indicates whether the field is an auto-increment field. Valid values:

  • true: The field is an auto-increment field.
  • false: The field is not an auto-increment field.
ColumnId String 62589****

The ID of the field.

DefaultValue String def_value

The default value of the field.

Sensitive Boolean false

Indicates whether the field is a sensitive field. Valid values:

  • true: The field is a sensitive field.
  • false: The field is not a sensitive field.
ColumnName String name

The name of the field.

SecurityLevel String INNER

The security level of the field. Valid values:

  • INNER: The field is an internal field but not sensitive.
  • SENSITIVE: The field is a sensitive field.
  • CONFIDENTIAL: The field is a confidential field.
Description String test

The description of the field.

DataPrecision Integer 0

The number of valid digits for the field.

DataScale Integer 0

The number of decimal places for the field.

FunctionType String DEFAULT

The type of the masking algorithm that is used for the field. Valid values:

  • null: No masking algorithm is used.
  • DEFAULT: A full masking algorithm is used.
  • FIX_POS: The fixed position is masked.
  • FIX_CHAR: The fixed characters are replaced.
Nullable Boolean false

Indicates whether the field can be empty. Valid values:

  • true: The field can be empty.
  • false: The field cannot be empty.
DataLength Long 4

The length of the field.

ErrorMessage String UnknownError

The error message returned.

Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.

Examples

Sample request

http(s)://dms-enterprise.aliyuncs.com/?Action=ListColumns
&Tid=3***
&TableId=39281****
&Logic=false
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListColumnsResponse>
    <RequestId>0AD9AC55-5873-474A-9F33-4285806A3619</RequestId>
    <ColumnList>
        <ColumnId>62589****</ColumnId>
        <ColumnName>name</ColumnName>
        <Description/>
        <ColumnType>varchar(4)</ColumnType>
        <AutoIncrement>false</AutoIncrement>
        <SecurityLevel>INNER</SecurityLevel>
        <DataLength>4</DataLength>
        <Sensitive>false</Sensitive>
        <Nullable>false</Nullable>
    </ColumnList>
    <Success>true</Success>
</ListColumnsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "0AD9AC55-5873-474A-9F33-4285806A3619",
  "ColumnList" : [ {
    "ColumnId" : "62589****",
    "ColumnName" : "name",
    "Description" : "",
    "ColumnType" : "varchar(4)",
    "AutoIncrement" : false,
    "SecurityLevel" : "INNER",
    "DataLength" : 4,
    "Sensitive" : false,
    "Nullable" : false
  } ],
  "Success" : true
}

Error codes

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