All Products
Search
Document Center

Data Management:ListColumns

Last Updated:Jul 15, 2024

Returns the column information of a table.

Operation description

You can call this operation only for database instances whose control mode is Security Collaboration.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TidlongNo

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

3***
TableIdstringYes

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

39281****
LogicbooleanYes

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

  • true: The database is a logical database.
  • false: The database is a physical database.
false

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

0AD9AC55-5873-474A-9F33-4285806A3619
ErrorCodestring

The error code returned.

UnknownError
ColumnListarray<object>

The details about columns.

object

The details about fields in the table.

ColumnTypestring

The data type of the column.

varchar
AutoIncrementboolean

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

  • true: The column is an auto-increment column.
  • false: The column is not an auto-increment column.
false
ColumnIdstring

The ID of the column.

62589****
DefaultValuestring

The default value of the column.

def_value
Sensitiveboolean

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

  • true: The column is a sensitive column.
  • false: The column is not a sensitive column.
false
ColumnNamestring

The name of the column.

name
SecurityLevelstring

The security level of the column. Valid values:

  • INNER: The column is an internal column but not sensitive.
  • SENSITIVE: The column is a sensitive column.
  • CONFIDENTIAL: The column is a confidential column.
Note For more information, see Sensitivity levels of fields.
INNER
Descriptionstring

The description of the column.

test
DataPrecisioninteger

The number of valid digits for the field.

0
DataScaleinteger

The number of decimal places for the field.

0
FunctionTypestring

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.
DEFAULT
Nullableboolean

Indicates whether the column can be empty. Valid values:

  • true: The column can be empty.
  • false: The column cannot be empty.
false
DataLengthlong

The length of the field.

4
ErrorMessagestring

The error message returned.

UnknownError
Successboolean

Indicates whether the request was successful. Valid values:

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

Examples

Sample success responses

JSONformat

{
  "RequestId": "0AD9AC55-5873-474A-9F33-4285806A3619",
  "ErrorCode": "UnknownError",
  "ColumnList": {
    "Column": [
      {
        "ColumnType": "varchar",
        "AutoIncrement": false,
        "ColumnId": "62589****",
        "DefaultValue": "def_value",
        "Sensitive": false,
        "ColumnName": "name",
        "SecurityLevel": "INNER",
        "Description": "test",
        "DataPrecision": 0,
        "DataScale": 0,
        "FunctionType": "DEFAULT",
        "Nullable": false,
        "DataLength": 4
      }
    ]
  },
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history