Skip to main content
Solved

Get the curent file version trough the Plugin API


Bogriceanu_Sorin

Hello,

Is there a way to get the current file version in the Plugin API?

In the docs, I only found the function to save a new version, but nothing on getting the version.

My workaround would be the REST API versions endpoint looped trough a lambda function… but it seems schetchy… 🫣

Thanks!

Best answer by tank666

Thanks for the clarifications. Unfortunately, using the Plugin API you can only get the new version ID, as you described, when saving the version. There are no other ways.

View original
This topic has been closed for replies.

4 replies

tank666
  • 4873 replies
  • February 7, 2024

Plugin API always displays the latest version of the file. To access previous versions you need to use the REST API, as you are doing.


Bogriceanu_Sorin

I don’t need to change the version, I only need to get the version ID.

… as I am writing this, I realized I could just create a new version and use the returned response to collect the versionID

Maybe some background would help… 🙂

I am creating some artefacts in the file. A few of them get synced into an external DB, more or less like a wiki. I was tring to cover the case where my created assets get modified in Figma.

If I keep the file version when I created them, I can DIFF and go back to the original if required.

… does this make any sense? 😕


tank666
  • 4873 replies
  • Answer
  • February 7, 2024

Thanks for the clarifications. Unfortunately, using the Plugin API you can only get the new version ID, as you described, when saving the version. There are no other ways.


Bogriceanu_Sorin

Thanks for the response 😃


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings