Help Center/ DataArts Insight/ API Reference/ Large Screen/ Retrieving the Data of a Specified Large Screen Component
Updated on 2025-02-25 GMT+08:00

Retrieving the Data of a Specified Large Screen Component

Function

This API is used to retrieve the data of a specified large screen component.

URI

POST /v1/{project_id}/screens/{screen_id}/query-data

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For how to obtain the project ID, see Obtaining a Project ID.

screen_id

Yes

String

Large screen ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Workspace-Id

Yes

String

Workspace ID. For how to obtain it, see Obtaining a Workspace ID.

X-Auth-Token

Yes

String

User token. Obtain a user token by calling IAM's "Obtaining a User Token" API. X-Subject-Token in the response header is the desired user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

node_id

Yes

String

Component ID.

selectors

No

Array of selectors objects

Filter list.

Table 4 selectors

Parameter

Mandatory

Type

Description

selector_node_id

No

String

Filter component ID.

field_id

No

String

Filter field ID.

values

No

Array of objects

Filter value.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

cell_data

Array of OpenApiCellInfoList objects

List of returned data. By default, the first line is the field name.

record_count

Integer

Number of returned data records.

Table 6 OpenApiCellInfoList

Parameter

Type

Description

cell_info_list

Array of OpenApiCellInfo objects

Data list.

Table 7 OpenApiCellInfo

Parameter

Type

Description

caption

String

Field name.

data_type

String

Data type. The options include:

  • DATETIME: time type.
  • STRING: character type.
  • NUMBER: numeric type.

level_type

String

Subtype of a date, for example, year, month, and day.

cell_raw_value

Object

Original value of a field.

cell_value

Object

Formatted value of a field.

model_type

String

Field type. The options are:

  • dimension: dimension.
  • measure: metric.
  • metric: indicator.

Example Request

Retrieve the data of a specified large screen component.

https://{endpoint}/v1/{project_id}/screens/{screen_id}/query-data

{
  "node_id" : "9f7ff361-xxxx-482d-xxxx-57dd19bda14e",
  "selectors" : [ {
    "selector_node_id" : "d1e4b677-xxxx-4016-xxxx-dbd9a4bf2f20",
    "field_id" : "cca5cb5e-xxxx-4614-xxxx-8a4f90447ae0.field",
    "values" : [ "value1" ]
  } ]
}

Example Response

Status code: 200

The component data is successfully returned.

{
  "cell_data" : [ [ {
    "caption" : "create_time(year)",
    "data_type" : "DATETIME",
    "level_type" : "yearLevel",
    "cell_raw_value" : null,
    "cell_value" : "create_time(year)",
    "model_type" : "dimension"
  } ], [ {
    "caption" : "create_time(year)",
    "data_type" : "DATETIME",
    "level_type" : "yearLevel",
    "cell_raw_value" : "2020",
    "cell_value" : "2020",
    "model_type" : "dimension"
  } ] ],
  "record_count" : 1
}

Status Codes

Status Code

Description

200

The component data is successfully returned.

Error Codes

See Error Codes.