Versions Compared

Key

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

/api/reports/views/:id/table/json

This method returns table in JSON format.

Resource Information

Request Parameters

Parameters

Detail

Example

id

ID of the table. This ID is part of the /api/reports/:id response.

123

filter

(Optional) Filter applied to the table, 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.
countOp

(Optional) Used with COUNT operation. Specifies the second operation used together with count.

Supported values: EQ, NEQ, GT, GTE, LT, LTE

In order to join multiple filters or apply two filters on the same parameter, attribute drilldown can be an array. "conditionType" attribute outside "drilldown" defines condition between drilldown array members and "conditionType" attribute inside drilldown member defines condition between attributes in the drilldown.




Code Block
{
   "drilldown": {
      "L_COUNTRY_OR_AREA": {
          "op": "EQ",
          "value": "Slovakia"
      },
      "L_TYPE": {
          "op": "IN",
          "values": [ "Type 1", "Type 2", "Type 3" ]
      },
      "L_DATE": {
          "op": "NOT_NULL"
      },
      "L_PRODUCT":{ 
         "op":"COUNT",
         "countOp":"LTE",
         "value":"816"
      }
   }
}

Example of a between filter:
{"drilldown":[{"L_ID":{"op":"GT","value":"10"}},{"L_ID":{"op":"LT","value":"20"}}]} 


drilldownConfig

(Optional) Replaces the table drill-down with custom configuration. Both horizontal and vertical drill-down configurations can be replaced. Each configuration is an array with the following elements:

Name

Description

verticalDefinition of header that should be set (vertical header)
horizontalDefinition of header that should be set (horizontal header)
dataSetDrilldownAttributeCode of the attribute (e.g. L_CITY)
dataSetDrilldownAttributeSubset(Optional) ID of the used subset
hideDataSetCustomMembersDefines whether custom members will be displayed
limitSets limit for members displayed in the selected drill-down. Set this value to "ALL" if all available members should be loaded.



Code Block
{
	"horizontal":[
		{
			"dataSetDrilldownAttribute":"L_PRODUCT_TYPE",
			"hideDataSetCustomMembers": false,
			"limit": "ALL"
		},
		{
			"dataSetDrilldownAttribute":"L_PRODUCT",
			"dataSetDrilldownAttributeSubset": "TdPgywXkmB",
			"hideDataSetCustomMembers": true,
			"limit": 1000
		}
	],
	"vertical":[
		{
			"dataSetDrilldownAttribute":"L_DATE",
	 		"dataSetDrilldownAttributeSubset":"0EE39yrVHY",
			"hideDataSetCustomMembers": false
		}
	]
}	


subsetValueIdIf defined, response will return value for selected member of the subset. In case, this parameter is combined with expand = true, all child of the selected member will be loaded.


Code Block
subsetValueId=F2Qx2LrYRX


expandWill expand all available drill-downs. Available values: true / false


Code Block
expand=true


Response Structure

Code Block
{ 
  "rowsCount" : ..., 
  "name" : ..., 
  "header" : [ ], 
  "body" : [ ]
}

JSON response contains elements with following definition:

NameDescription
rowsCountTotal number of rows including headers and data
nameTable view name
headerArray containing header elements
bodyArray containing data elements

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/reports/views/1234/table/json

The JSON format response:

Code Block
{ 
  "rowsCount" : 5, 
  "name" : "My Table Name", 
  "header" : [ 
    [ 
      { 
        "value" : "", 
        "type" : "header" 
      } 
    ], 
    [ 
      { 
        "value" : "", 
        "type" : "header" 
      } 
    ] 
  ], 
  "body" : [ 
    [ 
      { 
        "value" : "Value", 
        "type" : "header" 
      }, 
      { 
        "style" : " color:rgb(77, 77, 77) !important ; background-color:rgb(237, 237, 237); ", 
        "value" : "1,033,054,533,155" 
      } 
    ], 
    [ 
      { 
        "value" : "Value Footnotes", 
        "type" : "header" 
      }, 
      { 
        "style" : " color:rgb(77, 77, 77) !important ; background-color:rgb(237, 237, 237); ", 
        "value" : "1" 
      } 
    ], 
    [ 
      { 
        "value" : "B", 
        "type" : "header" 
      }, 
      { 
        "style" : " color:rgb(77, 77, 77) !important ; background-color:rgb(237, 237, 237); ", 
        "value" : "5" 
      } 
    ]
  ]
}

Next steps

List siblings

Sv translation
languageja

/api/reports/views/:id/table/json

このメソッドは、JSON形式で表を返します。

リソース情報

リクエストパラメーター

パラメーター

詳細

id

表ID。このIDは、/api/reports/:id レスポンスの一部です。

123

filter

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

説明
drilldown

属性コードと次の構造で定義されたドリルダウン:

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

COUNT演算で使用されます。countと一緒に使用される2番目の操作を指定します。

サポートされている値: EQ, NEQ, GT, GTE, LT, LTE

複数のフィルターを結合したり、同じパラメーターに2つのフィルターを適用したりするために、属性のドリルダウンを配列にすることができます。"drilldown" の外側の "conditionType" 属性は、ドリルダウン配列メンバー間の条件を定義し、ドリルダウンメンバーの内側の "conditionType" 属性は、ドリルダウンの属性間の条件を定義します。




Code Block
{
   "drilldown": {
      "L_COUNTRY_OR_AREA": {
          "op": "EQ",
          "value": "Slovakia"
      },
      "L_TYPE": {
          "op": "IN",
          "values": [ "Type 1", "Type 2", "Type 3" ]
      },
      "L_DATE": {
          "op": "NOT_NULL"
      },
      "L_PRODUCT":{ 
         "op":"COUNT",
         "countOp":"LTE",
         "value":"816"
      }
   }
}

Example of a between filter:
{"drilldown":[{"L_ID":{"op":"GT","value":"10"}},{"L_ID":{"op":"LT","value":"20"}}]} 


drilldownConfig

(オプション) 表のドリルダウンをカスタム構成に置き換えます。水平ドリルダウン構成と垂直ドリルダウン構成の両方を置き換えることができます。各構成は、次の要素を持つ配列です:

説明
vertical設定するヘッダーの定義 (垂直ヘッダー)
horizontal設定するヘッダーの定義 (水平ヘッダー)
dataSetDrilldownAttribute属性コード(例: L_CITY)
dataSetDrilldownAttributeSubset(オプション) 使用されたサブセットのID
hideDataSetCustomMembersカスタムメンバーを表示するかどうかを定義します。
limit選択したドリルダウンに表示されるメンバーの制限を設定します。使用可能なすべてのメンバーをロードする必要がある場合は、この値を "ALL" に設定します。



Code Block
{
	"horizontal":[
		{
			"dataSetDrilldownAttribute":"L_PRODUCT_TYPE",
			"hideDataSetCustomMembers": false,
			"limit": "ALL"
		},
		{
			"dataSetDrilldownAttribute":"L_PRODUCT",
			"dataSetDrilldownAttributeSubset": "TdPgywXkmB",
			"hideDataSetCustomMembers": true,
			"limit": 1000
		}
	],
	"vertical":[
		{
			"dataSetDrilldownAttribute":"L_DATE",
	 		"dataSetDrilldownAttributeSubset":"0EE39yrVHY",
			"hideDataSetCustomMembers": false
		}
	]
}	


subsetValueId

定義されている場合、レスポンスはサブセットの選択されたメンバーの値を返します。このパラメーターを expand = true と組み合わせると、選択したメンバーのすべての子がロードされます。


Code Block
subsetValueId=F2Qx2LrYRX


expand

利用可能なすべてのドリルダウンを拡張します。使用可能な値: true / false


Code Block
expand=true


レスポンス構造

Code Block
{ 
  "rowsCount" : ..., 
  "name" : ..., 
  "header" : [ ], 
  "body" : [ ]
}

JSONレスポンスは、次の定義を持つ要素が含まれています:

説明
rowsCountヘッダーとデータを含む行の総数
name表ビュー名
headerヘッダー要素を含む配列
bodyデータ要素を含む配列

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

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/reports/views/1234/table/json

JSON形式のレスポンス:

Code Block
{ 
  "rowsCount" : 5, 
  "name" : "My Table Name", 
  "header" : [ 
    [ 
      { 
        "value" : "", 
        "type" : "header" 
      } 
    ], 
    [ 
      { 
        "value" : "", 
        "type" : "header" 
      } 
    ] 
  ], 
  "body" : [ 
    [ 
      { 
        "value" : "Value", 
        "type" : "header" 
      }, 
      { 
        "style" : " color:rgb(77, 77, 77) !important ; background-color:rgb(237, 237, 237); ", 
        "value" : "1,033,054,533,155" 
      } 
    ], 
    [ 
      { 
        "value" : "Value Footnotes", 
        "type" : "header" 
      }, 
      { 
        "style" : " color:rgb(77, 77, 77) !important ; background-color:rgb(237, 237, 237); ", 
        "value" : "1" 
      } 
    ], 
    [ 
      { 
        "value" : "B", 
        "type" : "header" 
      }, 
      { 
        "style" : " color:rgb(77, 77, 77) !important ; background-color:rgb(237, 237, 237); ", 
        "value" : "5" 
      } 
    ]
  ]
}

次に

List siblings