---
title: "Preview which monitors an OpenAPI spec would create, without creating them"
method: POST
path: "/api/v1/endpoints/import-openapi/preview"
tags: ["endpoints"]
---

# Preview which monitors an OpenAPI spec would create, without creating them

`POST /api/v1/endpoints/import-openapi/preview`

## Request

- Base URL: `https://monit.rs`
- URL: `https://monit.rs/api/v1/endpoints/import-openapi/preview`
- Auth: HTTP bearer

## Request body

- OpenAPIImportRequest
  - `spec_url` string, required
  - `base_url` string, nullable
  - `interval_seconds` integer
  - `include_write_methods` boolean
  - `include_path_params` boolean
  - `headers` object, nullable
  - `auth_config` object, nullable
  - `query_params` object, nullable
  - `selected` object[], nullable

## Response `200`

Successful Response

- OpenAPIImportPreviewResponse
  - `spec_url` string, required
  - `base_url` string, required
  - `total_paths` integer, required
  - `available_tags` string[], required
  - `limit_max` integer, required
  - `limit_remaining` integer, required
  - `over_limit_count` integer, required
  - `candidates` OpenAPIImportCandidate[], required
    - `path` string, required
    - `method` string, required
    - `url` string, required
    - `name` string, required
    - `tags` string[]
    - `params` string[]
  - `skipped` OpenAPIImportSkipped[], required
    - `path` string, required
    - `method` string, required
    - `reason` string, required

## Other responses

- `400`: Invalid request.
- `422`: Validation Error
- `502`: Upstream fetch failed.

---

[API](https://skmtc.dev/monit/apis/monit-rs-public-api.md) · [All operations](https://skmtc.dev/monit/apis/monit-rs-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/monit/apis/monit-rs-public-api/revisions/7e1923981112?raw)
