Default level of expended nodes in tree layout

i m working on a tree-layout diagram i want to know if there is a default property that i can set the level to which the tree is expended
Screenshot%20from%202019-02-28%2010-55-38
consider this tree what i want is to set the 3rd level compressed by default i.e. tree only to level
2

Call Node | GoJS API and then call Node | GoJS API.