Skip to main content

hi!

I'm using the Variables REST API (POST /v1/files/:file_key/variables) and having an issue with updating a variable's resolvedType.

According to the documentation, I understand that VariableChange objects support resolvedType as a parameter for UPDATE actions.

However, when I send:

"variables": [{

"action": "UPDATE",

"id": "VariableID:30927:47472",

"resolvedType": "FLOAT"

}]

The API returns 200 success, but the variable's resolvedType remains unchanged (still "STRING").

Questions:

  1. Is resolvedType actually mutable via UPDATE operations?
  2. If yes, what's the correct way to change a variable from STRING to FLOAT type?
  3. If no, could the documentation be clarified to indicate resolvedType is CREATE-only?

Why I actually need this:

I'm trying to convert font weight variables from STRING ("Regular", "Bold") to FLOAT (400, 700) values now that I have implemented a Variable Font on our design system.

If I am able to change the resolved type, then I can cascade update the places where this variable is aliased without having to delete-and-recreate-and-relink.

Be the first to reply!

Reply