We'd like to have a consistent and safe way for study designers (almost always the implementers, so people with the DEVELOPER role) to delete and remove things as they set up a study. Often our delete APIs remove things from the database, and so those calls are only accessible to administrators for test clean-up.

Here's how we'll support both through our rest API:

class Apple

boolean deleted - this flag should be part of the public API of the object.

GET /apples?includeDeleted=boolean

Tests

GET /apples/id

Tests

POST /apples

POST /apples/id

Tests

DELETE /apples/id or DELETE /apples?id=x

Tests

DELETE /applies/id?physical=true or DELETE /apples?id=x&physical=true

Tests

Dependent Objects

Objects that cannot be deleted because they would leave other objects with referential integrity problems: