---
title: "Retrieve DAG specification"
method: GET
path: "/dags/{fileName}/spec"
tags: ["dags"]
---

# Retrieve DAG specification

`GET /dags/{fileName}/spec`

Fetches the YAML specification of a DAG definition

## Path parameters

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

## Query parameters

- `remoteNode` string

## Response `200`

A successful response

- object
  - `dag` DAGDetails — unresolved $ref
  - `spec` string, required — The DAG spec in YAML format
  - `errors` string[], required — List of errors in the spec
  - `valueReferenceNotices` ValueReferenceNotice[], required — Passive value-reference notices produced while loading this spec. These notices are not persisted.
    - `message` string, required — Human-readable explanation of the unresolved reference.
    - `fieldPath` string — DAG field path associated with the unresolved reference.
    - `token` string — Original value-reference token that was preserved.
    - `reason` 'unknown_step_id' | 'unknown_output_name' | 'missing_dependency' | 'self_reference' | 'namespace_unavailable' | 'unknown_context_field' — Machine-readable reason why the reference was preserved.

## Other responses

- `default` — Generic error response

## Changes

- **2026-07-26** (v1) `f6dcf7250db7` — 2 info
  - added the optional property `dag/tasks` to the response with the `200` status
  - added the optional property `dag/type` to the response with the `200` status
- **2026-07-23** (v1) `75b8e91aaf57` — 3 warning, 5 info
  - added the new `conflict` enum value to the `code` response property for the response status `default`
  - added the new `human_task_resume_failed` enum value to the `code` response property for the response status `default`
  - added the new `payload_too_large` enum value to the `code` response property for the response status `default`
  - added the optional property `dag/handlerOn/abort/humanTask` to the response with the `200` status
  - …4 more
- **2026-07-09** (v1) `9d0cf8f4b61c` — 11 breaking, 11 info
  - the response property `dag/handlerOn/abort/preconditions/items/condition` became optional for the status `200`
  - the response property `dag/handlerOn/abort/repeatPolicy/condition/condition` became optional for the status `200`
  - the response property `dag/handlerOn/exit/preconditions/items/condition` became optional for the status `200`
  - the response property `dag/handlerOn/exit/repeatPolicy/condition/condition` became optional for the status `200`
  - …18 more
- **2026-07-05** (v1) `d7353977efc3` — 1 info
  - added the optional property `dag/schedule/items/profile` to the response with the `200` status
- …earlier changes not shown

[Full history](https://skmtc.dev/dagucloud/apis/dagu/changes/dags/:fileName/spec/get.md)

---

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