title | description | sidebar_position | slug |
---|---|---|---|
Managing Tuples and Invoking API Best Practices |
Best Practices of Managing Tuples and Invoking APIs |
8 |
/getting-started/tuples-api-best-practices |
import { DocumentationNotice, ProductName, ProductNameFormat, RelatedSection, } from "@components/Docs";
The following list outlines some guidelines and best practices for using :
- Do not store Personal Identifiable Information in tuples
- Always specify authorization model ID whenever possible
You can use any string for user and object identifiers, however you should not input or assign identifiers that include Personal Data or any other sensitive data, such as data that may be restricted under regulatory requirements.
:::caution Note The documentation and samples uses first names and simple ids to illustrate easy-to-follow examples. :::
It is strongly recommended that authorization model ID be specified in your Relationship Queries (such as Check and ListObjects) and Relationship Commands (such as Write).
Specifying authorization model ID in API calls have the following advantages:
- Better performance as will not need to perform a database query to get the latest authorization model ID.
- Allows consistent behavior in your production system until until you are ready to switch to the new model.
<RelatedSection description="Check the following sections for more on recommendation for managing relations and model in production environment." relatedLinks={[ { title: 'Migrating Relations', description: 'Learn how to migrate relations in a production environment', link: '../modeling/migrating/migrating-relations', id: '../modeling/migrating/migrating-relations', } ]} />