tidb · Example Payload

Tidb Cloud Chat2Query Example

Tidb Cloud Chat2Query Example is an example object payload from tidb, with 2 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

requestresponse

Example Payload

Raw ↑
{
  "request": {
    "method": "POST",
    "url": "https://data.tidbcloud.com/api/v1beta/app/dataapp-abc123/endpoint/chat2data",
    "headers": {
      "Authorization": "Bearer YOUR_DATA_APP_API_KEY",
      "Content-Type": "application/json"
    },
    "body": {
      "cluster_id": "1234567890123456789",
      "database": "ecommerce",
      "instruction": "Show me the top 10 customers by total order value in the last 30 days"
    }
  },
  "response": {
    "status": 200,
    "body": {
      "type": "sql_endpoint",
      "data": {
        "columns": [
          {"col": "customer_id", "data_type": "BIGINT", "nullable": false},
          {"col": "customer_name", "data_type": "VARCHAR", "nullable": true},
          {"col": "total_order_value", "data_type": "DECIMAL", "nullable": true}
        ],
        "rows": [
          {"customer_id": "1001", "customer_name": "Acme Corp", "total_order_value": "485320.50"},
          {"customer_id": "1042", "customer_name": "Global Tech LLC", "total_order_value": "312750.00"},
          {"customer_id": "2003", "customer_name": "Summit Retail", "total_order_value": "287430.75"}
        ],
        "result": {
          "code": 200,
          "message": "Query executed successfully",
          "row_count": 10,
          "row_affect": 0,
          "end_ms": 1714742400000,
          "latency": "42ms",
          "generated_sql": "SELECT c.id as customer_id, c.name as customer_name, SUM(o.total) as total_order_value FROM customers c JOIN orders o ON c.id = o.customer_id WHERE o.created_at >= DATE_SUB(NOW(), INTERVAL 30 DAY) GROUP BY c.id, c.name ORDER BY total_order_value DESC LIMIT 10"
        }
      }
    }
  }
}

Work with this as data

Every example 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 examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • 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 example
curl "https://apis.io/api/v1/examples/tidb-cloud-chat2query-example"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

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