Skip to contents

Create an run an API

api() is_plumber_api() api_parse()
Create a new plumber API, optionally based on one or more plumber files
api_run() api_stop()
Launch the API
create_server_yml()
Create a _server.yml file to describe your API

Adding handlers and routes

api_get() api_head() api_post() api_put() api_delete() api_connect() api_options() api_trace() api_patch() api_any()
Add a handler for a request
api_get_header() api_head_header() api_post_header() api_put_header() api_delete_header() api_connect_header() api_options_header() api_trace_header() api_patch_header() api_any_header()
Add a handler for a request header
api_assets() api_statics()
Serve ressources from your file system
api_message()
Add a handler to a WebSocket message
api_add_route()
Add a new route to either the request or header router
api_redirect()
Redirect request to another resource

Parsers

Serializers

Async evaluation

register_async() show_registered_async() get_async()
Register an async evaluator
future_async() mirai_async()
Async evaluators provided by plumber

OpenAPI documentation

Advanced

Plumber2
The Plumber2 Class
api_logger() logger_null() logger_console() logger_file() logger_logger() logger_switch() common_log_format combined_log_format
Set logging function and access log format for the API
api_on() api_off()
Add a handler to an event
api_session_cookie()
Turn on session cookie data storage for your API
Next Break should_break()
Router control flow