Page 1 of 1

Tm1 Rest api: get number of levels in Dimension

Posted: Mon Sep 03, 2018 2:21 pm
by kavitha2002
Hi Everyone,

How to get to know the number of levels in Dimension and filter the dimension elements using Level using Tm1 REST api?

Is there any option to do??

Re: Tm1 Rest api: get number of levels in Dimension

Posted: Mon Sep 03, 2018 11:57 pm
by Wim Gielis
For instance:

Code: Select all

{{protocol}}://{{serverName}}:{{httpPortNumber}}/api/v1/Dimensions('TEST_DIM')/Hierarchies?$select=Name&$expand=Levels/$count

Re: Tm1 Rest api: get number of levels in Dimension

Posted: Tue Sep 04, 2018 6:22 am
by kavitha2002
Super Wim Gielis.. Thanks for your immediate response.

Is there a way to filter the Dimension elements based on the level. For example,

{TM1FILTERBYLEVEL( {TM1SUBSETALL( [DimName] )}, 1)} in mdx do we have similar in RESTapi?

Re: Tm1 Rest api: get number of levels in Dimension

Posted: Tue Sep 04, 2018 6:47 am
by kavitha2002
I have found the solution to filter the dimension elements by level, hope the below Tm1 REST api query may help someone.

Code: Select all

http://host:8001/api/v1/Dimensions('DimName')/Hierarchies?$select=Name&$expand=Elements($select=Name,Type,Attributes,Level;$filter=Level eq 7)