Looker API Group Label

cdu1
New Member

Is there any way to get the group label of a dimension or measure from the API? Looked through some example code and documentation and couldn’t find anything. Thanks

0 1 142
1 REPLY 1

Hey there!

It is possible to get the group labels of all dimensions/measures in a given explore. 
Using the API Explorer, head to LookmlModel>Get LookML Model Explore. This will utilize the lookml_model_explore() endpoint. Then specify the model, explore, and requested fields, and run the call.

In the fields parameter, you can use `fields(dimensions(name, field_group_label))` to return the field name + group label of all dimensions in the explore. Similarly you can use `fields(measures(name, field_group_label))` to return the field name + group label of all measures in the explore.

Here’s an example of what my response looks like: 

3bfe84d5-d92c-4bc6-8b98-261a4c2288cd.png