How can I create a subset from a dimension using the REST API?
Hi Roland,
this is what you have to send to the TM1 Server
{
"Name": "Q1",
"Hierarchy@odata.bind": "Dimensions('Month')/Hierarchies('Month')",
"Elements@odata.bind": [
"Dimensions('Month')/Hierarchies('Month')/Elements('01')",
"Dimensions('Month')/Hierarchies('Month')/Elements('02')",
"Dimensions('Month')/Hierarchies('Month')/Elements('03')"
]
}
The URL would be
api/v1/Dimensions('Month')/Hierarchies('Month')/Subsets
resp.
api/v1/Dimensions('Month')/Hierarchies('Month')/PrivateSubsets
Cheers,
Marius
2 Likes
In case you want to create dynamic subset:
POST api/v1/Dimensions(‘Month’)/Hierarchies(‘Month’)/Subsets
{
“Name”:“My Subset”,
“Expression”:"[Month].MEMBERS"
}
1 Like
Does anyone know if the REST API allows to create a Static Subset from an MDX Expression in one Request?
1 Like