No, detached instances become regular frames, they don’t contain any info about their previous state of being instances.
The only thing that comes to mind is you can use version history for that, but if instance creation and detachment happened within one version, then it won’t be possible to detect.
There was a nice tip from Uber’s team on the last Config – adding Signature pixel to each component, that stays there also if the component is detached. Check it here. It could help for what you want to achieve.
It’s about keeping a node with specific name, when you can scan these nodes and check if they are in instance or not to mark it as detached.
Check youtube video " Using Figma to go beyond Figma - Dylan Babbs, Vietanh Nguyen (Config 2021)" (can’t use links in the forum 😢)
I’ve been watching that video on repeat this morning trying to discern how they did it. As far as I can tell, you’d need to be able to access and get the contents of every file in the organization to make this work, but the Figma only allow you to access files that you have the fileID for, right? I’m hoping I’m incorrect about that, but that’s the best I can see.
Has your team written up anything about how you pull this off?
Edit: I think I got it. You get all files of a project by providing the team_id then you get all of the files in that project.
Have you run into the issue where the file your scanning for detached components is too big and your API request times out? If so, how have you gotten around this?