Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'zh'
Sv translation
languageen

/api/dashboards/:id

Shows detailed information about the dashboard with the specified ID.

Resource Information

Request Parameters

Parameters

Detail

Example

id

ID of the dashboard to fetch. You can find the ID in the response to /api/dashboards.

123

Response Structure

JSON response contains one JSON object with following elements:

NameDescription
idDashboard identifier
nameDashboard name
descriptionDashboard description
dashlets

Array of views where each dashlet has following structure:

NameDescription
nameDashlet name
typeDashlet type - please see list of supported values.
viewReport

Only if "type" has value "viewReport". View report definition with following structure:

NameDescription
idView identifier
nameView name
typeView type - please see list of supported values.
filter

(Optional) Applied filter with following structure:

Name
Description
drilldown

Drilldown defined with attribute code and following structure:

Name
Description
opFilter operation type - please see list of supported values.
value/values(Optional) Depends on selected "op". Contains value or values for filter.



canAccessViewReportOnly if "type" has value "viewReport". Boolean flag indicating if view report is accessible.
textContentOnly if "type" has value "textContent". Content of a text dashlet.


Sample Request / Response

Using curl:

Code Block
curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" https://service.belladati.com/api/dashboards/123

The JSON format response:

Code Block
javascript
javascript
{
  "id": 123,
  "name": "My Dashboard",
  "description" : "This is my dashboard.",
  "dashlets": [
    {
      "name": "First Dashlet",
      "type": "viewReport",
      "canAccessViewReport": true,
      "viewReport": {
        "id": 88739,
        "name": "Sales by User",
        "type": "chart",
        "filter": {
          "drilldown": {
            "L_USER": {
              "values": [
                "john"
              ],
              "op": "IN"
            }
          }
        }
      }
    },
    {
      "name": "Second Dashlet",
      "type": "textContent",
      "textContent": "My text content"
    }
  ]
}
Sv translation
languageja

/api/dashboards/:id

指定されたIDを持つダッシュボードの詳細情報を表示します。

リソース情報

リソースURL 

https://service.belladati.com/api/dashboards/:id

HTTPメソッド

GET

リクエストパラメーター

パラメーター

詳細

id

フェッチするダッシュボードのID。 IDは、/api/dashboards へのレスポンスで見つけることができます。

123

レスポンス構造

JSONレスポンスには、次の要素を持つ1つのJSONオブジェクトが含まれています:

説明
idダッシュボードの識別子
nameダッシュボード名
descriptionダッシュボードの説明
dashlets
各ダッシュレットが次の構造を持つビューの配列:
説明
nameダッシュレット名
typeダッシュレットタイプ - サポートされる値のリストを参照ください。
viewReport

"type" の値が "viewReport" の場合のみ。次の構造でレポート定義を表示します:

説明
idビューの識別子
nameビュー名
typeビュータイプ - サポートされている値のリストを参照ください。
filter

(オプション) 次の構造の適用されたフィルター:

説明
drilldown

ドリルダウンが属性コードと次のような構造で定義されます:

説明
opフィルター操作タイプ - サポートされている値のリストを参照ください。
value/values(オプション) 選択した "op" に依存します。フィルターの1つまたは複数の値が含まれます。




canAccessViewReport

"type" の値が "viewReport" の場合のみ。ビューレポートにアクセスできるかどうかを示すBooleanフラグ。

textContent
"type" の値が "textContent" の場合のみ。テキストダッシュレットのコンテンツ。



サンプルリクエスト/レスポンス

Curl使用:

Code Block
curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" https://service.belladati.com/api/dashboards/123

JSON形式のレスポンス:

Code Block
javascript
javascript
{
  "id": 123,
  "name": "My Dashboard",
  "description" : "This is my dashboard.",
  "dashlets": [
    {
      "name": "First Dashlet",
      "type": "viewReport",
      "canAccessViewReport": true,
      "viewReport": {
        "id": 88739,
        "name": "Sales by User",
        "type": "chart",
        "filter": {
          "drilldown": {
            "L_USER": {
              "values": [
                "john"
              ],
              "op": "IN"
            }
          }
        }
      }
    },
    {
      "name": "Second Dashlet",
      "type": "textContent",
      "textContent": "My text content"
    }
  ]
}