Page 1 of 1

REST API: Subset and Alias

Posted: Mon Jan 24, 2022 2:32 pm
by Dimix
Hi

This is the subset I'm using in this example. Please note that it's saved with an Alias selected.
Alias.PNG
Alias.PNG (8.25 KiB) Viewed 13484 times

I'm using following request to retrieve information about above subset:
https://localhost:12354/api/v1/Dimensio ... 'Default')

This is what I get back:
Capture.PNG
Capture.PNG (13.11 KiB) Viewed 13484 times
Can't see a reference to the alias that is used. How can I retrieve that information?

Do you know?

/R

Re: REST API: Subset and Alias

Posted: Tue Jan 25, 2022 4:15 pm
by Mike Cowie
Hi Dimix,

The Alias isn't an official, documented property of a subset in the REST API, but it's accessible if you explicitly ask for the "Alias" property like so (threw in a quick element count example as well for you):

Code: Select all

.../api/v1/Dimensions('plan_business_unit')/Hierarchies('plan_business_unit')/Subsets('Default')?$select=Name,UniqueName,Expression,Attributes,Alias&$expand=Elements/$count
Result:
SubsetRestApiWithAlias.png
SubsetRestApiWithAlias.png (23.42 KiB) Viewed 13446 times
Hope that helps!
Mike

Re: REST API: Subset and Alias

Posted: Thu Jan 27, 2022 7:14 am
by Dimix
Thanks Mike!