Fetch published variables via rest API

I am trying to fetch all variables (names and color values) from Figma via two endpoints:

GET /v1/files/:file_key/variables/local
GET /v1/files/:file_key/variables/published

Both of them are currently in beta.
Via the local var endpoint everything works fine and I am able to fetch all var names and colors in this prop: “valuesByMode”

For the published endpoint on the other hand I am not able to fetch these values. The endpoint returns data, but somehow not color names and values. Also according to the api docs this doesnt seem to be intended and I am wondering why?
Am I overlooking something or is there any other way how to fetch Figma variables with names and values?