---
title: "create sql file"
method: POST
path: "/dataapps/sqleditor/{cluster_id}/sqlfiles"
tags: ["sqleditor"]
---

# create sql file

`POST /dataapps/sqleditor/{cluster_id}/sqlfiles`

create sql file

## Path parameters

- `cluster_id` string, required

## Request body

- SqleditorSQLFileReq
  - `cluster_id` string
  - `content` string
  - `database` string
  - `name` string

## Response `200`

OK

- SqleditorCreateSQLFileRes
  - `id` string

## Changes

- **2026-07-17** `631e4b26b7e8` — 1 info
  - endpoint added
- **2022-03-07** `e9e75c7c2edb` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/pingcap/apis/em-ui-api/changes/dataapps/sqleditor/:cluster_id/sqlfiles/post.md)

---

[API](https://skmtc.dev/pingcap/apis/em-ui-api.md) · [All operations](https://skmtc.dev/pingcap/apis/em-ui-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pingcap/em-ui-api/revisions/631e4b26b7e8/schema)
