SingleStore · Example Payload

Singlestore Execute Sql Example

Example request and response for executing a SQL statement via the SingleStore Data API

DatabaseSQLAnalyticsCloudDistributed SQL

Singlestore Execute Sql Example is an example object payload from SingleStore, with 4 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

titledescriptionrequestresponse

Example Payload

Raw ↑
{
  "title": "Execute SQL Statement Example",
  "description": "Example request and response for executing a SQL statement via the SingleStore Data API",
  "request": {
    "method": "POST",
    "url": "https://{workspace-host}/api/v2/exec",
    "headers": {
      "Authorization": "Bearer your-api-key-here",
      "Content-Type": "application/json"
    },
    "body": {
      "sql": "CREATE TABLE IF NOT EXISTS orders (id BIGINT AUTO_INCREMENT PRIMARY KEY, customer_id BIGINT NOT NULL, amount DECIMAL(10,2) NOT NULL, created_at DATETIME DEFAULT NOW())",
      "database": "production"
    }
  },
  "response": {
    "status": 200,
    "body": {
      "results": [
        {
          "lastInsertId": 0,
          "rowsAffected": 0
        }
      ]
    }
  }
}