---
title: "Get a diagram"
method: GET
path: "/api/files/{fileId}/diagrams/{diagramId}"
---

# Get a diagram

`GET /api/files/{fileId}/diagrams/{diagramId}`

Retrieves a specific diagram from a file.

## Path parameters

- `fileId` string, required
- `diagramId` string, required

## Response `200`

The diagram

- Diagram
  - `id` string, required — Unique identifier for the diagram
  - `diagramUrl` string, required — URL to view the diagram in the Eraser canvas
  - `diagramType` 'sequence-diagram' | 'entity-relationship-diagram' | 'cloud-architecture-diagram' | 'flowchart-diagram' | 'bpmn-diagram', required — Type of the diagram
  - `code` string, required — Eraser DSL code for the diagram
  - `updatedAt` string, date-time, required — ISO 8601 timestamp of when the diagram was last updated

## Other responses

- `400` — Invalid file ID or diagram ID
- `401` — Missing or invalid bearer token
- `403` — Unauthorized
- `404` — File or diagram not found
- `500` — Internal server error

---

[API](https://skmtc.net/eraser/apis/render.md) · [All operations](https://skmtc.net/eraser/apis/render/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/eraser/render/versions/c31350b435dc/schema)
