Partitions
Oftentimes, providers partition their clients data on different instances — A database has multiple hosts, a cloud provider offers custom domains, an enterprise service offers on-premise instances, etc. When that is the case, it means two distinct partitions can each contain an item that shares the same identifier, and Unito needs a way to distinguish one another.
When building a connector, it's important to keep that problem in mind. The path of an item is what's used to uniquely identify it across Unito's ecosystem, so if two distinct items where to share the same path, Unito could erroneously consider them one and the same.
To avoid this issue, each Credential Account has access to
a partition
attribute. When set, Unito will automatically consider all items found while using this account as being
part of that one partition.
As an example, the following partition informs Unito that any item found during this session are to be stored under this
https://my-custom-domain.provider.com
partition. An item present at the path /items/1
would be known to Unito as
being different from another item with the same path but belonging to another partition.
{
"partition": "https://my-custom-domain.provider.com"
}
A partition can be any string. A common pattern for cloud providers is to put the complete domain in there, but you can put what you want. For databases, a mixture of host and port can do the trick. You know best how your provider partitions its data, so it's on you to figure out what will work best.