/v1/tenants/{tenant_id}/data/write endpoint for both creating relation tuples and for creating attribute data.organization:1#admin@user:3 should be created as follows:
attributes argument to create attribute/attributes with a single API call, similarly creating a relational tuple.
Let’s say document:1 is a private (boolean) document, that only specific users have view access - document:1$is_private|boolean:true.
entity $ attribute | valuedocument:1#editor@user:1document:1$is_private|boolean:trueWriteData can be performed in any logical place in your stack.
Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant t1 for this field. Required, and must match the pattern \“[a-zA-Z0-9-,]+\“, max 64 bytes.
DataWriteRequest defines the structure of a request for writing data. It contains the necessary information such as tenant_id, metadata, tuples and attributes for the write operation.
DataWriteRequestMetadata defines the structure of metadata for a write request. It includes the schema version of the data to be written.
tuples contains the list of tuples (entity-relation-entity triples) that need to be written.
attributes contains the list of attributes (entity-attribute-value triples) that need to be written.
A successful response.
DataWriteResponse defines the structure of the response after writing data. It contains the snap_token generated after the write operation.
The snap token to avoid stale cache, see more details on Snap Tokens.