---
title: "Change DAG file ID"
method: POST
path: "/dags/{fileName}/rename"
tags: ["dags"]
---

# Change DAG file ID

`POST /dags/{fileName}/rename`

Changes the file ID of the DAG definition

## Path parameters

- `fileName` string, regex, required — Name of the DAG file

## Query parameters

- `remoteNode` string

## Request body

- object
  - `newFileName` string, required — New file name for the DAG

## Response `200`

A successful response

## Other responses

- `400` — Invalid request
- `404` — DAG not found
- `default` — Generic error response

---

[API](https://skmtc.net/dagucloud/apis/dagu.md) · [All operations](https://skmtc.net/dagucloud/apis/dagu/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dagucloud/dagu/revisions/93cc41f2018a/schema)
