Below is the example of using the GetDimMetadata operation to get information about child elements of the dictionary. The request contains the dictionary moniker and the pattern, in which specify whether to get information about selection schemas, groups of elements and alternative hierarchies of the dictionary. The response contains the obtained information.
{
"GetDimMetadata" :
{
"tDim" :
{
"id" : "S1!M!S!S1"
},
"tArg" :
{
"pattern" :
{
"obInst" : "false",
"getHiers" : "true",
"getGroups" : "true",
"getSchemas" : "true"
}
}
}
}
{
"GetDimMetadataResult" :
{
"id" :
{
"id" : "S1!M!S!S1"
},
"data" :
{
"hiers" :
{
"it" :
[
{
"k" : "1",
"id" : "SOURCE1",
"n" : "Dim_1 (En)",
"vis" : "1",
"sourceDimKey" : "154",
"originalDimKey" : "116"
},
{
"k" : "2",
"id" : "SOURCE2",
"n" : "X32",
"vis" : "1",
"sourceDimKey" : "51924",
"originalDimKey" : "116"
},
{
"k" : "3",
"id" : "SOURCE3",
"n" : "Dim_1 (alternative)",
"vis" : "1",
"sourceDimKey" : "105777",
"originalDimKey" : "116"
}
]
},
"groups" :
{
"it" :
{
"k" : "157",
"id" : "GROUP1",
"n" : "Group of elements (according to list)",
"vis" : "0"
}
},
"schemas" :
{
"it" :
{
"k" : "158",
"id" : "SCHEME1",
"n" : "Selection schema (according to list)",
"vis" : "0"
}
}
}
}
}
public static GetDimMetadataResult GetChildrenObjectInfo(DmId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tMeta = new GetDimMetadata()
{
tArg = new GetDimMetadataArg()
{
pattern = new DmMetadataPattern()
{
getGroups = true,
getHiers = true,
getSchemas = true,
obInst = false
}
},
tDim = moniker
};
//Get information about dictionary structure
var result = somClient.GetDimMetadata(tMeta);
return result;
}
See also: