---
title: "update sql file"
method: PUT
path: "/dataapps/sqleditor/{cluster_id}/sqlfiles/{sql_file_id}"
tags: ["sqleditor"]
---

# update sql file

`PUT /dataapps/sqleditor/{cluster_id}/sqlfiles/{sql_file_id}`

update sql file

## Path parameters

- `cluster_id` string, required
- `sql_file_id` string, required

## Request body

- SqleditorSQLFileUpdateReq
  - `cluster_id` string
  - `content` string
  - `database` string
  - `name` string
  - `sqlEditorFileID` string

## Response `200`

OK

- SqleditorUpdateSQLFileRes

## 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/:sql_file_id/put.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)
