---
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' | 'unknown_env_binding' | 'unknown_const_name' — Machine-readable reason why the reference was preserved.
    - `class` 'defect' | 'runtime_only' — Whether the reference is a defect in the spec or its availability depends on runtime values or lifecycle scope.

## Other responses

- `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/f8982f33e540/schema)
