Get the curent file version trough the Plugin API


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… :face_with_peeking_eye:


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.

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… :slight_smile:

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? :confused:

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.

Thanks for the response :smiley: