Amazon Redshift Metadata API

List databases, schemas, and tables in a Redshift data warehouse

GitHub OpenAPI

Operations 4

POST /#DescribeTable Describe Table #
POST /#ListTables List Tables #
POST /#ListDatabases List Databases #
POST /#ListSchemas List Schemas #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-redshift:amazon-redshift-metadata-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-redshift-metadata-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Redshift Metadata API
  version: '2012-12-01'
  description: Generated from AWS's published Smithy model for Amazon Redshift. 4 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://redshift-data.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#DescribeTable:
    post:
      operationId: DescribeTable
      summary: Describe Table
      description: 'Describes the detailed information about a table from metadata in the cluster. The information includes
        its columns. A token is returned to page through the column list. Depending on the authorization method, use one of
        the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn
        of a secret stored in Secrets Manager which has username and password. The specified secret contains credentials to
        connect to the database you specify. When you are connecting to a cluster, you also supply the database name, If you
        provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the secret. When
        you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials - when connecting
        to your data warehouse, choose one of the following options: When connecting to a serverless workgroup, specify the
        workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
        has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials operation is required.
        When connecting'
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DescribeTableResponse'
        '500':
          description: DatabaseConnectionException; InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DatabaseConnectionException'
        '400':
          description: QueryTimeoutException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/QueryTimeoutException'
        '404':
          description: ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - RedshiftData.DescribeTable
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DescribeTableRequest'
      tags:
      - Metadata
  /#ListTables:
    post:
      operationId: ListTables
      summary: List Tables
      description: 'List the tables in a database. If neither SchemaPattern nor TablePattern are specified, then all tables
        in the database are returned. A token is returned to page through the table list. Depending on the authorization method,
        use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide
        the secret-arn of a secret stored in Secrets Manager which has username and password. The specified secret contains
        credentials to connect to the database you specify. When you are connecting to a cluster, you also supply the database
        name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier stored in the
        secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary credentials
        - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless workgroup,
        specify the workgroup name and database name. The database user name is derived from the IAM identity. For example,
        arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials
        operation is required.'
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ListTablesResponse'
        '500':
          description: DatabaseConnectionException; InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DatabaseConnectionException'
        '400':
          description: QueryTimeoutException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/QueryTimeoutException'
        '404':
          description: ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - RedshiftData.ListTables
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/ListTablesRequest'
      tags:
      - Metadata
  /#ListDatabases:
    post:
      operationId: ListDatabases
      summary: List Databases
      description: 'List the databases in a cluster. A token is returned to page through the database list. Depending on the
        authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting
        to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified
        secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also
        supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier
        stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary
        credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless
        workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity.
        For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials
        operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database '
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ListDatabasesResponse'
        '500':
          description: DatabaseConnectionException; InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DatabaseConnectionException'
        '400':
          description: QueryTimeoutException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/QueryTimeoutException'
        '404':
          description: ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - RedshiftData.ListDatabases
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/ListDatabasesRequest'
      tags:
      - Metadata
  /#ListSchemas:
    post:
      operationId: ListSchemas
      summary: List Schemas
      description: 'Lists the schemas in a database. A token is returned to page through the schema list. Depending on the
        authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting
        to a cluster, provide the secret-arn of a secret stored in Secrets Manager which has username and password. The specified
        secret contains credentials to connect to the database you specify. When you are connecting to a cluster, you also
        supply the database name, If you provide a cluster identifier (dbClusterIdentifier), it must match the cluster identifier
        stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name. Temporary
        credentials - when connecting to your data warehouse, choose one of the following options: When connecting to a serverless
        workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity.
        For example, arn:iam::123456789012:user:foo has the database user name IAM:foo. Also, permission to call the redshift-serverless:GetCredentials
        operation is required. When connecting to a cluster as an IAM identity, specify the cluster identifier and the database
        na'
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ListSchemasResponse'
        '500':
          description: DatabaseConnectionException; InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DatabaseConnectionException'
        '400':
          description: QueryTimeoutException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/QueryTimeoutException'
        '404':
          description: ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - RedshiftData.ListSchemas
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/ListSchemasRequest'
      tags:
      - Metadata
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: redshift-data
  schemas:
    ColumnMetadata:
      type: object
      properties:
        isCaseSensitive:
          type: boolean
          description: A value that indicates whether the column is case-sensitive.
        isCurrency:
          type: boolean
          description: A value that indicates whether the column contains currency values.
        isSigned:
          type: boolean
          description: A value that indicates whether an integer column is signed.
        label:
          type: string
          description: The label for the column.
        name:
          type: string
          description: The name of the column.
        nullable:
          type: integer
          description: A value that indicates whether the column is nullable.
        precision:
          type: integer
          description: The precision value of a decimal number column, or the column length for a non-numeric column.
        scale:
          type: integer
          description: The scale value of a decimal number column.
        schemaName:
          type: string
          description: The name of the schema that contains the table that includes the column.
        tableName:
          type: string
          description: The name of the table that includes the column.
        typeName:
          type: string
          description: The database-specific data type of the column.
        length:
          type: integer
          description: The length of the column.
        columnDefault:
          type: string
          description: The default value of the column.
    DatabaseConnectionException:
      type: object
      properties:
        Message:
          type: string
      required:
      - Message
    DescribeTableRequest:
      type: object
      properties:
        ClusterIdentifier:
          type: string
          description: The cluster identifier. This parameter is required when connecting to a cluster and authenticating
            using either Secrets Manager or temporary credentials.
        SecretArn:
          type: string
          description: The name or ARN of the secret that enables access to the database. This parameter is required when
            authenticating using Secrets Manager.
        DbUser:
          type: string
          description: The database user name. This parameter is required when connecting to a cluster as a database user
            and authenticating using temporary credentials.
        Database:
          type: string
          description: The name of the database that contains the tables to be described. If ConnectedDatabase is not specified,
            this is also the database to connect to with your authentication credentials.
        ConnectedDatabase:
          type: string
          description: A database name. The connected database is specified when you connect with your authentication credentials.
        Schema:
          type: string
          description: The schema that contains the table. If no schema is specified, then matching tables for all schemas
            are returned.
        Table:
          type: string
          description: The table name. If no table is specified, then all tables for all matching schemas are returned. If
            no table and no schema is specified, then all tables for all schemas in the database are returned
        NextToken:
          type: string
          description: A value that indicates the starting point for the next set of response records in a subsequent request.
            If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken
            value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response
            records have been retrieved for the request.
        MaxResults:
          type: integer
          description: The maximum number of tables to return in the response. If more tables exist than fit in one response,
            then NextToken is returned to page through the results.
        WorkgroupName:
          type: string
          description: The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting
            to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
      required:
      - Database
    DescribeTableResponse:
      type: object
      properties:
        TableName:
          type: string
          description: The table name.
        ColumnList:
          type: array
          items:
            $ref: '#/components/schemas/ColumnMetadata'
          description: A list of columns in the table.
        NextToken:
          type: string
          description: A value that indicates the starting point for the next set of response records in a subsequent request.
            If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken
            value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response
            records have been retrieved for the request.
    ListDatabasesRequest:
      type: object
      properties:
        ClusterIdentifier:
          type: string
          description: The cluster identifier. This parameter is required when connecting to a cluster and authenticating
            using either Secrets Manager or temporary credentials.
        Database:
          type: string
          description: The name of the database. This parameter is required when authenticating using either Secrets Manager
            or temporary credentials.
        SecretArn:
          type: string
          description: The name or ARN of the secret that enables access to the database. This parameter is required when
            authenticating using Secrets Manager.
        DbUser:
          type: string
          description: The database user name. This parameter is required when connecting to a cluster as a database user
            and authenticating using temporary credentials.
        NextToken:
          type: string
          description: A value that indicates the starting point for the next set of response records in a subsequent request.
            If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken
            value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response
            records have been retrieved for the request.
        MaxResults:
          type: integer
          description: The maximum number of databases to return in the response. If more databases exist than fit in one
            response, then NextToken is returned to page through the results.
        WorkgroupName:
          type: string
          description: The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting
            to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
    ListDatabasesResponse:
      type: object
      properties:
        Databases:
          type: array
          items:
            type: string
          description: The names of databases.
        NextToken:
          type: string
          description: A value that indicates the starting point for the next set of response records in a subsequent request.
            If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken
            value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response
            records have been retrieved for the request.
    ListSchemasRequest:
      type: object
      properties:
        ClusterIdentifier:
          type: string
          description: The cluster identifier. This parameter is required when connecting to a cluster and authenticating
            using either Secrets Manager or temporary credentials.
        SecretArn:
          type: string
          description: The name or ARN of the secret that enables access to the database. This parameter is required when
            authenticating using Secrets Manager.
        DbUser:
          type: string
          description: The database user name. This parameter is required when connecting to a cluster as a database user
            and authenticating using temporary credentials.
        Database:
          type: string
          description: The name of the database that contains the schemas to list. If ConnectedDatabase is not specified,
            this is also the database to connect to with your authentication credentials.
        ConnectedDatabase:
          type: string
          description: A database name. The connected database is specified when you connect with your authentication credentials.
        SchemaPattern:
          type: string
          description: A pattern to filter results by schema name. Within a schema pattern, "%" means match any substring
            of 0 or more characters and "_" means match any one character. Only schema name entries matching the search pattern
            are returned.
        NextToken:
          type: string
          description: A value that indicates the starting point for the next set of response records in a subsequent request.
            If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken
            value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response
            records have been retrieved for the request.
        MaxResults:
          type: integer
          description: The maximum number of schemas to return in the response. If more schemas exist than fit in one response,
            then NextToken is returned to page through the results.
        WorkgroupName:
          type: string
          description: The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting
            to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
      required:
      - Database
    ListSchemasResponse:
      type: object
      properties:
        Schemas:
          type: array
          items:
            type: string
          description: The schemas that match the request pattern.
        NextToken:
          type: string
          description: A value that indicates the starting point for the next set of response records in a subsequent request.
            If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken
            value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response
            records have been retrieved for the request.
    ListTablesRequest:
      type: object
      properties:
        ClusterIdentifier:
          type: string
          description: The cluster identifier. This parameter is required when connecting to a cluster and authenticating
            using either Secrets Manager or temporary credentials.
        SecretArn:
          type: string
          description: The name or ARN of the secret that enables access to the database. This parameter is required when
            authenticating using Secrets Manager.
        DbUser:
          type: string
          description: The database user name. This parameter is required when connecting to a cluster as a database user
            and authenticating using temporary credentials.
        Database:
          type: string
          description: The name of the database that contains the tables to list. If ConnectedDatabase is not specified, this
            is also the database to connect to with your authentication credentials.
        ConnectedDatabase:
          type: string
          description: A database name. The connected database is specified when you connect with your authentication credentials.
        SchemaPattern:
          type: string
          description: A pattern to filter results by schema name. Within a schema pattern, "%" means match any substring
            of 0 or more characters and "_" means match any one character. Only schema name entries matching the search pattern
            are returned. If SchemaPattern is not specified, then all tables that match TablePattern are returned. If neither
            SchemaPattern or TablePattern are specified, then all tables are returned.
        TablePattern:
          type: string
          description: A pattern to filter results by table name. Within a table pattern, "%" means match any substring of
            0 or more characters and "_" means match any one character. Only table name entries matching the search pattern
            are returned. If TablePattern is not specified, then all tables that match SchemaPatternare returned. If neither
            SchemaPattern or TablePattern are specified, then all tables are returned.
        NextToken:
          type: string
          description: A value that indicates the starting point for the next set of response records in a subsequent request.
            If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken
            value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response
            records have been retrieved for the request.
        MaxResults:
          type: integer
          description: The maximum number of tables to return in the response. If more tables exist than fit in one response,
            then NextToken is returned to page through the results.
        WorkgroupName:
          type: string
          description: The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting
            to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
      required:
      - Database
    ListTablesResponse:
      type: object
      properties:
        Tables:
          type: array
          items:
            $ref: '#/components/schemas/TableMember'
          description: The tables that match the request pattern.
        NextToken:
          type: string
          description: A value that indicates the starting point for the next set of response records in a subsequent request.
            If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken
            value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response
            records have been retrieved for the request.
    QueryTimeoutException:
      type: object
      properties:
        Message:
          type: string
    ResourceNotFoundException:
      type: object
      properties:
        Message:
          type: string
          description: The exception message.
        ResourceId:
          type: string
          description: Resource identifier associated with the exception.
      required:
      - Message
      - ResourceId
    TableMember:
      type: object
      properties:
        name:
          type: string
          description: The name of the table.
        type:
          type: string
          description: The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY,
            ALIAS, and SYNONYM.
        schema:
          type: string
          description: The schema containing the table.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/redshift-data/service/2019-12-20/redshift-data-2019-12-20.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)