← All native models

Native model

portal_route

Declare a named portal_route value and reference it as portal_route.your_name. Models have no separate platform identity or lifecycle.

Topics: Surfaces

Fields

One server route: Lua answering a method at a path under /api.

object
methodRequired

The HTTP method the route answers.

string
Allowed values
["GET","POST","PUT","PATCH","DELETE"]
pathRequired

The route's full path under /api, such as /api/orders/:id.

string
Minimum length
1
sourceRequired

The route's Lua; its exports.handler answers the request.

string
Format
"lua"
Minimum length
0

Only the fields listed here are accepted.