SAP Knowledge Base Article - Public

3712736 - SAC: Error when calling SAC REST API widgetquery/getWidgetData

Symptom

Error occurs when trying to fetch widget data using the SAC REST API "widgetquery/getWidgetData". Error message: "only kpiTile type is supported" or "kpiTile only supports numeric chart".

Environment

SAP Analytics Cloud

Reproducing the Issue

  1. input the URL in browser: https://YOUR_SAC_DOMAIN/widgetquery/getWidgetData?storyId=XXX&widgetId=Chart_1&type=Bar/Column
  2. Error message: "only kpiTile type is supported"
  3. Change the type to "kpiTile" and input the URL again in browser: https://YOUR_SAC_DOMAIN/widgetquery/getWidgetData?storyId=XXX&widgetId=Chart_1&type=kpiTile
  4. Error message: "kpiTile only supports numeric chart"

    Cause

    For the "widgetquery/getWidgetData" API, only numeric chart and kpiTile type are supported.

    Resolution

    1. Change the type value to "kpiTile" in URL parameter
    2. Change the chart type to numeric in the story

    See Also

    widgetquery/getWidgetData API Guide

    Keywords

    SAC REST API, widgetquery, getWidgetData, numeric chart, kpiTile, metadata, SAP Analytics Cloud, error message, code , KBA , LOD-ANA-UNS-SCR , Unified Story Scripting related Issues , Problem

    Product

    SAP Analytics Cloud 1.0