Dimension ListSubsets

Retrieves a list of subsets bound to a specified hierarchy or from all hierarchies of the specified dimension.

The Dimension ListSubsets function requires the Edit Dimensions permission. Otherwise, error 34 is returned: You are not authorized to carry out this operation.

Request

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="1" Class="Dimension" Method="ListSubsets">
    <Alea:Dimension Name="DimName" Access="All">
      <Alea:Hierarchy Name="HierarchyName" />
    </Alea:Dimension>
  </Alea:Request>
</Alea:Document>

This table describes the structure of the <Alea:Dimension> XML element for ListSubsets:

XML object Description
@Name Required. The dimension name.
@Access

Optional.

It has no effect but can be included in the request to ensure backward compatibility.

The value Private is not allowed and results with error 75: Wrong or invalid parameter.

Alea:Hierarchy Optional. If missing, the default hierarchy is used.
   @Name Optional. Use to request subsets from a specific hierarchy, or use an asterisk (*) to request subsets of all hierarchies. If missing, the default hierarchy is used.

This request returns all subsets for all hierarchies of a dimension:

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="1" Class="Dimension" Method="ListSubsets">
    <Alea:Dimension Name="DimName">
      <Alea:Hierarchy Name="*" />
    </Alea:Dimension>
  </Alea:Request>
</Alea:Document>

This request returns all subsets for the default hierarchy of a dimension:

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="1" Class="Dimension" Method="ListSubsets">
    <Alea:Dimension Name="DimName" />
  </Alea:Request>
</Alea:Document>

Answer

The hierarchy name is always returned. If a hierarchy name is not specified in the request, the default hierarchy name is returned.

To ensure backward compatibility, Public="true" and Type="9" are always returned.

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="001">
    <Alea:Return>
      <Alea:Dimension Name="D212">
        <Alea:Hierarchy Name="test2">
          <Alea:Subset Name="1" Public="true" User="Admin" UserData="0" Type="9">
            <Alea:Description>Test</Alea:Description>
          </Alea:Subset>
        </Alea:Hierarchy>
      </Alea:Dimension>
    </Alea:Return>
  </Alea:Request>
</Alea:Document>

Error

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="007">
    <Alea:Error ErrorID="error_code" />
  </Alea:Request>
</Alea:Document>