import_data
Create a live mock API from existing artifacts. Auto-detects: OpenAPI 3.x / Swagger 2.0 spec (JSON or YAML) → resources with realistic seeded data, and non-CRUD paths (login, /search, RPC verbs like POST /invoices/{id}/send) become custom routes serving the spec's own examples verbatim; json-server db.json → hosts your exact records; Postman Collection v2.x → resources from requests, saved example responses become records verbatim; HAR (DevTools network export) or VCR/vcrpy cassette YAML → replayable mock of the recorded JSON APIs (these two up to 8 MB); bare JSON array of objects → one hosted collection; CSV/TSV → one typed collection (numbers/booleans inferred per column). Max 512 KB (HAR/cassette 8 MB). Returns {id, adminKey, baseUrl, warnings[], routes[]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | Optional: self-expiring project — auto-deletes after this many seconds (60–604800). Sandboxes for CI/eval runs clean themselves up. | |
| name | No | Project name override. Optional. | |
| seed | No | Records to seed per resource for OpenAPI specs (default 20, max 100). | |
| content | Yes | The raw spec / db.json / collection / CSV text. | |
| resource | No | CSV only: collection name (default items). |