Sys.id uniqueness across environments and spaces

Hi

Content Management API | Contentful says:

Upon copying, all resources maintain their original metadata like sys.id or createdAt.

But I couldn’t find any documentation to confirm if the sys.id of resources is guaranteed to be always unique.

For example, say:

  • a new environment has been created from master and
  • an entry has been created in that new environment and
  • that entry is exported from the new environment and
  • is imported back into master

Will the import ever conflict or overwrite with another entry in master because they both ended up with the same sys.id?

Similarly, is the sys.id guaranteed to be unique across spaces as well?

Thanks

Hi @shailender.bathula,

I’ve just confirmed and the ID is unique to each environment. For example, you may have the same ID for different items in a given development and a production environment.

@gabriel thanks for the response.

If sys.id is unique only within the scope of an environment and not across environments. Can you please confirm conflicts and overwrites during import in the scenario below are possible?

Scenario: Authors like to setup content in Stage environment prior to a feature is meant to go live in Prod. If id1 is of content type A in Stage environment and is being imported into Prod environment which already has another item with id1 but is of content type B, then import would fail due to content and content type schema mismatch? In the worst case if both items are of the same content type but are logically different items, then import of one would overwrite another?

Thanks

2 Likes