How do I query a model via the AtScale API?

Forum Admin

I want to leverage the AtScale API to show data in my custom BI tool for my internal audience - is there an API or set of APIs to do it? 

0

Comments

1 comment

  • Comment author
    Forum Admin

    Your best bet is the Query API - make sure you already have the auth pattern set but once you have your token this API gets you the results from query against a model you have deployed. 

    http://<doiman>/engine/xmla/<ModelID?>

    Sample Body Below

    <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
        <Body>
            <Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
                <Command>
                    <Statement> 
    SELECT { Measures.[OrderQuantity1] } ON COLUMNS,
      { DrilldownLevel([Color Dimension].[Color].[All]) } ON ROWS
    FROM [Internet Sales]
                        </Statement>
                </Command>
                <Properties>
                    <PropertyList>
                        <Catalog>sml-models_main</Catalog>
                        <UseAggregates>true</UseAggregates>
                        <GenerateAggregates>true</GenerateAggregates>
                        <UseQueryCache>true</UseQueryCache>
                        <UseAggregateCache>true</UseAggregateCache>
                    </PropertyList>
                </Properties>
            </Execute>
        </Body>
    </Envelope>
    0

Please sign in to leave a comment.