This article describes the APIs for report resources.
List all works
Endpoint:
/openapi/v2/works(GET)Description: Retrieves a list of all works in an organization. You can filter the results by work type.
Request Parameters:
/openapi/v2/works?worksType=Parameter
Type
Description
Required
worksType
string
A query parameter that specifies the type of work to retrieve. If omitted, works of all types are returned. Valid values:
DATAPRODUCT: data portal
PAGE: dashboard
REPORT: spreadsheet
dashboardOfflineQuery: self-service data retrieval
DATAFORM: data form
ANALYSIS: ad-hoc analysis
SCREEN: data screen
No
auth3rdFlag
int
A query parameter that filters works based on their third-party embedding status. Valid values:
0: Embedding not enabled.
1: Embedding enabled.
Available since: private deployment v3.6
No
status
int
A query parameter that filters works based on their publishing status. If omitted, works of all statuses are returned. Valid values:
0: Unpublished
1: Published
2: Modified but not published
3: Taken offline
Available since: private deployment v3.8
No
Response Parameters (For SDK calls, only the
dataobject is returned):Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: The call was successful.
An error code starting with AE or OE: The call failed.
message
string
The error message. Valid values:
success: The call was successful.
Other messages: Information returned when the call fails.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request was successful.
false: The request failed.
data
object [ ]
An array of work objects.
status
int
The publishing status of the work. Added in private deployment v3.8. Valid values:
0: Unpublished
1: Published
2: Modified but not published
3: Taken offline
Example: 1
auth3rdFlag
int
The third-party embedding status. Added in private deployment v3.6. Valid values:
0: Embedding not enabled
1: Embedding enabled
Example: 0
worksId
string
The ID of the work.
Example: 97f7f4c1-543a-4069-8e8d-a56cfcd6****
createTime
string
The work's creation timestamp in milliseconds.
Example: 1530078690000
workType
string
The type of the work. Valid values:
DATAPRODUCT: data portal
PAGE: dashboard
REPORT: spreadsheet
dashboardOfflineQuery: self-service data retrieval
Example: DATAFORM
ownerName
string
The account name of the work owner.
Example: w****@aliyun.com
accountName
string
The account name of the work owner.
Example: w****@aliyun.com
workspaceName
string
The name of the workspace where the work is located. Added in private deployment v3.8.4.
Example: Pro Regression
ownerId
string
The user ID of the work owner in Quick BI.
Example: 74f5527216d14e9892245320ebf2****
modifyName
string
The account name of the user who last modified the work.
Example: 13855265****@163.com
workspaceId
string
The ID of the workspace where the work is located.
Example: c5f86ad2-ef53-4c51-8720-162ecfdb****
securityLevel
string
The collaboration security policy for the work. Valid values:
0: Private
12: Shared with specific members
1 or 11: Shared with all workspace members
NoteIf you are using the legacy permission model, the returned value is 1.
If you are using the new permission model, the returned value is 11.
Example: 0
description
string
The description of the work.
Example: Description for a test report
workName
string
The name of the work.
Example: Test Report
modifyTime
string
The work's last modification timestamp in milliseconds.
Example: 1530078690000
draftViewUrl
string
The preview link for the draft version of the dashboard.
Note:
1. This parameter is valid only for dashboards.
2. This parameter is returned only when the "Allow copying preview link" feature is enabled for dashboards in edit mode.
directory
object
The directory where the work is located. Added in private deployment v3.8.4.
This object is omitted if the work is in the root directory.
pathId
string
The path ID of the directory where the work is located.
Example: 66ffe22b-83be-47fd-b49d-9ca58d29****/f7f6e22b-83be-47fd-b49d-9ca686a9****
pathName
string
The path name of the directory where the work is located.
Example: Level-1 Directory/Level-2 Directory
name
string
The name of the directory.
Example: Chart Report
id
string
The ID of the directory where the work is located.
Example: f7f6e22b-83be-47fd-b49d-9ca686a9****
publicFlag
boolean
Indicates whether the work is public.
publicInvalidTime
integer
The expiration timestamp for the public link of the work.
formFillingStatus
boolean
Indicates whether a data form is configured in the spreadsheet.
Available since: private deployment v5.4.1
Response Example:
{ "traceId": "284d25a9-34f0-****-8f76-98b1aeba766d", "code": null, "message": null, "data": [ { "worksId": "f3bf46a8-****", "workType": "PAGE", "workName": "Report Name", "workspaceId": "87c6b145-****", "workspaceName": "xxxxx", "securityLevel": "0", "auth3rdFlag":0, "description": null, "ownerId": "363e8880****", "accountName": null, "ownerName": "cat4***@aliyun.com", "modifyName": null, "gmtCreate": 1484818350000, "gmtModify": 1557823287000, "draftViewUrl": "**/dashboard/view/pc.htm?pageId=cd1234f-321cs342-4sd31**&previewDraft=true", "status":1, "directory":{ "id":"31a87ad2-***", "name":"Level-2 Directory", "pathId":"38b2796c-***/31a87ad2-***", "pathName":"Level-1 Directory Name/Level-2 Directory Name" }, "publicFlag": true, "publicInvalidTime": 1721366354000, "formFillingStatus": false } ], "success": true }Java SDK Example:
public static void getWorksByOrganization() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/works") .setMethod(HttpMethod.GET); // Optional parameters // request.addParameter("worksType","xxx"); // request.addParameter("status","xxx"); // request.addParameter("auth3rdFlag","xxx"); String result = openApiClient.syncExecute(request); System.out.println(result); }
List works in a workspace
Endpoint:
/openapi/v2/works/{workspaceId}(GET)Description: Retrieves a list of all works in a specified workspace. You can filter the results by work type.
Request parameters:
/openapi/v2/works/{workspaceId}?worksType=Parameter
Type
Description
Required
workspaceId
string
A path parameter that specifies the ID of the workspace to query.
Yes
worksType
string
A query parameter that specifies the type of work to retrieve. If this parameter is omitted, works of all types are returned. Valid values:
DATAPRODUCT: data portal
PAGE: dashboard
REPORT: spreadsheet
dashboardOfflineQuery: self-service query
DATAFORM: data form
ANALYSIS: ad-hoc analysis
SCREEN: display screen
No
auth3rdFlag
int
A query parameter that filters works based on their third-party embedding status. Valid values:
0: Embedding not enabled.
1: Embedding enabled.
NoteThis parameter was added or updated in standalone deployment v3.6.
No
status
int
A query parameter that filters works based on their publishing status. If this parameter is not specified, works are returned regardless of their status. Valid values:
0: Unpublished
1: Published
2: Modified but not published
3: Taken offline
NoteThis parameter was added or updated in standalone deployment v3.8.
No
Response parameters (When using an SDK, only the
dataobject is returned):Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: The call was successful.
An error code starting with
AEorOE: The call failed.
message
string
The error message. Valid values:
success: The call was successful.
Other information: A message returned when the call fails.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request was successful.
false: The request failed.
data
object []
An array of work objects.
status
int
The publishing status of the work. Added in standalone deployment v3.8. Valid values:
0: Unpublished
1: Published
2: Modified but not published
3: Taken offline
Example:
1auth3rdFlag
int
The third-party embedding status. Added in standalone deployment v3.6. Valid values:
0: Embedding not enabled
1: Embedding enabled
Example:
0worksId
string
The ID of the work.
Example:
97f7f4c1-543a-4069-8e8d-a56cfcd6****createTime
string
A millisecond timestamp that indicates when the work was created.
Example:
1530078690000workType
string
The type of the work. Valid values:
DATAPRODUCT: data portal
PAGE: dashboard
REPORT: spreadsheet
dashboardOfflineQuery: self-service query
Example:
DATAFORMownerName
string
The account name of the work owner.
Example:
w****@aliyun.comaccountName
string
The account name of the work owner.
Example:
w****@aliyun.comworkspaceName
string
The name of the workspace where the work is located. Added in standalone deployment v3.8.4.
Example:
Professional Edition RegressionownerId
string
The user ID of the work owner in Quick BI.
Example:
74f5527216d14e9892245320ebf2****modifyName
string
The account name of the user who last modified the work.
Example:
13855265****@163.comworkspaceId
string
The ID of the workspace where the work is located.
Example:
c5f86ad2-ef53-4c51-8720-162ecfdb****securityLevel
string
The collaboration security policy for the work. Valid values:
0: Private
12: Shared with specific members
1 or 11: Shared with all workspace members
NoteIf you use legacy permissions, the return value is 1.
If you use new permissions, the return value is 11.
Example:
0description
string
The description of the work.
Example:
Description for a test reportworkName
string
The name of the work.
Example:
Test ReportmodifyTime
string
A millisecond timestamp that indicates when the work was last modified.
Example:
1530078690000draftViewUrl
string
The preview link for the draft version of the dashboard.
Important1. This parameter is valid only for dashboards.
2. This parameter is returned only when the "Allow copying of preview link" feature is enabled for the organization.
directory
object
Information about the directory where the work is located. Added in standalone deployment v3.8.4.
This object is not returned if the work is in the root directory.
pathId
string
The path ID of the directory where the work is located.
Example:
66ffe22b-83be-47fd-b49d-9ca58d29****/f7f6e22b-83be-47fd-b49d-9ca686a9****pathName
string
The path name of the directory where the work is located.
Example:
Level-1 Directory/Level-2 Directoryname
string
The name of the directory.
Example:
Level-2 Directoryid
string
The ID of the directory where the work is located.
Example:
f7f6e22b-83be-47fd-b49d-9ca686a9****publicFlag
boolean
Indicates whether the work is public.
publicInvalidTime
integer
The expiration date for the public link of the work.
formFillingStatus
boolean
Indicates whether a data form is configured in the spreadsheet.
Available since: standalone deployment v5.4.1
Response example:
{ "traceId": "284d25a9-34f0-****-8f76-98b1aeba766d", "code": null, "message": null, "data": [ { "worksId": "f3bf46a8-****", "workType": "PAGE", "workName": "Report Name", "workspaceId": "87c6b145-****", "workspaceName": "xxxxx", "securityLevel": "0", "auth3rdFlag":0, "description": null, "ownerId": "363e****0032", "accountName": "cat4***@aliyun.com", "ownerName": "cat4***@aliyun.com", "modifyName": null, "createTime": 1484818350000, "modifyTime": 1557823287000, "status":1, "directory":{ "id":"31a87ad2-***", "name":"Level-2 Directory", "pathId":"38b2796c-***/31a87ad2-***", "pathName":"Level-1 Directory Name/Level-2 Directory Name" }, "publicFlag": true, "publicInvalidTime": 1721366354000, "formFillingStatus": true } ], "success": true }Java SDK example:
public static void getWorksByWorkspace() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/works/{workspaceId}") .setMethod(HttpMethod.GET); // Optional parameters // request.addParameter("worksType","xxx"); // request.addParameter("status","xxx"); // request.addParameter("auth3rdFlag","xxx"); String result = openApiClient.syncExecute(request); System.out.println(result); }
List works a user can view
Endpoint:
/openapi/v2/works/readable/user/{userId}/list(GET)Description: Retrieves works a user can view. This includes works authorized through workspace membership and direct sharing.
ImportantThis endpoint is deprecated and no longer maintained. Use the recommended List works a user can view endpoint instead.
Input parameters:
Parameter
Type
Description
Required
userId
string
Path parameter. The ID of the user to query.
Yes
Response parameters (SDK calls return only the data field.)
Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Possible values:
0: The request was successful.
An error code starting with AE or OE: The request failed.
message
string
The response message. Possible values:
success: The request was successful.
Other values: An error message if the request failed.
success
boolean
Indicates whether the request was successful. Possible values:
true: The request was successful.
false: The request failed.
data
list
The result of the API request.
worksId
string
The work ID.
workType
string
The work type.
workName
string
The work name.
workspaceId
string
The workspace ID.
securityLevel
string
The security policy. 0: Private, 1: collaborative editing.
description
string
The description.
ownerId
string
The ID of the owner.
accountName
string
The account name of the owner.
ownerName
string
The display name of the owner.
modifyName
string
The display name of the user who last modified the work.
gmtCreate
string
The creation time.
gmtModify
string
The modification time.
auth3rdFlag
integer
The third-party embedding status. Added in standalone deployment v3.6.
status
integer
The publishing status of the work. Added in standalone deployment v3.7.
workspaceName
string
The name of the workspace. Added in standalone deployment v3.8.4.
draftViewUrl
string
The preview link for a dashboard in a draft state.
Note:
1. This parameter applies only to dashboards.
2. This parameter is returned only when the "Allow Copying Preview Link" feature is enabled for the organization.
directory
string [ ]
The workspace directory that contains the work. Added in standalone deployment v3.8.4.
id
string
The directory ID.
name
string
The directory name.
pathId
string
The hierarchical path of directory IDs, e.g., aa/bb/cc/dd.
pathName
string
The hierarchical path of directory names, e.g., Level 1 Directory/Level 2 Directory.
worksCubeModels
object [ ]
The datasets associated with the work.
Response example:
{ "traceId": "284d25a9-34f0-****-8f76-98b1aeba766d", "code": null, "message": null, "data": [ { "worksId": "f3bf46a8-****", // The work ID. "workType": "PAGE", // The work type. // DATAPRODUCT: data portal // PAGE: dashboard // FULLPAGE: full-screen dashboard [Note] // REPORT: spreadsheet // dashboardOfflineQuery: ad-hoc query "workName": "My Report Name", // The work name. "workspaceId": "87c6b145-090c", // The workspace ID. "workspaceName": "xxxxx", // The workspace name. "securityLevel": "0", // The security policy. 0: Private, 1: collaborative editing. "auth3rdFlag":0, // The third-party embedding status. 0: Disabled, 1: Enabled. @since 3.6 "description": null, "ownerId": "363e****0032", // The ID of the work owner. "ownerName": "a***@example.com", // The display name of the work owner. "modifyName": null, "gmtCreate": 1484****50000, // The work creation time. "gmtModify": 1557****87000, // The work modification time. "status":1, // The work status. 0: Unpublished, 1: Published, 2: Modified but not published, 3: Deactivated. "directory":{ // The directory structure of the work. This field is not returned if the work is in the root directory. "id":"31a87ad2-***", // The directory ID. "name":"Level 2 Directory", // The directory name. "pathId":"38b2796c-***/31a87ad2-***", // The hierarchical path of directory IDs, separated by "/". "pathName":"Level 1 Directory Name/Level 2 Directory Name" // The hierarchical path of directory names, separated by "/". } } ], "success": true }NoteSupport for the FULLPAGE type was added in standalone deployment v3.7.
The
auth3rdFlagparameter was added in standalone deployment v3.6.The
statusparameter was added in standalone deployment v3.7.The
directoryandworkspaceNameparameters were added in standalone deployment v3.8.4.
Java SDK example:
public static void getReadableResourcesListByUserId() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/works/readable/user/{userId}/list") .setMethod(HttpMethod.GET); String result = openApiClient.syncExecute(request); System.out.println(result); }
Retrieve data work lineage
Endpoint:
/openapi/v2/works/bloodRelationship(GET)Description: Retrieves the data lineage for a specified data work. The lineage information includes the datasets referenced by each component and the fields used in queries. This operation supports the following data works: dashboards, data screens, ad hoc analysis, spreadsheets, and self-service data retrieval.
Available in: Standalone deployment 3.8.4
Request Parameters:
Parameter
Type
Description
Required
worksId
string
The ID of the data work.
Yes
Response Parameters (For SDK calls, only the data object is returned.)
Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: Success.
An error code starting with AE or OE: The call failed.
message
string
The response message. Valid values:
success: The request was successful.
Other values: An error message describing the failure.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request succeeded.
false: The request failed.
data
object []
The data lineage information for the data work.
componentId
string
The ID of the component.
Example: 0696083a-ca72-4d89-8e7a-c017910e0***
componentName
string
The name of the component.
Example: line chart
componentType
int
The type of the component.
Example: 3
componentTypeName
string
The name of the component type.
Example: LINE
componentTypeCnName
string
The Chinese name of the component type.
Example value: Crosstab
datasetId
string
The ID of the dataset.
Example: dc78a4ed-880d-****-b017-90cfc10c****_company_sales_record
queryParams
object []
A list of fields referenced in the query.
uid
string
The unique ID of the field.
Example: Ndc78a4_order_number
caption
string
The original name of the field.
Example: order_number
pathId
string
The globally unique path ID of the field.
Example: schema7d1944eb-443e-****-8123-bf45a99e7e74.dc78a4ed-880d-452e-b017-90cfc10c****_company_sales_record.[Ndc78a4_order_level].[Ndc78a4_order_level].[Ndc78a4_order_level]
dataType
string
The data type of the field. Valid values:
string: A string.
date: A date type containing only year, month, and day.
datetime: A date and time type.
time: A time type containing only hour, minute, and second.
number: A numeric type.
boolean: A boolean type.
geographic: A geographic location.
url: A URL string.
imageUrl: A URL of an image.
multivalue: A multi-value column.
Example: number
isMeasure
boolean
Indicates whether the field is a measure. Valid values:
trueorfalse.Example: true
areaId
string
Identifies the area within the component where the field is used. Valid values:
drill: drill-down
area_value: value axis/measure
area_measure: Node height/measure
area_dim: Node category/dimension
area_type: category axis/dimension
area_color: color legend/dimension
area_row: row
area_column: column
filters: filter
etc.
Example: area_column
areaName
string
The name of the area.
Example: Column (measure)
expression
string
The expression for the calculated field.
Response Example:
{ "traceId":"9bbd2088-***", "code":null, "message":null, "data":[ { "componentId":"1384fc0e-*", // The ID of the component in a dashboard or the sheet in a spreadsheet. "componentName":"line chart", // The name of the component. This applies only to dashboards. "componentType":3, // The type of the component. This applies only to dashboards. "componentTypeName":"LINE", // The name of the component type. This applies only to dashboards. "datasetId":"9392f3dd-*", // The ID of the dataset referenced by the component. "queryParams":[ // A list of fields referenced in the query. { "uid":"N9392f3_****_point", // The ID of the field in the dataset. "pathId":"4ceed6c3-*.9392f3dd-*.[N9392f3_****_point]", // The globally unique path ID of the field. "caption":"back_point", // The original name of the field. "isMeasure":true, // Indicates whether the field is a measure. `true`: measure, `false`: dimension. "dataType":"number", // The data type of the field, such as string, number, or datetime. "areaId":"area_value", // The area in the component where the field is used. "areaName":"value axis/measure", // The name of the area. } ] } ], "success":true }Java SDK Example:
public static void queryWorksBloodRelationship() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/works/bloodRelationship") .setMethod(HttpMethod.GET); request.addParameter("worksId","xxx"); String result = openApiClient.syncExecute(request); System.out.println(result); }
Check user permission for a work
API path:
/openapi/v2/works/readable(GET)Description: Checks whether a user has permission to view a specific work.
Input parameters:
/openapi/v2/works/readable?worksId=xxx&userId=xxxParameter
Type
Description
Required
userId
string
Query parameter. The ID of the user for the permission check.
Yes
worksId
string
Query parameter. The ID of the work to check.
Yes
Response parameters (SDK calls return only the data field):
Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: The call succeeded.
An error code starting with AE or OE: The call failed.
message
string
The response message. Valid values:
success: The call succeeded.
Other messages: An error message that describes the failure.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request succeeded.
false: The request failed.
data
boolean
The result of the permission check. Valid values:
true: The user has permission.
false: The user does not have permission.
Response example:
{ "traceId": "df7a035f-fd1c-****-a32d-51c8db0c5b95", "code": null, "message": null, "data": true, "success": true }Java SDK example:
public static void readable() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/works/readable") .setMethod(HttpMethod.GET); request.addParameter("worksId","xxx"); request.addParameter("userId","xxx"); String result = openApiClient.syncExecute(request); System.out.println(result); }
Organization embedding details
Endpoint:
/openapi/v2/works/embed/orgEmbedDetail(GET)Description: Retrieves embedding details for an organization, such as the maximum allowed count and current usage.
Available since: private deployment v3.8
Request parameters: None
Response parameters (The SDK returns only the
dataobject.):Parameter
Type
Description
traceId
string
A unique ID for the request.
code
string
Error code. Valid values:
0: The call was successful.
An error code starting with AE or OE: The call failed.
message
string
Message. Valid values:
success: The call was successful.
Other values: An error message if the call fails.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request was successful.
false: The request failed.
data
object
Contains the embedding details.
maxCount
int
Maximum number of allowed embeddings.
embeddedCount
int
The current number of embeddings.
detail
object
Details of current embeddings by type.
page
int
The number of embedded dashboards.
report
int
The number of embedded spreadsheets.
dashboardOfflineQuery
int
The number of embedded ad-hoc queries.
Response example:
{ "traceId":"df7a035f-fd1c-****-a32d-51c8db0c5b95", "code":null, "message":null, "data":{ "maxCount":100, // Maximum allowed embeddings "embeddedCount":99, // Current number of embeddings "detail":{ // Details of current embeddings "page":81, // Number of embedded dashboards "report":7, // Number of embedded spreadsheets "dashboardOfflineQuery":11 // Number of embedded ad-hoc queries } }, "success":true }Java SDK example:
public static void queryEmbeddedInfo() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/works/embed/orgEmbedDetail") .setMethod(HttpMethod.GET); String result = openApiClient.syncExecute(request); System.out.println(result); }
Check report embedding status
Endpoint:
/openapi/v2/works/embed/isEmbedded(GET)Description: Checks whether embedding is enabled for a specific report.
Available since: standalone deployment v3.8
Request parameters:
Parameter
Type
Description
Required
worksId
string
The ID of the report to check.
Yes
Response parameters (SDK calls return only the
datafield):Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: The request was successful.
An error code that starts with AE or OE: The request failed.
message
string
The error message. Valid values:
success: The request was successful.
Other messages: Information about the error.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request was successful.
false: The request failed.
data
boolean
The result of the check. Valid values:
true: Embedding is enabled.
false: Embedding is not enabled.
Response example:
{ "traceId": "df7a035f-fd1c-****-a32d-51c8db0c5b95", "code": null, "message": null, "data": true, // The check result. true indicates that embedding is enabled, while false indicates it is not. "success": true }Java SDK example:
public static void isEmbedded() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/works/embed/isEmbedded") .setMethod(HttpMethod.GET); request.addParameter("worksId","xxx"); String result = openApiClient.syncExecute(request); System.out.println(result); }
Update report embedding status
Endpoint:
/openapi/v2/works/embed/update(PUT)Description: Enables or disables embedding for a specified report.
Available since: standalone deployment v3.8
Request parameters: Sent in the request body.
Parameter
Type
Description
Required
worksId
string
The ID of the report to modify.
Yes
auth3rdFlag
boolean
true: Enable embedding.false: Disable embedding.
Yes
Example:
{ "worksId":"abcdxxx", "auth3rdFlag":true }
Response parameters (SDK calls return only the content of the
datafield):Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: The call was successful.
An error code that starts with AE or OE: The call failed.
message
string
The error message. Valid values:
success: The call was successful.
Other messages: Error details.
success
boolean
Whether the request succeeded. Valid values:
true: The request succeeded.
false: The request failed.
data
int
The number of reports whose embedding status was updated.
Response example:
{ "traceId": "df7a035f-fd1c-****-a32d-51c8db0c5b95", "code": null, "message": null, "data": 1, // Number of reports whose embedding status was updated. "success": true }Java SDK example:
public static void updateEmbeddedStatus() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/works/embed/update") .setMethod(HttpMethod.PUT); request.addParameter("worksId","xxx"); request.addParameter("auth3rdFlag","xxx"); String result = openApiClient.syncExecute(request); System.out.println(result); }
Query reports by dataset ID
Endpoint:
/openapi/v2/works/queryUserWorksByCubeList(GET)Description: Retrieves reports, such as dashboards, spreadsheets, and self-service queries, based on one or more specified datasets.
NoteThis API is deprecated. Use the Query datasets referenced by a specified data source API instead.
Available since: standalone deployment v4.0 (June 2021)
Input parameters:
Parameter
Type
Required
Description
cubeList
JSON array string
Yes
A list of dataset IDs.
Format: The list must be provided as a string that contains a JSON array.
userId
String
No
The ID of the report owner. If specified, this operation returns only reports owned by the specified user.
worksType
String
No
The report type to retrieve. Valid values:
PAGE: dashboardREPORT: legacy spreadsheetdashboardOfflineQuery: self-service queryResponse parameters (SDK calls return only the
datafield):Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: The call was successful.
Any error code starting with
AEorOEindicates that the call failed.
message
string
The error message. Valid values:
success: The call was successful.
Other messages: A message that describes the error.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request was successful.
false: The request failed.
data
object []
An array of report objects based on the specified datasets.
previewUrl
string
The preview URL for the report.
editUrl
string
The edit URL for the report.
cubeList
string [ ]
A list of dataset IDs that the report depends on.
gmtModify
long
The timestamp of the last modification.
modifyName
string
The user who last edited the report.
status
integer
The publishing status of the report. Valid values:
0: Unpublished
1: Published
2: Unpublished Changes
3: Offline
workType
string
The report type. Valid values:
PAGE: dashboard (legacy)DASHBOARD: dashboardREPORT: spreadsheetdashboardOfflineQuery: self-service query
workName
string
The name of the report.
gmtCreate
long
The creation timestamp.
ownerName
string
The name of the report owner.
ownerId
string
The user ID of the report owner.
workspaceName
string
The name of the workspace.
workspaceId
string
The ID of the workspace.
worksId
string
The ID of the report.
Response example:
{ "traceId":"235c9fa8-d6f5-****-a6d4-38f07b2319ce", "code":"0", "message":"success", "success":true, "data":[ { "workspaceId":"xxx", "workspaceName":"xxx", "worksId":"xx", "workName":"xxx", "workType":"dashboardOfflineQuery", "ownerId":"xxx", "status": 1, "gmtModify":1626683514000, "gmtCreate":1626683514000, "cubeList":[ "79c7f420-f3e1-****-93c2-c3ec56be9463" ] } ] }Java SDK example:
public static void testQueryAllWorksBaseedCubeID() throws Exception { String uri = "/openapi/v2/works/queryUserWorksByCubeList"; HttpRequest request = HttpRequest.build() .setUri(uri) .setMethod(HttpMethod.GET); request.addParameter("cubeList", new String[] {"eb827efc-f4de-4651-8fc7-2b1362ad9e77"}); request.addParameter("userId", "123"); // Optional request.addParameter("worksType", "PAGE"); // Optional String result = client.syncExecute(request); System.out.println(result); }
Query a work
Endpoint:
/openapi/v2/works/query(GET)Description: Retrieves the details of a work, including its owner, creation time, and modification time.
Available since: private deployment v4.2
Request parameters:
Parameter
Type
Description
Required
worksId
String
The ID of the work.
Yes
Response parameters (SDK calls return only the data object):
Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: The call was successful.
An error code starting with AE or OE: The call failed.
message
string
The error message. Valid values:
success: The call was successful.
Other messages: Details returned for a failed call.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request was successful.
false: The request failed.
data
object
The details of the work.
status
int
The publishing status of the work. This parameter was added in private deployment v3.8. Valid values:
0: Unpublished
1: Published
2: Modified but not published
3: Offline
Example: 1
auth3rdFlag
int
The third-party embedding status. This parameter was added in private deployment v3.6. Valid values:
0: Embedding not enabled
1: Embedding enabled
Example: 0
worksId
string
The ID of the work.
Example: 97f7f4c1-543a-4069-8e8d-a56cfcd6****
createTime
string
The timestamp in milliseconds when the work was created.
Example: 1530078690000
workType
string
The type of the work. Valid values:
DATAPRODUCT: data portal
PAGE: dashboard
REPORT: spreadsheet
dashboardOfflineQuery: ad-hoc query
Example: DATAFORM
ownerName
string
The display name of the work owner.
Example: w****@aliyun.com
accountName
string
The account name of the work owner.
Example: w****@aliyun.com
workspaceName
string
The name of the work's workspace. This parameter was added in private deployment v3.8.4.
Example: Pro Regression
ownerId
string
The user ID of the work owner in Quick BI.
Example: 74f5527216d14e9892245320ebf2****
modifyName
string
The account name of the user who last modified the work.
Example: 13855265****@163.com
workspaceId
string
The ID of the work's workspace.
Example: c5f86ad2-ef53-4c51-8720-162ecfdb****
securityLevel
string
The collaboration security policy for the work. Valid values:
0: Private
12: Shared with specific members
1 or 11: Shared with all workspace members
Note
If you are using the legacy permission model, the returned value is 1.
If you are using the new permission model, the returned value is 11.
Example: 0
description
string
The description of the work.
Example: Description for a test report
workName
string
The name of the work.
Example: Test Report
modifyTime
string
The timestamp in milliseconds when the work was last modified.
Example: 1530078690000
draftViewUrl
string
The preview link for the draft version of the dashboard.
Note:
1. This parameter is returned only for dashboards.
2. This parameter is returned only when the "Allow copying of preview link" feature is enabled for the organization.
directory
object
Information about the work's directory. This parameter was added in private deployment v3.8.4.
This object is not returned if the work is in the root directory.
pathId
string
The full directory path, by ID, to the work.
Example: 66ffe22b-83be-47fd-b49d-9ca58d29****/f7f6e22b-83be-47fd-b49d-9ca686a9****
pathName
string
The full directory path, by name, to the work.
Example: Level-1 Directory/Level-2 Directory
name
string
The name of the work's immediate parent directory.
Example: Chart Report
id
string
The ID of the work's immediate parent directory.
Example: f7f6e22b-83be-47fd-b49d-9ca686a9****
publicFlag
boolean
Indicates whether the work is public.
publicInvalidTime
integer
The expiration date for public access to the work.
formFillingStatus
boolean
Indicates whether form filling is configured in the spreadsheet.
Available since: private deployment v5.4.1
Response example:
{ "modifyTime": 1595575199000, "workName": "Test Report", "ownerId": "13651***", "accountName": null, "createTime": 1595575199000, "directory": { "pathName": "Exclusive Test", "name": "Exclusive Test", "id": "ff48e996-d14e-****-ba4c-3af73a9fa396", "pathId": "ff48e996-d14e-****-ba4c-3af73a9fa396" }, "securityLevel": 0, "auth3rdFlag": 0, "ownerName": "luyao_account", "worksId": "7d236d2c-***", "workType": "PAGE_DIRECTORY", "workspaceName": "Test Workspace", "workspaceId": "c7d4b04b-6133-****-a4d4-598ee038892c", "status": 1, "publicFlag": true, "publicInvalidTime": 1721366354000, "formFillingStatus": true }Java SDK example:
public static void queryWorks(String worksId) throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/works/query") .setMethod(HttpMethod.GET); request.addParameter("worksId", worksId); String result = client.syncExecute(request); System.out.println(result); }
List authorized works
Endpoint:
/openapi/v2/works/authorize/user/{userId:.+}/list(GET)Description: Retrieves a list of works that a user is authorized to view. This includes works within workspaces, those shared directly, and those authorized through menu permissions.
Available since: private deployment v4.2.2
Request parameters:
Parameter
Type
Description
Required
userId
String
Path parameter. The ID of the user.
Yes
workspaceId
String
The ID of the workspace.
No
workType
String
The type of the work. Valid values:
DATAPRODUCT: data portal
PAGE: dashboard
REPORT: spreadsheet
dashboardOfflineQuery: self-service query
SCREEN: screen
DATAFORM: data form
FULLPAGE: full-screen dashboard
ANALYSIS: ad-hoc analysis
Example: DATAFORM
No
Response parameters (For SDK calls, only the data object is returned)
Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: The call was successful.
An error code that starts with AE or OE indicates that the request failed.
message
string
The response message. Valid values:
success: The call was successful.
Other messages: An error message that is returned if the request fails.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request succeeded.
false: The request failed.
data
object []
An array of work objects that the user is authorized to view.
status
int
The publishing status of the work. Added in private deployment v3.8. Valid values:
0: Unpublished
1: Published
2: Modified but not published
3: Offline
Example: 1
auth3rdFlag
int
The third-party embedding status. Added in private deployment v3.6. Valid values:
0: Embedding not enabled
1: Embedding enabled
Example: 0
worksId
string
The ID of the work.
Example: 97f7f4c1-543a-4069-8e8d-a56cfcd6****
gmtCreate
string
The creation timestamp of the work, in milliseconds.
Example: 1530078690000
workType
string
The type of the work. Valid values (see the request parameters for the complete list):
DATAPRODUCT: data portal
PAGE: dashboard
REPORT: spreadsheet
dashboardOfflineQuery: self-service query
Example: DATAFORM
ownerName
string
The account name of the work's owner.
Example: w****@aliyun.com
accountName
string
The account name of the work's owner.
Example: w****@aliyun.com
workspaceName
string
The name of the workspace where the work is located. Added in private deployment v3.8.4.
Example: Professional Edition Regression
ownerId
string
The user ID of the work owner in Quick BI.
Example: 74f5527216d14e9892245320ebf2****
modifyName
string
The account name of the user who last modified the work.
Example: 13855265****@163.com
workspaceId
string
The ID of the workspace where the work is located.
Example: c5f86ad2-ef53-4c51-8720-162ecfdb****
securityLevel
string
The collaboration security policy for the work. Valid values:
0: Private
12: Shared with specific members
1 or 11: Shared with all workspace members
NoteIf you use the legacy permission model, the return value is 1.
If you use the new permission model, the return value is 11.
Example: 0
description
string
The description of the work.
Example: Test report description
workName
string
The name of the work.
Example: Test report
gmtModify
string
The modification timestamp of the work, in milliseconds.
Example: 1530078690000
draftViewUrl
string
The preview link for the dashboard's draft version.
Note:
1. This parameter applies only to dashboards.
2. It is returned only if the "Allow copying preview link" feature is enabled for the organization.
directory
object
Information about the directory where the work is located. Added in private deployment v3.8.4.
This object is not returned if the work is in the root directory.
pathId
string
The path ID of the directory where the resource is located.
Example: 66ffe22b-83be-47fd-b49d-9ca58d29****/f7f6e22b-83be-47fd-b49d-9ca686a9****
pathName
string
The path name of the directory where the resource is located.
Example: Level-1 Directory/Level-2 Directory
name
string
The name of the directory.
Example: Chart Report
id
string
The ID of the directory.
Example: f7f6e22b-83be-47fd-b49d-9ca686a9****
formFillingStatus
boolean
Indicates whether a data form is configured in the spreadsheet.
Available since: private deployment v5.4.1
Response example
{ "traceId": "284d25a9-34f0-****-8f76-98b1aeba766d", "code": null, "message": null, "data": [ { "worksId": "f3bf46a8-****", "workType": "PAGE", "workName": "Report Name", "workspaceId": "87c6b145-****", "workspaceName": "xxxxx", "securityLevel": "0", "auth3rdFlag":0, "description": null, "ownerId": "363e88800032", "accountName": null, "ownerName": "xxxxpaw@aliyun.com", "modifyName": null, "gmtCreate": 1484818350000, "gmtModify": 1557823287000, "status":1, "directory":{ "id":"31a87ad2-***", "name":"Level-2 Directory", "pathId":"38b2796c-***/31a87ad2-***", "pathName":"Level-1 Directory Name/Level-2 Directory Name" }, "formFillingStatus": false } ], "success": true }Java SDK example
private static void queryAuthorizeWorksByUserId(String userId) throws Exception { HttpRequest request = HttpRequest.build() .setUri("/authorize/user/"+userId+"/list") .setMethod(HttpMethod.GET); String result = client.syncExecute(request); System.out.println(result); }
Get self-service data retrieval tasks
API path:
/openapi/v2/works/offlineDownload/getList(GET)API description: Retrieves a list of a user's recent, successful self-service data retrieval tasks.
Initial version: standalone deployment v4.3
API parameters:
Parameter
Type
Description
Required
userId
String
The user ID.
Yes
startTime
String
The start time for the query.
Format:
2022-02-16 09:18:16Yes
Response parameters (SDK calls return only the
dataobject)Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: The request was successful.
An error code starting with AE or OE: The request failed.
message
string
The error message. Valid values:
success: The request was successful.
Other messages: A message returned when the request fails.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request was successful.
false: The request failed.
data
object [ ]
A list of self-service data retrieval tasks.
downloadId
string
The ID of the self-service data retrieval task.
downloadName
string
The user-specified name for the downloaded file.
creatorId
string
The ID of the task creator.
creatorName
string
The name of the task creator.
pageId
string
The ID of the dashboard or self-service data retrieval report associated with the task.
status
integer
The status of the task. This API only returns successful tasks, so the value is always 1.
message
string
The execution status message for the task.
costTime
integer
The task duration in seconds.
fileId
string
The ID of the file generated by the task.
fileUrl
string
The file path.
gmtCreate
string
The task creation time.
isDeleted
boolean
Indicates whether the file associated with the task has been deleted.
Response example:
{ "traceId": "b442c4c5-0f97-****-b397-0cf98b2febcd", "code": "0", "message": "success", "data": [ { "downloadId": "2bea9a58-4dbb-****-a0c6-bf88931873af", // The ID of the self-service data retrieval task "downloadName": "independentdemo2_自助取数", // The user-specified name for the downloaded file "creatorId": "fec074144320*****b1905061e6a951a2", // The ID of the task creator "creatorName": "quickBiAdmin", // The name of the task creator "pageId": "1a824718-3a82-4b01-a1eb-8a09d47769d8", // The ID of the associated dashboard or self-service data retrieval report "status": 1, // The task status. The value is always 1 because this API returns only successful tasks. "message": "success", // The execution status message for the task "costTime": 0, // Task duration in seconds "fileId": "8b232f2****c4591a66247ba7174f7b0", // The ID of the file generated by the task "fileUrl": "****", // The file path "gmtCreate": "2022-04-19 10:27:55", // The task creation time "isDeleted": false // Indicates whether the associated file has been deleted } ], "success": true, "httpCode": 200, "dynamicMessage": null }Java SDK example
public static void listOfflineDownloadRecord() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/works/offlineDownload/getList") .setMethod(HttpMethod.GET); request.addParameter("userId","xxx"); request.addParameter("startTime","xxx"); String result = openApiClient.syncExecute(request); System.out.println(result); }
Query component performance data
API Path:
/openapi/v2/auditlog/analysis/component/queryPerformance(GET)Description: Retrieves a list of component performance data.
Available in: Standalone deployment v5.2 and later
Request parameters:
Parameter
Type
Description
Required
queryType
String
The type of query.
Yes
workspaceId
String
The ID of the workspace.
Yes
reportId
String
The ID of the report.
No
resourceType
String
The type of the report.
No
costTimeAvgMin
String
The minimum average query time.
No
pageSize
Integer
The number of entries to return on each page.
Yes
pageNum
Integer
The page number to return.
Yes
Response parameters (SDK methods return only the
dataobject.)Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code returned for the request. Valid values:
0: The call was successful.
An error code that starts with AE or OE: The call failed.
message
string
The error message returned for the request. Valid values:
success: The call was successful.
An error message if the call fails.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request was successful.
false: The request failed.
data
object [ ]
An array of objects representing component performance data.
componentId
string
The ID of the component.
componentName
string
The name of the component.
reportId
string
The ID of the report that the component belongs to.
reportType
string
The type of the report.
reportName
string
The name of the report that the component belongs to.
queryTimeoutCount
Integer
The number of times a chart query timed out.
RepeatSqlQueryPercent
string
The percentage of repeated SQL queries.
workspaceName
string
The name of the workspace.
workspaceId
string
The ID of the workspace.
repeatQueryPercentNum
Integer
The number of repeated queries.
repeatQueryPercent
string
The percentage of repeated queries.
quickIndexCostTimeAvg
double
The average query time for requests that hit the Quick Engine.
quickIndexQueryCount
Integer
The number of requests that hit the Quick Engine.
cacheCostTimeAvg
double
The average query time for requests that hit the cache.
cacheQueryCount
Integer
The number of requests that hit the cache.
repeatSqlQueryCount
Integer
The number of repeated SQL queries.
costTimeAvg
double
The average query time.
queryCountAvg
double
The average number of queries.
queryCount
Integer
The total number of queries.
queryTimeoutCountPercent
double
The percentage of chart queries that timed out.
queryOverTenSecPercentNum
double
The percentage of queries that took longer than 10 seconds.
queryOverFivePercentNum
double
The number of queries that took longer than 5 seconds.
queryOverTenSecPercent
string
The percentage of queries that took longer than 10 seconds.
queryOverFiveSecPercent
string
The percentage of queries that took longer than 5 seconds.
Example response
{ "traceId": "b442c4c5-0f97-****-b397-0cf98b2febcd", "code": "0", "message": "success", "data": [ { "componentId": "0696083a-ca72-****-8e7a-c017910e0***", "componentName": "Line Chart", "reportId": "6b407e50-e774-****-9956-da2425c2****", "reportName": "ClusterRiskReport", "reportType": "report", "queryTimeoutCount": 1, "repeatSqlQueryPercent": "0.3", "workspaceName": "Test Workspace", "workspaceId": "89713491-cb4f-****-b889-e82c35f1****", "repeatQueryPercentNum": 2, "repeatQueryPercent": "0.3", "quickIndexCostTimeAvg": 0.3, "quickIndexQueryCount": 3, "cacheCostTimeAvg": 0.3, "cacheQueryCount": 3, "repeatSqlQueryCount": 5, "costTimeAvg": 0.3, "queryCountAvg": 0.3, "queryCount": 5, "queryTimeoutCountPercent": 0.3, "queryOverTenSecPercentNum": 0.3, "queryOverFivePercentNum": 5, "queryOverTenSecPercent": "0.3", "queryOverFiveSecPercent": "0.3" } ], "success": true, "httpCode": 200, "dynamicMessage": null }Java SDK example:
public static void queryPerformance() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/auditlog/analysis/component/queryPerformance") .setMethod(HttpMethod.GET); request.addParameter("queryType","xxx"); request.addParameter("workspaceId","xxx"); request.addParameter("reportId","xxx"); request.addParameter("resourceType","xxx"); request.addParameter("costTimeAvgMin","xxx"); request.addParameter("pageSize","10"); request.addParameter("pageNum","1"); String result = openApiClient.syncExecute(request); System.out.println(result); }
Query report performance logs
API path:
/openapi/v2/auditlog/analysis/report/queryPerformance(GET)API description: Queries report performance logs.
Version: Available for independent deployment v5.2 and later.
Request parameters:
Parameter
Type
Description
Required
queryType
String
The query type.
Yes
workspaceId
String
The workspace ID.
Yes
reportId
String
The report ID.
No
resourceType
String
The report type.
No
costTimeAvgMin
String
The minimum average query time.
No
pageSize
Integer
The number of entries per page.
Yes
pageNum
Integer
The page number to return.
Yes
Response parameters (Note: For SDK calls, the method returns only the data object.):
Parameter
Type
Description
traceId
string
The trace ID of the request.
code
string
The error code. Valid values:
0: The call succeeded.
An error code starting with AE or OE indicates that the call failed.
message
string
The response message. Valid values:
"success": Returned if the call succeeded.
Other messages: Contains error details if the call fails.
success
boolean
Indicates whether the request was successful. Valid values:
true: The call succeeded.
false: The call failed.
data
object [ ]
A list of objects, where each object contains performance logs for a report.
reportId
string
The report ID.
reportType
string
The report type.
reportName
string
The report name.
componentQueryCount
integer
The number of chart queries.
componentQueryCountAvg
double
The average number of chart queries.
queryTimeoutCount
integer
The number of chart query timeouts.
repeatSqlQueryPercent
string
The percentage of repeated SQL queries.
workspaceName
string
The workspace name.
workspaceId
string
The ID of the workspace that contains the report.
repeatQueryPercentNum
double
The number of repeated queries.
repeatQueryPercent
string
The percentage of repeated queries.
quickIndexCostTimeAvg
double
The average query time for Quick Engine hits.
quickIndexQueryCount
integer
The number of Quick Engine hits.
cacheCostTimeAvg
double
The average time for cache hits.
cacheQueryCount
integer
The number of cache hits.
repeatSqlQueryCount
integer
The number of repeated SQL queries.
queryCountAvg
double
The average number of queries.
queryCount
integer
The total number of queries.
queryTimeoutCountPercent
double
The percentage of chart query timeouts.
queryOverTenSecPercentNum
double
The percentage of queries that took longer than 10 seconds.
queryOverTenSecPercent
string
The percentage of queries that took longer than 10 seconds.
queryOverFiveSecPercent
string
The percentage of queries that took longer than 5 seconds.
Response example
{ "traceId": "b442c4c5-0f97-****-b397-0cf98b2febcd", "code": "0", "message": "success", "data": [ { "componentId": "0696083a-ca72-****-8e7a-c017910e0***", "componentName": "Line Chart", "reportId": "6b407e50-e774-****-9956-da2425c2****", "reportName": "ClusterRiskReport", "reportType": "report", "queryTimeoutCount": 1, "repeatSqlQueryPercent": "0.3", "workspaceName": "Test Workspace", "workspaceId": "89713491-cb4f-****-b889-e82c35f1****", "repeatQueryPercentNum": 2, "repeatQueryPercent": "0.3", "quickIndexCostTimeAvg": 0.3, "quickIndexQueryCount": 3, "cacheCostTimeAvg": 0.3, "cacheQueryCount": 3, "repeatSqlQueryCount": 5, "costTimeAvg": 0.3, "queryCountAvg": 0.3, "queryCount": 5, "queryTimeoutCountPercent": 0.3, "queryOverTenSecPercentNum": 0.3, "queryOverFivePercentNum": 5, "queryOverTenSecPercent": "0.3", "queryOverFiveSecPercent": "0.3" } ], "success": true, "httpCode": 200, "dynamicMessage": null }Java SDK example
public static void queryReportPerformance() throws SDKException { HttpRequest request = HttpRequest.build() .setUri("/openapi/v2/auditlog/analysis/report/queryPerformance") .setMethod(HttpMethod.GET); request.addParameter("queryType","xxx"); request.addParameter("workspaceId","xxx"); request.addParameter("reportId","xxx"); request.addParameter("resourceType","xxx"); request.addParameter("costTimeAvgMin","xxx"); request.addParameter("pageSize","10"); request.addParameter("pageNum","1"); String result = openApiClient.syncExecute(request); System.out.println(result); }
Embedded reports
API:
/openapi/v2/works/embed/getWorksEmbedList(POST)Description: Retrieves a list of embedded reports in your organization.
Available since: standalone deployment v5.2.2
Request parameters: (Parameters are sent as form data with Content-Type: application/x-www-form-urlencoded;charset=UTF-8.)
Parameter
Type
Description
Required
pageSize
Integer
The number of items to return per page. Default: 10.
No
pageNo
Integer
The page number to retrieve. Default: 1.
No
keyword
String
A keyword for filtering reports by name using a fuzzy match.
No
worksType
String
The report type. If omitted, all types are returned. To query a specific type, specify one of the following enum values:
dataProduct: data product page: dashboard screen: screen report: spreadsheet ANALYSIS: ad hoc analysis dashboardOfflineQuery: self-service query dataForm: data formNo
wsId
String
The workspace ID.
No
NoteNote: When using an SDK, if the
keywordparameter contains non-ASCII characters, you must URL-encode it with UTF-8 before sending the request.For example, the parameter before encoding:
URLEncoder.encode(keyword, "UTF-8")
After encoding with a function like
URLEncoder.encode(keyword, "UTF-8"), the value becomes:keyword = "%E6%B5%8B%E8%AF%95";Response parameters (When using an SDK, the call returns the
dataobject directly):Parameter
Type
Description
traceId
string
The request ID.
code
string
The error code. Valid values:
0: The call was successful.
An error code starting with AE or OE: The call failed.
message
string
The response message. Valid values:
success: The call was successful.
Other message: Details about a failed call.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request was successful.
false: The request failed.
totalNum
Integer
The total number of items.
totalPages
Integer
The total number of pages.
pageSize
Integer
The number of items per page.
pageNo
Integer
The current page number.
data
object
The response data.
list
list[]
An array of report objects.
embedTime
string
The time the report was embedded.
worksId
string
The ID of the report.
worksName
string
The name of the report.
worksType
string
The type of the report.
workspaceId
string
The ID of the workspace containing the report.
totalNum
int
This field is part of the
dataobject, not the individual report object.totalPages
int
This field is part of the
dataobject, not the individual report object.pageSize
int
This field is part of the
dataobject, not the individual report object.pageNo
int
This field is part of the
dataobject, not the individual report object.Response example
{ "traceId": "235c9fa8-d6f5-****-a6d4-38f07b2319ce", "code": "0", "message": "f441dad7-6878-****-9ad1-84ff92c7d971", "success": true, "data": { "data": [ { "embedTime": "2017-07-31 17:05:35", "worksId": "1f75f13b-b90b-****-bfbe-92fb079f84aa", "worksName": "admin_page_2", "worksType": "PAGE", "workspaceId": "6896ecc7-a62a-****-b40b-ff2d53c2218c" }, { "embedTime": "2017-07-31 17:04:53", "worksId": "046031ec-3bb7-****-810e-b6cb9933ffc8", "worksName": "develop_page_1_new", "worksType": "PAGE", "workspaceId": "6896ecc7-a62a-****-b40b-ff2d53c2218c" }, { "embedTime": "2017-07-31 17:03:50", "worksId": "b882d42d-ce04-****-b51b-13bbbf160365", "worksName": "analyse_page_1_new", "worksType": "PAGE", "workspaceId": "6896ecc7-a62a-****-b40b-ff2d53c2218c" } ], "totalNum": 3, "totalPages": 1, "pageSize": 10, "pageNo": 1 } }Java SDK example
/** * Retrieves a list of embedded reports. */ @Test public void getWorksEmbedList() throws SDKException { String url = "/openapi/v2/works/embed/getWorksEmbedList"; HttpRequest request = HttpRequest.build() .setUri(url) .setMethod(HttpMethod.POST).setHttpContentType(FormatType.FORM); request.addParameter("pageSize", "100"); request.addParameter("pageNo", "1"); // request.addParameter("worksType", "PAGE"); // request.addParameter("keyword", "page"); // request.addParameter("wsId", "6896ecc7-a62a-4e8a-b40b-ff2d53c2218c"); // request.addParameter("worksType", "PAGE"); String result = getOpenApiClient("daliy").syncExecute(request); System.out.println(result); }
Get user export records
API: /openapi/v2/works/exportRecords (GET)
Description: Retrieves user export records. This API returns a maximum of 10,000 records per call.
Available since: standalone deployment v5.4.1
Input parameters:
Parameter
Type
Description
Required
userId
string
The ID of the user. If omitted, the API returns records for the entire organization.
No
startTime
string
The start time for the query, in
YYYY-MM-DD HH:mm:ssformat. For example,2022-06-16 09:18:04.No
endTime
string
The end time for the query, in
YYYY-MM-DD HH:mm:ssformat. For example,2022-06-16 09:18:04.No
Response parameters (SDK calls return only the data array)
Parameter
Type
Description
traceId
string
The request ID.
code
string
The exception code. Valid values:
0: The call succeeded.An exception code starting with
AEorOE: The call failed.
message
string
The response message. Valid values:
success: The call succeeded.Other information: A message indicating that the call failed.
success
boolean
Indicates whether the request was successful. Valid values:
true: The request succeeded.false: The request failed.
data
object[]
A list of export record objects.
A maximum of 10,000 records can be returned per call.
downloadType
string
The download type. Valid values:
download: self-service data retrievalexport: export
workId
string
The work ID.
workName
string
The work name.
workType
string
The work type. Valid values:
PAGE: dashboarddashboardOfflineQuery: self-service data retrievalREPORT: spreadsheetQREPORT: Q ReportEXPLORATION: exploratory analysis
workspaceId
string
The workspace ID.
storePath
string
The full storage path of the file on the server. This parameter is empty if the "Reuse basic configuration" option is not selected in the export settings for a self-service data retrieval task.
The format for SFTP is
sftp://host:port/path.The format for OSS is
oss://bucket/xxxx.
createTime
string
The creation time, in
YYYY-MM-DD HH:mm:ssformat.Response example:
{ "traceId": "f09d9c36**********dd10a80602", "code": "0", "message": "success", "data": [ { "storePath": "oss://qui*****250310_1003_目标页面.pdf_4943d9db", "createTime": "2025-03-10 10:04:00", "workType": "PAGE", "downloadType": "export", "workName": "Target Page", "workId": "35cdaaa0-**********a49e4b65d2", "workspaceId": "3e60ee7f**************f6d25fcaa886" } ], "success": true }Java SDK example:
@Test public void queryUserExportRecords() throws SDKException { String url = "/openapi/v2/works/exportRecords"; HttpRequest request2 = HttpRequest.build() .setUri(url) .setMethod(HttpMethod.GET); request2.addParameter("userId", "fec0741443204104b1905061e6a951a2"); request2.addParameter("startTime", "2025-03-01 08:00:00"); request2.addParameter("endTime", "2025-03-10 08:00:00"); String result = getOpenApiClient("test").syncExecute(request2); System.out.println(result); }