Export Collections
Generate Postman v2.1, Insomnia v4 and OpenAPI 3.0.3 files from the routes Axil Studio discovers, then download, copy or preview them.
On this page7
The Export view (#/export, shortcut g x) turns the routes Studio discovered into ready-to-import API collections.
Export cards
There is one card per format, each showing the number of endpoints and the file name:
| Format | File | Import it via |
|---|---|---|
| Postman | postman-collection.json | Collection v2.1 — File › Import in Postman |
| Insomnia | insomnia-collection.json | Export format v4 — Application › Import in Insomnia |
| OpenAPI 3.0 | openapi.json | Any OpenAPI 3 tool: docs viewers, code generators, gateways |
Each card has Download and Copy JSON. Both are disabled when no routes were found. The same downloads are available from the command palette (Download Postman collection, Download Insomnia collection, Download OpenAPI spec).
Preview
The Preview card has four tabs:
- Endpoints: a table of every route with method, path (links to the request builder), handler and middleware tags.
- Postman, Insomnia, OpenAPI: the generated JSON, highlighted.
Generated files are cached in the page; Refresh data clears the cache so the next export reflects new routes.
What each format contains
Postman (Collection v2.1)
info.nameis<app name> API.- One folder per first path segment (
/users,/orders, ...), one request per route namedMETHOD /path. - Headers:
Content-Type: application/jsonand a disabledAuthorization: Bearer {{token}}. - Path parameters become URL variables (
:idwith value{{id}}). - POST, PUT and PATCH requests get a sample raw JSON body chosen by path (users, auth / login, posts, otherwise
{"key": "value"}). - Collection variables
baseUrl(your app URL) andtoken(empty).
Insomnia (export format v4)
- A workspace named
<app name> API. - A Development environment with
baseUrlandtoken. - One request per route, URL
{{ _.baseUrl }}/path, withContent-Type: application/jsonand disabled Bearer authentication using{{ _.token }}. - POST, PUT and PATCH requests get the body
{"key": "value"}.
OpenAPI 3.0.3
info.titleis<app name> API,info.versionis1.0.0, andserverscontains your app URL.- Paths use OpenAPI syntax (
/users/:idbecomes/users/{id}), one operation per route with summaryMETHOD /path. - Each operation is tagged with its first path segment.
- Path parameters are listed as required strings.
- POST, PUT and PATCH operations have a required
application/jsonrequest body (generic object schema). - Responses:
200,400,404and500.
Note
The spec is generated from route paths only. It has no request or response schemas beyond generic objects and no security schemes, so treat it as a starting point.
API endpoints
The files come from Studio's HTTP API, so you can also fetch them from scripts while axil run is running:
Was this page helpful?