---
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-06-20** (v1) `b8aca7ffd3a6` — 1 warning
  - added the new `unknown_context_field` enum value to the `valueReferenceNotices/items/reason` response property for the response status `200`
- **2026-06-19** (v1) `fbe9ec346872` — 1 info
  - added the optional property `valueReferenceNotices/items/reason` to the response with the `200` status
- **2026-06-18** (v1) `162df20bbef8` — 5 info
  - added the optional property `dag/handlerOn/abort/outputs` to the response with the `200` status
  - added the optional property `dag/handlerOn/exit/outputs` to the response with the `200` status
  - added the optional property `dag/handlerOn/failure/outputs` to the response with the `200` status
  - added the optional property `dag/handlerOn/success/outputs` to the response with the `200` status
  - …1 more
- **2026-06-17** (v1) `85dce880eeb5` — 1 info
  - added the required property `valueReferenceNotices` to the response with the `200` status
- **2026-05-24** (v1) `8a2d5d3e9608` — 1 warning
  - added the new `rate_limited` enum value to the `code` response property for the response status `default`

[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/c38bc1efbea3/schema)
