Mobs

Delete Mob

Removes the mob for good — and only while nothing is filed on it.

A mob with any record or open task cannot be removed: the request is refused with a 409 whose errors[0].detail names the counts ("Merino wethers has 4 records and 0 open tasks on it — archive this mob instead of removing it") and whose errors[0].code is asset_in_use. The counts are read inside the delete's own transaction, not from the numbers a client read earlier, so a mob that acquired history between a client's check and its DELETE is kept rather than silently unfiled. Archive it instead (PUT { archived: true }): its records — every move it ever made included — stay on the property, and the mob stays openable from the archive drawer.

A client offers "Remove this mob" only while record_count and open_task_count are both zero and "Archive this mob" otherwise — and treats a 409 as the archive face, because the numbers moved under it.

delete/mobs/{id}

Request

  • Base URL: https://api.purplegrain.com/api/v1
  • URL: https://api.purplegrain.com/api/v1/mobs/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

Id of the record

Response

Deleted

Changes

No recorded changes to this operation across all 1 revision of this API.