An operation is mapped to a HTTP method and path and invokes a specific action. You can attach various meta information to an operation like the parameters, incoming and outgoing schema or a description. Fusio can use this information to generate a fitting OpenAPI specification or client SDK. If a request method is public it is possible to request the API endpoint without an access token.
The path can contain variable path fragments. These fragments can be accessed inside an action. The following list describes the syntax.
/productNo variable path fragment only the request to
/productmatches this route
/product/:product_idSimple variable path fragment. This route matches to any value except a slash. I.e.
/product/12matches this route
/product/$year<[0-9]+>Variable path fragment with a regular expression. I.e. only
/product/2015matches this route
/file/*pathVariable path fragment which matches all values. I.e.
/file/12matches this route
The scopes field defines a set of scopes assigned to a route. If the route is protected, an end user needs to obtain a scope in order to access the endpoint.
The action contains the business logic of your API endpoint. It i.e. selects or inserts entries from a database or pushes a new entry to a message queue. You can select different types of actions, the following list describes each type:
Selects a preconfigured action which was previously created at the action panel.
Reference a PHP class which is available at your source code i.e.
App\Action\MyActionthe action class must implement the
Invokes a HTTP url, it proxies the request to the endpoint and also adds Fusio specific information
Contains how much a user needs to pay in order to invoke a route. A user can obtain points by buying a specific plan at the developer portal.