Get the ID by inputting the Name in Looker API

ameya
New Member

I am trying to get the id of the Model set, Permission set and Role using the Looker API.

I want to know if there is any way to get the id and other details about the above things just by providing their name.

I know there are functions where we can provide the id and get the details but I want to use the entity name instead of the id.

0 1 246
1 REPLY 1

model_set = sdk.search_model_sets(name="AdamTest")
print(model_set[0].id)

This is an example with the python sdk, but the same principle can be applied for search roles and search permission set

Please let us know if you have any questions.

Thanks,

Eric