The Authzed API supports two operations to update tuples in the system:
Delete. Both operations exist under the same call.
Create operation is used to create new tuples in the Authzed data layer, thereby defining relationships between objects.
Delete operation is used to remove tuples from the Authzed data layer
Touch operation is a special operation which will perform an upsert-like operation, inserting a new tuple if one doesn't exist and updating the transaction-time on a tuple if it does.
Touch requires checking if a tuple exists and, if present, updating its transaction-time by re-inserting it if it does, it is a much heavier operation than a simple
Touch should only be used for operations where a tuple needs to be marked as "fresh".
To change one or more tuples, issue a
WriteRequest API call:
update consists of an operation to perform (
TOUCH) and the tuple to update:
The result of the write (if it succeeds) contains a Zookie.
Write API supports a section called
write_conditions, which is a list of tuples that must exist in Authzed before the updates will occur; if any of the tuples are missing, the write will fail with an error code. Preconditions are typically used as a locking mechanism, to ensure distributed writers can coordinate.