Skip to main content
January 3, 2024
Question

REST API Variables

  • January 3, 2024
  • 11 replies
  • 1628 views

Hello there,

A tricky one: Is it intentional that when I use the GET /v1/files/:file_key/variables/local API I can get a response that contains an alias pointing to a variable that is not part of the response itself?

...
        "valuesByMode": {
          "XXXX:X": {
            "type": "VARIABLE_ALIAS",
            "id": "VariableID:XXXXX/XXXX:XXX" //<- This id is nowhere else mentioned in the response.
          },
...

Thank you!

This topic has been closed for replies.

11 replies

jefflee
Figmate
Figmate
May 24, 2025

Thanks to help from ​@joji, I think I was able to identify the issue. It seems like the problem occurs when we have an alias chain that is at least 3 variables deep, and multiple variables are deleted.

For example, suppose we have Variable A that aliases Variable B that aliases Variable C. Then we delete Variable B and Variable C. The get-local-variables API will return Variable A and Variable B, but not Variable C.

We’ve filed a bug report for this specific issue. Please respond in thread if you think there are cases that don’t fit this description.