Edit, add or remove records: a unit, building, lease, contact or any other
The write path for everything the owner edits, and the way to update, change or set any field of a record, such as a unit’s purchase price (acquisition), a lease’s rent or a contact’s address. To change some fields of a record that exists, send a patch naming the collection, the id and only those fields; read the record first if you need what it holds. An upsert writes a whole record, which is how a new one is added. The whole list is applied in one D1 batch, so it either all lands or none of it does, and it is applied in the order it was given. The changes go into the signed-in owner’s rows and there is no way to address anyone else’s. Every record carries a server-owned rev: an upsert or a remove sends the revision it was based on, the account checks that the row still stands there, and a batch with a stale change in it is refused whole with the current rows in the 409 body. A record written for the first time carries no rev and comes back at 1.
Request
- Base URL: http://localhost:5180
- URL: http://localhost:5180/api/v1/portfolio/changes
- Auth: API key in cookie better-auth.session_token
Request body
Response
Every change was written. revs is what each upserted record is at now.
Changes
No recorded changes to this operation across all 1 revision of this API.