Duplicate Fixlet/Task ID

Is there a query (API or SQL) that will return whether a duplicate ID exists ?
I would assumed it wouldn’t happen, but we had an issue where creating a copy of an external Fixlet caused a duplicate ID with an old (2003) Fixlet from the Enterprise Security site.

My understanding is that IDs are unique within a site, but cross-site there can be duplicates

that’s the issue, need a query across all sites for duplicate id’s.

Duplicate IDs across sites are expected. I’m not sure I understand the concern?

Having duplicate ID’s caused issues with our SQL queries. Would have assumed there was a mechanism on the database side to prevent duplicates from being created. Obviously not …
Just trying to avoid this happening again.

The following session relevance query will return all Fixlet IDs (this will include Tasks, Baselines, Analyses, etc…) that have at least one duplicate, as well as the number of instances of that particular ID:

(it, multiplicity of it) of unique values whose (multiplicity of it > 1) of ids of bes fixlets

That said, as others have suggested, Fixlet IDs are only unique within a given Fixlet Site. It is absolutely expected that the same Fixlet ID can (and will) exist across Fixlet sites.

It seems like the SQL queries in question may need to be updated to account for this?