---
title: "Export monitors as code"
method: GET
path: "/api/v1/config"
tags: ["config"]
---

# Export monitors as code

`GET /api/v1/config`

## Request

- Base URL: `https://puzaricloud.in` (the document declares no server; this is the origin it was published from)
- URL: `https://puzaricloud.in/api/v1/config`
- Auth: none declared

**Monitors as code.** Returns every monitor in the workspace as a desired-state document you can commit to git:

```yaml
version: 1
channels: [{name: Ops Telegram, kind: telegram}]   # names only, no secrets
monitors:
  - {name: Marketing site, mode: uptime, url: https://example.com, interval_minutes: 5, channels: [Ops Telegram], ...}
```

Each monitor lists the fields relevant to its mode (see `GET /api/v1/config/example` for a commented file). Feed the
document back with `PUT /api/v1/config` to apply changes. Requires a Business or Enterprise plan.

## Query parameters

- `format` string

## Response `200`

Successful Response

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/puzaricloud/apis/vigil-api.md) · [All operations](https://skmtc.dev/puzaricloud/apis/vigil-api/llms.txt) · [OpenAPI document](https://skmtc.dev/puzaricloud/apis/vigil-api/revisions/1cb93f81f1a7?raw)
