Restify for Laravel for Rust

Docs / Reference

Reference

every endpoint, parameter, response shape and status code.

Paths below are for a repository named posts with the default prefix.

Endpoints #

RequestActionSuccessBody
GET /api/restify/postsIndex200A page
GET /api/restify/posts/{id}Show200{ "data": resource }
POST /api/restify/postsStore201, with a Location header{ "data": resource }
PUT /api/restify/posts/{id}Update200{ "data": resource }
POST /api/restify/posts/{id}Update200{ "data": resource }, as PUT
PATCH /api/restify/posts/{id}Update200{ "data": resource }
DELETE /api/restify/posts/{id}Delete204Empty
DELETE /api/restify/documents/{id}/field/{field}Update204, or 404 when {field} isn't a deletable file fieldEmpty. Deletes one file field's file. See Files and images
GET /api/restify/posts/actions and /{id}/actionsThe action's can_see200{ "data": [action, ..] }
POST /api/restify/posts/actions?action={key} (or /action)The action's can_run200What handle returned
POST /api/restify/posts/{id}/actions?action={key} (or /{id}/action)The action's can_run200What handle returned
GET /api/restify/posts/getters and /{id}/gettersThe getter's can_see200{ "data": [getter, ..] }
GET /api/restify/posts/getters/{key}The getter's can_run200What handle returned
GET /api/restify/posts/{id}/getters/{key}The getter's can_run200What handle returned
GET /api/restify/posts/filtersAllowRestify200{ "data": [filter, ..] }. See Listing the filters
POST /api/restify/posts/apply-restify-advanced-filtersIndex200A page, filtered by the body's filters. See Advanced filters
GET /api/restify/search?search=..AllowRestify and Show, in each repository added with global_search200{ "data": [result, ..] }. See Global search
POST /api/restify/posts/bulkStoreBulk, once200{ "data": [model, ..] }, each model's own JSON
POST /api/restify/posts/bulk/updateUpdateBulk, per item200{}
DELETE /api/restify/posts/bulk/deleteDeleteBulk, per item200[]
GET /api/restify/posts/{id}/comments and /{id}/comments/{commentId}Show on the post, then the comments' own actionAs GET /comments and GET /comments/{id}Only the post's comments. See Relationships
POST, PUT, PATCH, DELETE under /api/restify/posts/{id}/commentsShow and Update on the post, then the comments' own actionAs the comments' own routesThe post's key is set on a new comment
POST /api/restify/teams/{id}/attach/usersAttach("users"), per user201{ "data": [join row, ..] }
POST /api/restify/teams/{id}/detach/usersDetach("users"), per user204Empty
POST /api/restify/teams/{id}/sync/usersSync("users"), once200[]
POST /mcp/restify200, or 202 for a notificationA JSON-RPC message
GET /api/restify/profileShow, on the logged-in user200{ "data": resource }
PUT or POST /api/restify/profileUpdate, on the logged-in user200{ "data": resource }
POST /api/registerNone200resource, with meta.token
POST /api/loginNone200resource, with meta.token
POST /api/logoutNone200{ "message": "Successfully logged out." }
POST /api/forgotPasswordNone200{ "message": "Reset password link sent to your email." }
POST /api/resetPasswordNone200{ "message": "Your password has been successfully reset." }
POST /api/verify/{id}/{hash}None; the link's signature302Empty; location is your frontend's page

These routes are only there when the application turns them on: profile adds the profile, auth adds register, login and logout, password_reset adds forgot and reset password, and email_verification adds verify. See Authentication.

Every request is first asked for Action::AllowRestify, without a model. See Authorization.

Create and update take a JSON object of the input struct's fields, at the top level: { "title": "Hello" }. So does an action, and an action on the list also takes repositories. See Actions and getters.

The three bulk endpoints take a JSON array: of Store inputs, of { "id": .., ..fields }, or of ids. See Bulk operations.

List parameters #

ParameterExampleDoes
search?search=rustKeeps rows where a search column contains the text
A filter column or scope?votes=10, ?filter[votes]=10, ?body=nullKeeps rows that match, as the field's kind of match compares. See Filtering
- and a filter column or scope?-votes=10, ?filter[-votes]=10Keeps rows that don't match
sort?sort=-votes,titleSorts; a leading - is descending. The key breaks ties
page or page[number]?page=2The page; default 1
perPage or page[size]?perPage=50The page size; default PER_PAGE, at most RESTIFY_MAX_PER_PAGE when the application sets it
related?related=user,comments.user, ?related=user[name]Loads the relationships the repository lists, with a dot for nested ones and [a|b] to pick columns. Other names are ignored. Show takes it too. See Relationships
include?include=userThe same as related, read only when related is absent
relatablePerPage?relatablePerPage=5How many related models a list relationship loads for each record. See Relationships
filters?filters=<base64 JSON>The advanced filters
group_by?group_by=user_idGroups by groupable columns. See Grouping
withMeta?withMeta=trueAdds each listed record's meta. See Authorization

Any other parameter is ignored, as are filters and sorts on columns the repository doesn't mark.

A resource #

{
    "id": "2",
    "type": "posts",
    "attributes": {
        "user_id": 1,
        "title": "Restify",
        "body": "APIs for humans and agents",
        "excerpt": "APIs for humans and...",
        "votes": 30,
        "featured": 0,
        "rating": "3.00",
        "published_at": "2026-01-03T12:30:00.000000Z",
        "created_at": "2026-01-03T12:00:00.000000Z"
    }
}

id is the model's key as a string. type is the repository's resource_type, the model's table by default. attributes holds the repository's fields, in the order it lists them: the ones the view shows and the request may see. This is the example app's post as an admin sees it; a list leaves body out, and another user doesn't get featured.

A shown resource also has meta, with what the user may do with it. See Authorization. A listed resource has it only with ?withMeta=true, and leaves attributes out when it shows no field.

A request with ?related= adds a relationships key. Each loaded relationship is a resource of the related repository, a list of them, or the related model's own JSON for one declared with Related::raw. See Relationships.

A page #

{
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 3,
        "path": "https://example.com/api/restify/posts",
        "per_page": 15,
        "to": 15,
        "total": 42
    },
    "links": {
        "first": "https://example.com/api/restify/posts?page=1",
        "next": "https://example.com/api/restify/posts?page=2",
        "path": "https://example.com/api/restify/posts",
        "prev": null,
        "filters": "/api/restify/posts/filters"
    },
    "data": [resource, resource]
}

As in Restify for PHP, there is no last link, a page link carries the page number alone, and filters is a path without the host.

Errors #

StatusWhenBody
401The middleware found no user{ "message": "Unauthenticated." }
403A request to the MCP server from a browser page on another origin that the CORS settings don't list for its path. See MCP{ "jsonrpc": "2.0", "error": { "code": -32600, "message": "The request's origin isn't allowed." } }
403authorize, a policy, or the input's own check refused{ "message": "This action is unauthorized." }, or another text of Authorization
404No model has the key, or query leaves it out{ "message": "No query results for model [Post]." }
404No action or getter has the key, or no route has the path{ "message": ".." }, such as Action not found.
404The path's first part names no repository, such as /api/restify/widgets{ "message": "Repository widgets not found." } (Restify for PHP answers 500: a PHP bug)
422The input is invalid{ "message": "..", "errors": { "field": [".."] } }
422?group_by= names a column that isn't groupable{ "message": "The column [..] is not allowed for grouping. Allowed columns are: .." }
422?filters= isn't base64 of a JSON list or object{ "message": "..", "errors": { "filters": [".."] } } (Restify for PHP answers 500: a PHP bug)

A bulk request's field errors name the item by its position, such as 1.title. See Bulk operations.

An MCP tool returns an error as a tool result with isError: true, in the words of Laravel's MCP server. See MCP.

Commands #

CommandDoes
laravel restify:listPrints each repository, its endpoint and its columns, then its actions and getters
laravel restify:list --jsonPrints the same as JSON, with the MCP tool names. An action or getter the MCP server doesn't serve, such as one of a repository with no const MCP, has no tool: - in the table, null in the JSON
laravel restify:installWrites the two skills for AI coding agents to .agents/skills and .claude/skills
laravel restify:install --path <dir>Writes them to another application directory
laravel restify:openapiPrints the OpenAPI document as JSON
laravel restify:openapi --output <path>Writes it to a file
laravel restify:import <manifest>Writes an application's Restify code from a PHP application's restify:export file (feature import). Takes --check, --migrations, --force and --path. See Migrating from Restify for PHP