GetAdHocResult GetAdHoc(AdHocId tAdHocId, GetAdHocMdArg tArg)
tAdHocId. Opened dashboard instance moniker.
tArg. Operation execution parameters.
The GetAdHoc operation gets dashboard metadata.
The operation gets information about dashboard structure, block data sources, synchronization parameters for various dimensions. The GetAdHoc operation can also be used to export a dashboard to the required format. To execute the operation, in the tAdHocId field specify dashboard instance moniker, and in the tArg.pattern field specify the pattern, according to which metadata is obtained. The moniker can be obtained on executing the OpenAdhoc operation. The operation results in the requested metadata.
The example of getting information about data sources and regular reports that are used as data sources for dashboard blocks. The information about dashboard active slide is also obtained. The request contains the dashboard moniker and the pattern that determines whether to get the specified information. The response contains requested metadata.
{ "GetAdHoc" : { "tAdHocId" : { "id" : "S1!M!S!AdHoc1" }, "tArg" : { "pattern" : { "obInst" : "true", "dsoPattern" : { "objects" : "Get" }, "dsoLinkedPattern" : { "objects" : "Get" }, "dataSourceObjects" : "Get", "dataSourceLinkedObjects" : "Get", "layout" : { "activeSlideKey" : "true", "activeSlideId" : "true", "slides" : "Get", "allSlidesPattern" : { "animation" : "false", "viewModeImages" : "false", "mainPanel" : "false" }, "activeSlidePattern" : { "animation" : "false", "viewModeImages" : "false", "mainPanel" : "true" } } } } } }
{ "GetAdHocResult" : { "id" : { "id" : "S1!M!S!AdHoc1" }, "meta" : { "obInst" : { "obDesc" : { "@fullUrl" : "\/", "@isShortcut" : "0", "@isLink" : "0", "@ver" : "1", "@hf" : "0", "i" : "ADHOC_SAMPLE", "n" : "Dashboard", "k" : "87502", "c" : "8448", "p" : "6714", "h" : "0", "hasPrv" : "0", "ic" : "0", "isPermanent" : "1", "isTemp" : "0" } }, "dirty" : "0", "dataSourceObjects" : { "its" : { "it" : [ { "id" : "SE3R70CE6FP6L2GL", "linked" : "0", "dsoObject" : { "k" : "87504", "id" : "OBJ87504", "n" : "Express report", "vis" : "1" }, "changeCounter" : "0", "undoRedoChangeCounter" : "0", "slideKey" : "2" }, { "id" : "S6TXGOGDW3YQXKP1", "linked" : "0", "dsoObject" : { "k" : "87505", "id" : "OBJ87505", "n" : "Express report", "vis" : "1" }, "changeCounter" : "0", "undoRedoChangeCounter" : "0", "slideKey" : "1" } ] }, "autoSyncNewDso" : "0", "autoUpdateSources" : "1" }, "dataSourceLinkedObjects" : { "its" : "", "autoSyncNewDso" : "0", "autoUpdateSources" : "1" }, "Md8" : { "activeSlideKey" : "1", "slides" : { "its" : { "it" : [ { "key" : "1", "id" : "1C069D65-46D1-471D-A1ED-DAB36359DE9B", "visible" : "1", "name" : "Slide1", "index" : "0", "mainPanel" : { "block" : { "@type" : "Slide", "@key" : "1C069D65-46D1-471D-A1ED-DAB36359DE9B", "prop" : [ { "@isArrFlg" : "1", "@tag" : "background", "prop" : [ { "@val" : "#ffffff", "@isArrFlg" : "1", "@tag" : "backgroundColor" }, { "@val" : "#c9c9c9", "@tag" : "gradientColor" }, { "@val" : "270", "@tag" : "gradientAngle" } ] }, { "@tag" : "decor", "prop" : { "@tag" : "paddings", "prop" : [ { "@val" : "1", "@isArrFlg" : "1", "@tag" : "usePaddings" }, { "@val" : "10", "@tag" : "left" }, { "@val" : "10", "@tag" : "right" }, { "@val" : "10", "@tag" : "top" }, { "@val" : "10", "@tag" : "bottom" } ] } }, { "@val" : "1", "@tag" : "autoLayout" }, { "@tag" : "layouts", "area" : { "@key" : "S577W4BTBFEE9Z9W", "block" : { "@type" : "Grid", "@key" : "S577W4BTBFEE9Z9W", "prop" : [ { "@val" : "Block 7", "@isArrFlg" : "1", "@tag" : "name" }, { "@tag" : "background", "prop" : [ { "@val" : "1", "@isArrFlg" : "1", "@tag" : "useBackground" }, { "@val" : "#ffffff", "@tag" : "backgroundColor" }, { "@val" : "0", "@tag" : "useGradient" }, { "@val" : "#c9c9c9", "@tag" : "gradientColor" }, { "@val" : "270", "@tag" : "gradientAngle" } ] }, { "@tag" : "layout", "prop" : [ { "@val" : "0", "@isArrFlg" : "1", "@tag" : "left" }, { "@val" : "0", "@tag" : "right" }, { "@val" : "0", "@tag" : "top" }, { "@val" : "0", "@tag" : "bottom" }, { "@val" : "%", "@tag" : "leftUnit" }, { "@val" : "%", "@tag" : "rightUnit" }, { "@val" : "%", "@tag" : "topUnit" }, { "@val" : "%", "@tag" : "bottomUnit" }, { "@val" : "1", "@tag" : "anchorTop" }, { "@val" : "1", "@tag" : "anchorBottom" }, { "@val" : "1", "@tag" : "anchorLeft" }, { "@val" : "1", "@tag" : "anchorRight" } ] }, { "@tag" : "margins", "prop" : { "@val" : "1", "@tag" : "useMargins" } }, { "@tag" : "decor", "prop" : [ { "@val" : "5", "@isArrFlg" : "1", "@tag" : "cornerRadius" }, { "@val" : "0", "@tag" : "useBorderRadius" }, { "@val" : "0", "@tag" : "useBorder" }, { "@val" : "#c9c9c9", "@tag" : "borderColor" }, { "@val" : "1", "@tag" : "borderWidth" }, { "@val" : "0", "@tag" : "useShadow" }, { "@val" : "#000000", "@tag" : "shadowColor" }, { "@val" : "8", "@tag" : "shadowWidth" }, { "@val" : "10", "@tag" : "shadowOpacity" }, { "@tag" : "paddings", "prop" : [ { "@val" : "0", "@isArrFlg" : "1", "@tag" : "usePaddings" }, { "@val" : "10", "@tag" : "left" }, { "@val" : "10", "@tag" : "right" }, { "@val" : "10", "@tag" : "top" }, { "@val" : "10", "@tag" : "bottom" } ] } ] }, { "@tag" : "title", "prop" : [ { "@val" : "0", "@isArrFlg" : "1", "@tag" : "show" }, { "@tag" : "font", "prop" : [ { "@val" : "#ababab", "@isArrFlg" : "1", "@tag" : "color" }, { "@val" : "Calibri", "@tag" : "family" }, { "@val" : "10", "@tag" : "size" } ] }, { "@val" : "Left", "@tag" : "align" } ] }, { "@tag" : "divider", "prop" : [ { "@val" : "1", "@isArrFlg" : "1", "@tag" : "show" }, { "@val" : "#c9c9c9", "@tag" : "color" }, { "@val" : "1", "@tag" : "height" }, { "@val" : "25", "@tag" : "blurSize" }, { "@val" : "1", "@tag" : "useBlur" } ] }, { "@tag" : "cols", "item" : { "@isArrFlg" : "1" } }, { "@tag" : "rows", "item" : { "@isArrFlg" : "1" } }, { "@tag" : "cells", "area" : { "@key" : "S59DM848RIUH64Q4", "prop" : [ { "@val" : "0", "@isArrFlg" : "1", "@tag" : "row" }, { "@val" : "0", "@tag" : "col" } ], "block" : { "@type" : "Panel", "@key" : "S59DM848RIUH64Q4", "prop" : [ { "@isArrFlg" : "1", "@tag" : "background", "prop" : [ { "@val" : "0", "@isArrFlg" : "1", "@tag" : "useBackground" }, { "@val" : "#ffffff", "@tag" : "backgroundColor" }, { "@val" : "0", "@tag" : "useGradient" }, { "@val" : "#c9c9c9", "@tag" : "gradientColor" }, { "@val" : "270", "@tag" : "gradientAngle" } ] }, { "@tag" : "decor", "prop" : [ { "@val" : "5", "@isArrFlg" : "1", "@tag" : "cornerRadius" }, { "@val" : "0", "@tag" : "useBorderRadius" }, { "@val" : "0", "@tag" : "useBorder" }, { "@val" : "#c9c9c9", "@tag" : "borderColor" }, { "@val" : "1", "@tag" : "borderWidth" }, { "@val" : "0", "@tag" : "useShadow" }, { "@val" : "#000000", "@tag" : "shadowColor" }, { "@val" : "8", "@tag" : "shadowWidth" }, { "@val" : "10", "@tag" : "shadowOpacity" }, { "@tag" : "paddings", "prop" : [ { "@val" : "0", "@isArrFlg" : "1", "@tag" : "usePaddings" }, { "@val" : "10", "@tag" : "left" }, { "@val" : "10", "@tag" : "right" }, { "@val" : "10", "@tag" : "top" }, { "@val" : "10", "@tag" : "bottom" } ] } ] }, { "@tag" : "title", "prop" : [ { "@val" : "0", "@isArrFlg" : "1", "@tag" : "show" }, { "@tag" : "font", "prop" : [ { "@val" : "#ababab", "@isArrFlg" : "1", "@tag" : "color" }, { "@val" : "Calibri", "@tag" : "family" }, { "@val" : "10", "@tag" : "size" } ] }, { "@val" : "Left", "@tag" : "align" } ] }, { "@tag" : "divider", "prop" : [ { "@val" : "1", "@isArrFlg" : "1", "@tag" : "show" }, { "@val" : "#c9c9c9", "@tag" : "color" }, { "@val" : "1", "@tag" : "height" }, { "@val" : "25", "@tag" : "blurSize" }, { "@val" : "1", "@tag" : "useBlur" } ] }, { "@tag" : "layouts", "area" : { "@key" : "S6TXGOGDW3YQXKP1", "block" : { "@type" : "Table", "@key" : "S6TXGOGDW3YQXKP1", "prop" : [ { "@val" : "Block 9", "@isArrFlg" : "1", "@tag" : "name" }, { "@tag" : "background", "prop" : [ { "@val" : "1", "@isArrFlg" : "1", "@tag" : "useBackground" }, { "@val" : "#ffffff", "@tag" : "backgroundColor" }, { "@val" : "0", "@tag" : "useGradient" }, { "@val" : "#c9c9c9", "@tag" : "gradientColor" }, { "@val" : "270", "@tag" : "gradientAngle" } ] }, { "@tag" : "layout", "prop" : [ { "@val" : "0", "@isArrFlg" : "1", "@tag" : "left" }, { "@val" : "0", "@tag" : "right" }, { "@val" : "0", "@tag" : "top" }, { "@val" : "0", "@tag" : "bottom" }, { "@val" : "%", "@tag" : "leftUnit" }, { "@val" : "%", "@tag" : "rightUnit" }, { "@val" : "%", "@tag" : "topUnit" }, { "@val" : "%", "@tag" : "bottomUnit" }, { "@val" : "1", "@tag" : "anchorTop" }, { "@val" : "1", "@tag" : "anchorBottom" }, { "@val" : "1", "@tag" : "anchorLeft" }, { "@val" : "1", "@tag" : "anchorRight" } ] }, { "@tag" : "margins", "prop" : { "@val" : "1", "@tag" : "useMargins" } }, { "@tag" : "decor", "prop" : [ { "@val" : "5", "@isArrFlg" : "1", "@tag" : "cornerRadius" }, { "@val" : "0", "@tag" : "useBorderRadius" }, { "@val" : "1", "@tag" : "useBorder" }, { "@val" : "#c9c9c9", "@tag" : "borderColor" }, { "@val" : "1", "@tag" : "borderWidth" }, { "@val" : "0", "@tag" : "useShadow" }, { "@val" : "#000000", "@tag" : "shadowColor" }, { "@val" : "8", "@tag" : "shadowWidth" }, { "@val" : "10", "@tag" : "shadowOpacity" }, { "@tag" : "paddings", "prop" : [ { "@val" : "0", "@isArrFlg" : "1", "@tag" : "usePaddings" }, { "@val" : "10", "@tag" : "left" }, { "@val" : "10", "@tag" : "right" }, { "@val" : "10", "@tag" : "top" }, { "@val" : "10", "@tag" : "bottom" } ] } ] }, { "@tag" : "title", "prop" : [ { "@val" : "0", "@isArrFlg" : "1", "@tag" : "show" }, { "@tag" : "font", "prop" : [ { "@val" : "#ababab", "@isArrFlg" : "1", "@tag" : "color" }, { "@val" : "Calibri", "@tag" : "family" }, { "@val" : "10", "@tag" : "size" } ] }, { "@val" : "Left", "@tag" : "align" } ] }, { "@tag" : "divider", "prop" : [ { "@val" : "1", "@isArrFlg" : "1", "@tag" : "show" }, { "@val" : "#c9c9c9", "@tag" : "color" }, { "@val" : "1", "@tag" : "height" }, { "@val" : "25", "@tag" : "blurSize" }, { "@val" : "1", "@tag" : "useBlur" } ] } ] } } } ] } } } ] } } } ] } } }, { "key" : "2", "id" : "SD7OZR42LYHXHA2V", "visible" : "1", "name" : "Slide2", "index" : "1" } ] } } }, "autoUpdateSources" : "1", "calcOnChangedData" : "2" } } }
The OpenCube function specified below opens a cube. The repository connection moniker and cube identifier are sent as input parameters. The example uses the FindObjectById function, which Code is given in the Getting Object Description by Its Identifier example. The result of the operation is the result of the function.
public static GetAdHocResult GetDataSourcesInfo(AdHocId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetAdHoc()
{
tArg = new GetAdHocMdArg()
{
pattern = new AdHocMdPattern()
{
dataSourceObjects = ListOperation.Get,
dataSourceLinkedObjects = ListOperation.Get,
dsoPattern = new DataSourcePattern()
{
objects = ListOperation.Get,
},
dsoLinkedPattern = new DataSourcePattern()
{
objects = ListOperation.Get
},
layout = new SlidesPattern()
{
activeSlideId = true,
activeSlideKey = true,
activeSlidePattern = new SlideContentPattern()
{
mainPanel = true
},
allSlidesPattern = new SlideContentPattern(),
slides = ListOperation.Get
}
}
},
tAdHocId = moniker
};
//Get metadata
var result = somClient.GetAdHoc(tGet);
return result;
}
See also: