Why you'll love it
Made for coding agents
Every repository, no extra code
The same rules as your admin
A well-known standard
How the API works
Every repository is served at /uchi/api/:resource and follows the JSON:API specification. Records are built from the repository's fields: associations become relationships, and everything else becomes attributes.
Lists are paginated, searched with filter[search], sorted with sort and trimmed to the fields you ask for with fields, all as the specification describes. Creating and updating records only accepts the fields from your forms, and validation errors point to the attribute that caused them. The API documentation lists every endpoint and status code.
Implementation
Your repositories are already an API
The API comes with Uchi 0.5.0 and uses the repositories you already have. It shares the admin's authentication by default. To give a coding agent its own access, define Uchi::Api::ApplicationController and authenticate requests with a token.
Dig deeper
Everything you need to know, in the documentation.