All data flows where the client requests, manipulates or removes a server-side object is implemented via a REST Api. The Api can be explored via swagger (linked from the index page). Please be aware that swagger does not understand custom Json converters, ItemIds in particular.
The order of operations in endpoint implementations always follows the same principles:
- Check authentication (very cheap)
- Validate input (very cheap)
- Validate resource access (expensive)
- Manipulate data (very expensive)
- Return a result
If any of the above fail the implementation immediately quits execution of the endpoint and returns an appropriate code. This approach minimizes area of attack, defers more expensive tasks as long as possible and reduces chance of data inconsistencies.
200 Ok400 BadRequestis returned whenever an endpoint is invoked with malformed input data403 Unauthorizedis returned whenever an endpoint is invoked without necessary authorization404 Notfoundis returned in any of these cases:- The endpoint does not exist
- The requested resource does not exist
- The authorized user cannot access the requested resource (same response as if resource does not exist to prevent abuse)
415 Unsupported Media Typeis returned whenever a file upload endpoint is invoked with incompatible media type500 Internal Server Erroris returned whenever a server internal data manipulation fails (despite input data passing validation)503 Service Unavailableis returned when a server endpoint is invoked which was disabled (usually due to missing environment variables containing connection strings etc.)