---
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

---

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