====== 1.1 REST Endpoints ====== Overview of all available REST((Representational State Transfer: https://en.wikipedia.org/wiki/Representational_state_transfer)) endpoints. ===== Architecture ===== The API follows REST principles((REST Constraints: https://restfulapi.net/rest-architectural-constraints/)) and uses HTTP((Hypertext Transfer Protocol: https://datatracker.ietf.org/doc/html/rfc7231)) methods for CRUD operations. ===== Tables ===== ^ Method ^ Route ^ Description ^ | GET | ''/tables'' | List all tables | | GET | ''/tables/{name}'' | Read data | | POST | ''/tables/{name}'' | Insert record | | PUT | ''/tables/{name}'' | Update record | | DELETE | ''/tables/{name}'' | Delete record | | PATCH | ''/tables/{name}'' | [[.:entwickler:rest:batch|Batch changes]] | ===== Views ===== ^ Method ^ Route ^ Description ^ | GET | ''/views'' | List all views | | GET | ''/views/{name}'' | Read view data | ===== Stored Procedures ===== ^ Method ^ Route ^ Description ^ | GET | ''/procedures'' | List all procedures | | POST | ''/procedures/{name}/execute'' | Execute procedure | ===== Ad-Hoc Queries ===== ^ Method ^ Route ^ Description ^ | POST | ''/query'' | Execute SQL query | ===== HTTP Status Codes ===== The API uses standard HTTP Status Codes((HTTP Status Codes: https://datatracker.ietf.org/doc/html/rfc7231#section-6)): ^ Code ^ Meaning ^ Usage ^ | 200 | OK | Successful GET/PUT/PATCH | | 201 | Created | Successful POST | | 204 | No Content | Successful DELETE | | 400 | Bad Request | Invalid request | | 401 | Unauthorized | Authentication required | | 403 | Forbidden | No permission | | 404 | Not Found | Resource not found | | 500 | Server Error | Internal error | ===== Further Reading ===== * [[.:entwickler:rest:query-parameter|Query Parameters]] for filtering and sorting * [[.:entwickler:rest:crud|CRUD Operations]] in detail * [[.:entwickler:rest:batch|Batch Operations]] for mass changes ===== Sources ===== * [[https://datatracker.ietf.org/doc/html/rfc7231|RFC 7231: HTTP/1.1 Semantics]] * [[https://restfulapi.net/|REST API Tutorial]]