def delete_items(portal_type=None, uid=None, endpoint=None, **kw):
<EOL>req.disable_csrf_protection()<EOL>objects = find_objects(uid=uid)<EOL>if [o for o in objects if is_root(o)]:<EOL><INDENT>fail(<NUM_LIT>, "<STR_LIT>")<EOL><DEDENT>results = []<EOL>for obj in objects:<EOL><INDENT>deactivate_object(obj)<EOL>info = IInfo(obj)()<EOL>results.append(info)<EOL><DEDENT>if not results:<EOL><INDENT>fail(<NUM_LIT>, "<STR_LIT>")<EOL><DEDENT>return results<EOL>
delete items

    1. If the uid is given, we can ignore the request body and delete the
       object with the given uid (if the uid was valid).
    2. If no uid is given, the user wants to delete more than one item.
       => go through each item and extract the uid. Delete it afterwards.
       // we should do this kind of transaction base. So if we can not get an
       // object for an uid, no item will be deleted.
    3. we could check if the portal_type matches, just to be sure the user
       wants to delete the right content.