Queries the versions of a metadata table in Data Lake Formation (DLF) by page.

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 headers

This operation uses only common request headers. For more information, see Common request parameters.

Request syntax

GET /api/metastore/catalogs/databases/tables/versions/list 

Request parameters

Parameter Type Position Required Example Description
CatalogId String Query No 1344371

The catalog ID of the metadatabase. Default value: the user ID of your Alibaba Cloud account.

DatabaseName String Query No database_test

The name of the metadatabase.

TableName String Query No test_table_20200715162543389

The name of the metadata table.

NextPageToken String Query No ''

The pagination token. The token is returned in the return results. If no pagination token is returned, set this parameter to an empty string.

PageSize Integer Query No 10

The number of entries to return on each page.

RegionId String Host No cn-hangzhou

The ID of the region where DLF is activated.

Response parameters

Parameter Type Example Description
Code String OK

The description of the status code.

Message String .

The error message that is returned.

NextPageToken String 2cb472ec1bf84f8d92f9c4baa0d21c19aa

The pagination token.

RequestId String B7F4B621-E41E-4C84-B97F-42B5380A32BB

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

TableVersions Array of TableVersion

The list of metadata tables of the specified version.

Error codes

NoSuchObject: The specified metadata table does not exist.

InternalError: An internal error has occurred. Troubleshoot the error based on the error message that is returned.

Examples

Sample requests

GET /api/metastore/catalogs/databases/tables/versions/list HTTP/1.1 
 {
    "TableName":"test_table_20200715162543389",
    "PageSize":"10",
    "NextPageToken":"''",
    "DatabaseName":"database_test",
    "RegionId":"cn-hangzhou",
    "CatalogId":"1344371"
}

Sample success responses

JSON format

{
  "Success": true,
  "Code": "OK",
  "Message": "",
  "HttpStatusCode": 200,
  "NextPageToken": "2cb472ec1bf84f8d92f9c4baa0d21c19aa",
  "RequestId": "B7F4B621-E41E-4C84-B97F-42B5380A32BB",
  "TableVersions": [
    { "VersionId":1,
      "Table":{
      "Cascade": false,
      "TableName": "test_table_20200715162543389",
      "DatabaseName": "hivedb",
      "TableType": "MANAGED_TABLE",
      "Description": "",
      "Retention": 365,
      "Sd": {
        "Cols": [
          {
            "Comment": "user_name",
            "Name": "name",
            "Type": "string",
            "Parameters": {}
          }
        ],
        "Compressed": false,
        "InputFormat": "input",
        "Location": "",
        "NumBuckets": 5,
        "OutputFormat": "output",
        "Parameters": {},
        "SerDeInfo": {
          "Name": "",
          "SerializationLib": "",
          "Parameters": {}
        },
        "SkewedInfo": {
          "SkewedColNames": [],
          "SkewedColValues": [],
          "SkewedColValueLocationMaps": {}
        },
        "BucketCols": [
          "col1"
        ],
        "SortCols": [
          {
            "Order": 0,
            "Col": "col"
          }
        ],
        "StoredAsSubDirectories": false
      },
      "PartitionKeys": [
        {
          "Comment": "comment_day",
          "Name": "day",
          "Type": "int",
          "Parameters": {}
        }
      ],
      "Parameters": {},
      "ViewOriginalText": "",
      "ViewExpandedText": "",
      "CreatedBy": "",
      "Privileges": {},
      "RewriteEnabled": true,
      "Temporary": false,
      "OwnerType": {},
      "CreateTime": 0,
      "UpdateTime": 0,
      "LastAccessTime": 0,
      "LastAnalyzedTime": 0
    }
    }
  ]
}

Error codes

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