sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Provide a function to generate _key values when natural `id`-like values are not unique within the scope of an integration

Open aiwilliams opened this issue 4 years ago • 0 comments

The guidance we'd like to provide to integration developers:

  • Use the natural ID only if it's unique across all resources within the target provider account/integration instance/scope
  • Use the resource URI if it can be obtained or generated, assuming the URI would allow someone to load the exact resource when logged into the provider application
  • Use a key prefix that is the resource kind (NOT the _type of the entity), combined with the natural ID

We really want to separate the _type from the _key, avoiding the use of the _type value in the _key, to clarify that the _type+_key combo does not to ensure uniqueness! The scope and _key are unique within a sync or upload operation, but without a scope, _type+_key are not unique.

aiwilliams avatar Aug 05 '20 21:08 aiwilliams