How to create a subset via the REST API?

tm1

#1

How can I create a subset from a dimension using the REST API?


#2

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


#3

In case you want to create dynamic subset:
POST api/v1/Dimensions(‘Month’)/Hierarchies(‘Month’)/Subsets
{
“Name”:“My Subset”,
“Expression”:"[Month].MEMBERS"
}


#4

Does anyone know if the REST API allows to create a Static Subset from an MDX Expression in one Request?