---
title: "POST /#X-Amz-Target=AmazonAthena.ListTableMetadata"
method: POST
path: "/#X-Amz-Target=AmazonAthena.ListTableMetadata"
---

# POST /#X-Amz-Target=AmazonAthena.ListTableMetadata

`POST /#X-Amz-Target=AmazonAthena.ListTableMetadata`

Lists the metadata for the tables in the specified data catalog database.

## Query parameters

- `MaxResults` string
- `NextToken` string

## Headers

- `X-Amz-Target` 'AmazonAthena.ListTableMetadata', required

## Request body

- ListTableMetadataInput
  - `CatalogName` string, required — The name of the data catalog for which table metadata should be returned.
  - `DatabaseName` string, required — The name of the database for which table metadata should be returned.
  - `Expression` string — A regex filter that pattern-matches table names. If no expression is supplied, metadata for all tables are listed.
  - `NextToken` string — A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
  - `MaxResults` integer — Specifies the maximum number of results to return.

## Response `200`

Success

- ListTableMetadataOutput
  - `TableMetadataList` TableMetadata[] — A list of table metadata.
    - `Name` string, required — The name of the table.
    - `CreateTime` string, date-time — The time that the table was created.
    - `LastAccessTime` string, date-time — The last time the table was accessed.
    - `TableType` string — The type of table. In Athena, only <code>EXTERNAL_TABLE</code> is supported.
    - `Columns` Column[] — A list of the columns in the table.
      - `Name` string, required — The name of the column.
      - `Type` string — The data type of the column.
      - `Comment` string — Optional information about the column.
    - `PartitionKeys` Column[] — A list of the partition keys in the table.
      - `Name` string, required — The name of the column.
      - `Type` string — The data type of the column.
      - `Comment` string — Optional information about the column.
    - `Parameters` object — A set of custom key/value pairs for table properties.
  - `NextToken` string — A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

## Other responses

- `480` — InternalServerException
- `481` — InvalidRequestException
- `482` — MetadataException

---

[API](https://skmtc.net/aws/apis/athena.md) · [All operations](https://skmtc.net/aws/apis/athena/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/athena/versions/0aec8c61283d/schema)
