Embracing the power of the empty set in API design

1 point by HeliumHydride 1 week ago | 1 comment
  • Lockal 1 week ago
    That's a good one: common API design is:

    /resources - return all resources

    /resources?type=a&type=b (or type=a,b) - return resources of given type.

    Then suddenly UI team implements checkbox-based deletion (or bulk edit). User deselects all checkboxes, and UI sends DELETE `/resources` (or `?type=`), suddenly deletes all resources.