ORM Studio

API Explorer

Browse every route Studio finds in src/, build requests with params, headers, Bearer auth and JSON bodies, and send them through the Studio proxy.

5 min readUpdated DocumentationEdit this page
On this page11

The Endpoints view (#/endpoints, shortcut g e) lists every HTTP route Studio found in your source and turns each one into a request builder. Requests go through Studio's own proxy, so there is no CORS setup and you see every response header.

Route discovery

Studio scans the .ts and .js files in src/ for calls on app, router or this with a literal path:

TypeScript
TS
app.get('/health', health)
router.post('/users', authenticate(jwt), validate({ body: userSchema }), createUser)
router.delete('/users/:id', authenticate(jwt), requireRole('admin'), removeUser)

For each call it records:

FieldTaken from
Methodget, post, put, patch, delete, head or options
PathThe first argument (must start with /)
HandlerThe last argument: a function or method reference such as createUser or users.list, otherwise anonymous
MiddlewareThe arguments in between, by name (authenticate(jwt) becomes authenticate; inline functions become inline)

Duplicate method + path pairs are listed once. Press Refresh data after adding routes.

Endpoint list

The left pane shows all routes, grouped by their first path segment (/users, /products, ...):

  • Search: filters by method, path, handler name and middleware names.
  • Method chips: ALL plus one chip per method present (GET, POST, PUT, PATCH, DELETE), each with a count.
  • Groups: click a group header to collapse or expand it. Collapsed groups open again while you search.
  • Lock icon: shown on routes with a middleware whose name contains "auth" (for example authenticate).

Selecting a route opens its request builder; the URL becomes #/endpoints/METHOD/ followed by the URL-encoded path. On narrow screens the list and the builder are shown one at a time, with an All endpoints back button.

Request builder

The header shows the method and path, the handler name and the middleware tags (auth middleware is highlighted). Two buttons sit on the right:

  • Copy as cURL: a curl command with the resolved URL, headers (including the Bearer token and Content-Type: application/json when there is a body) and --data-raw body.
  • Copy URL: the full resolved URL.

Below it, the URL bar shows the resolved URL as you edit it (app URL, path with parameter values filled in, query string) next to the Send button.

Params

  • Path parameters: one required field per :param. Parameters whose name ends in id start with 1. Sending with an empty path parameter shows a warning and focuses the field.
  • Query parameters: name/value rows. A new empty row appears as you type; each row has an enable checkbox and a remove button.

Headers

Name/value rows with the same enable checkbox. Content-Type: application/json is added automatically when a body is sent, and the Auth tab adds Authorization.

Auth

A Bearer token field (masked, with a show/hide toggle and Clear). The token is saved in this browser's localStorage and sent as Authorization: Bearer ... on every request from every endpoint, unless you set your own Authorization header. If the route uses auth middleware, the tab names it.

Body

Available for POST, PUT, PATCH and DELETE. POST, PUT and PATCH start with a sample JSON body guessed from the path (login, register, users, products, orders, posts, otherwise a generic object).

  • Live validation: Valid JSON, Empty body, or the parse error.
  • Format pretty-prints the JSON, Sample restores the sample, Clear empties it.

GET and HEAD requests never send a body.

History

The last 10 requests to this endpoint, with status (or ERR), resolved path, duration and time. Click an entry to restore its parameters, headers and body. Clear history removes the list. History is stored in the browser.

Sending a request

Press Send or Ctrl Enter / Cmd Enter. Studio posts the request to POST /api/studio/proxy, which forwards it to your app and returns the full response:

  • Only your app: the proxy always targets http://localhost: plus your app port. The path must start with /; full URLs are rejected.
  • No CORS: the browser only talks to Studio, so your app needs no CORS headers for testing.
  • Full response headers come back, not just the CORS-safelisted ones a browser would expose to a cross-origin script.
  • Redirects are not followed: you see the 3xx response itself.
  • Requests time out after 30 seconds. Bodies over 5 MB are truncated (the response says so).
  • Hop-by-hop headers (Host, Connection, Content-Length, ...) are not forwarded.

Note

The proxy endpoint only accepts Content-Type: application/json bodies. That forces a CORS preflight, which only local origins pass, so other websites can't use Studio to call your app.

Response

The response card shows the status (colored by class), time, size and content type, with three tabs:

TabShows
BodyPretty-printed, highlighted JSON, or the raw text for other content
HeadersAll response headers, sorted by name, with a count
RawThe status line, headers and body as plain text

Copy body copies the (pretty-printed) body.

When the app is down

If the proxy cannot connect, the card shows Can't reach your app with the error (for example Could not reach the app at http://localhost:3000 (ECONNREFUSED). Is it running?), a reminder to start it with axil run, and a Retry button. The sidebar status switches to App not running. Other failures (bad input to the proxy) show Request could not be proxied.

Was this page helpful?

Help improve the documentation

AxilJS is open source and documentation improvements are welcome.

AxilJS DocumentationMIT License · Built by SyntaxilitY