Are you an LLM? You can read better optimized documentation at /en\wiki\RESTful-API.md for this page in Markdown format
RESTful API
A RESTful API represents resources with URLs and uses standard HTTP methods to operate on them. REST emphasizes a stateless client-server interface, cacheable responses when appropriate, and consistent resource representations.
HTTP methods
| Method | Typical operation |
|---|---|
| GET | Read a resource |
| POST | Create a resource or trigger an action |
| PUT | Replace a resource |
| PATCH | Change part of a resource |
| DELETE | Remove a resource |
URL and status design
Use nouns for resources, such as /profiles/123, and let the method express the action. Common responses include 200 OK, 201 Created, 204 No Content, 400 Bad Request, 401 Unauthorized, 404 Not Found and 500 Internal Server Error.
Clash external controller
Mihomo exposes a REST API for logs, traffic, proxies, rules and connections. Its secret is sent as a bearer token. See external controller setup and the Mihomo API documentation.
