SQL API

Get schema details

Changed on

Retrieve the schema information for the available tables in the SQL API's indexed data.

This includes table names, column definitions, data types, and indexed fields.

get/v2/data/query/schema

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP bearer

Query parameters

database, 'base' | 'base_sepolia' | 'solana' | 'hyperevm'

The name of the database to query. Defaults to "base" when not specified.

table, string

Get the schema for a specific table.

Response

Schema information retrieved successfully.

OnchainDataSchemaResponse required

Schema information for available blockchain data tables.

tables, OnchainDataTableSchema[]

List of available tables.

Example response

{
  "tables": [
    {
      "database": "base",
      "table": "events",
      "columns": [
        {
          "name": "event_signature",
          "type": "String",
          "nullable": false,
          "description": "The signature of the decoded event log.",
          "indexOrder": 0
        }
      ]
    }
  ]
}

Changes

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new entity_not_configured_for_top_up enum value to the errorType response property for the response status

    1 more change in this revision