GET file styles - why there are no values (properties)?

Hi there,

newbie question I guess:

why I don’t get values in GET file styles response (same applies also to styles section of the GET file response, but there I would maybe understand it), am I missing something?

We want to use styles (design tokens) defined in Figma as the source of the truth for the whole application (from design to production build), we would like to be able to fetch them from Figma via REST API and convert them to whatever we need in the app (usually SCSS variable set) during our build process.

We are using Design Tokens plugin, it gives us exactly what we need, but the way it is controlled (manual export or sending to URL) is not practical for us.

I know I can sort-of parse out style values thru their usage in GET file response (e.g. this approach), but it seems very clumsy and unreliable to me, getting values directly from GET file styles (or some other) endpoint would make much better sense.

Thanks, Tomas

I’m trying to do something similar. I want to use Figma as our source of truth for a dynamically generated style guide that will be shared with third-parties. Mainly looking for colors and typography right now, but would also grab design tokens if they were supported natively in Figma (another feature that would be amazing BTW).

I was able to get an array of node IDs from GET file styles to use with the GET file nodes endpoint, but it’s far from ideal. It’s a lot of extra calls, and drilling down into the actual values is tedious. Could you provide those presentation details with the GET file styles endpoint by default, or at least provide it as optional parameter?