# Dashboard Report Management API
The use of call method please look over the call method description in Open APIdoc.
It is recommended to read the data dashboard section of the TA user manual to understand the relevant functions: dashboard
# I.Report Management
# Query Report List of Root admin
Interface URL
/open/manage-reports?token=xxx&projectId=0
Request method
GET
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
projectId | 0 | Integer | Yes | Project ID |
Successful Response Example
{
"data": {
"reports": [
{
"createType": "MANUAL_CREATE",
"dashboardIds": [],
"reportDesc": "",
"reportId": 34214,
"reportModel": 0,
"reportName": "event_3 total number(4)",
"updateTime": "2021-02-04 16:44:03"
},
{
"createType": "IMPORTED",
"dashboardIds": [
3015
],
"reportDesc": "",
"reportId": 25565,
"reportModel": 0,
"reportName": "Login times - last month(1)",
"updateTime": "2020-12-18 14:03:32"
}
],
"dashboards": [
{
"dashbord_id": 3015,
"dashbord_name": "performance test"
}
]
},
"return_code": 0,
"return_message": "success"
}
$$Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
data | - | Object | Return data |
data.dashboards | - | List | Dashboard Information |
data.dashboards.dashbord_id | 1440 | Integer | Dashboard ID |
data.dashboards.dashbord_name | Conditional Universal Screening Dashboard | String | Dashboard name |
data.reports | - | List | Report Information |
data.reports.createType | MANUAL_CREATE | String |
Report creation method Enum:
|
data.reports.dashboardIds | 2378 | Integer | Dashboard ID collection (the list of Dashboard IDs related to the report, Empty indicates that the report is not on any Dashboard) |
data.reports.reportDesc | - | Object | Report Notes |
data.reports.reportId | 4049 | Integer | Report ID |
data.reports.reportModel | 0 | Integer |
Analysis model
|
data.reports.reportName | Pointing | String | Report name |
data.reports.updateTime | 2019-12-20 15:59:44 | Date | Update time |
return_code | 0 | Integer | Return code |
return_message | success | String | Return information |
# Query Report list of a project
Interface URL
/open/list-project-reports?token=xxx&projectId=0
Request method
GET
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
projectId | 0 | Integer | Yes | Project ID |
Successful Response Example
{
"data": [
{
"reportId": 34214,
"createType": "MANUAL_CREATE",
"reportDesc": "This is Report description",
"projectId": 0,
"reportName": "This is Report name",
"reportModel": "EVENT",
"creator": {
"openId": "UIODASBJ-Jiodas312",
"loginName": "user1",
"userName": "User1"
},
"dashboardIds": [
109,
91
]
}
],
"return_code": 0,
"return_message": "success"
}
$$Parameter name | Sample value | Parameter type | Parameter Description | ||
---|---|---|---|---|---|
data | - | List | Returned data | ||
data.reportId | 34214 | Long | Report ID | ||
data.reportName | This is Report name | Integer | Report Name | ||
data.reportDesc | This is Report description | String | Report Description | ||
data.projectId | 0 | Integer | Project ID | ||
data.createType | MANUAL_CREATE | String |
Method of Report Creation
| ||
data.reportModel | EVENT | String |
| ||
data.creator | - | Object | Reports Creator | ||
openId | UIODASBJ-Jiodas312 | String | Open ID | ||
loginName | user1 | String | Login Account | ||
userName | User1 | String | Nickname | ||
data.dashboardIds | [109, 91] | List | Dashboard ID | ||
return_code | 0 | Integer | Return code | ||
return_message | success | String | Return information |
# Batch Delete Report
Interface URL
/open/report-batch-del?token=xxx&projectId=0
Request method
POST
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
projectId | 0 | String | Yes | Project ID |
Request Body Parameter
{
"reportIds": [
34214
]
}
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
Reports | [34214] | List | No | List of report IDs |
Successful Response Example
{
"return_code": 0,
"return_message": "success"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | 0 | String | Return code |
return_message | success | String | Return information |
# II. Dashboard Management
# Dashboard Report Management/Import Dashboard
Interface URL
/open/import-dashboards?token=xxx&projectId=0&dashboardNameConflictPolicy=RENAME_CREATE&spaceDashboardPolicy=IN_EXISTED_SPACE_OR_CREATE_SPACE
Request method
POST
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
projectId | 0 | Integer | Yes | Project ID |
dashboardNameConflictPolicy | RENAME_CREATE | String | Yes |
Dashboard name conflict policy, default value RENAME_CREATE,
|
spaceDashboardPolicy | IN_EXISTED_SPACE_OR_CREATE_SPACE | String | Yes |
Dashboard placement strategy for shared space, default value IN_EXISTED_SPACE_OR_CREATE_SPACE
|
Successful Response Example
{
"data": {
"boardCreateFailed": 1,
"boardCreated": 1,
"boardTotal": 2,
"folderCreated": 1,
"reportCreateFailed": 1,
"reportCreated": 1,
"reportTotal": 2
},
"return_code": 0,
"return_message": "success"
}
$$Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
data | - | Object | Return data |
data.boardCreateFailed | 1 | Integer | Number of Dashboard creation failures |
data.boardCreated | 1 | Integer | Number of successful Dashboard creation |
data.boardTotal | 2 | Integer | Total Dashboard |
data.folderCreated | 1 | Integer | Number of folders created |
data.reportCreateFailed | 1 | Integer | Number of report creation failures |
data.reportCreated | 1 | Integer | Number of reports created |
data.reportTotal | 2 | Integer | Total number of statements |
return_code | 0 | Integer | Return code |
return_message | success | String | Return information |
Error Response Example
{
"return_code": -3004,
"return_message": "invalid item"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | -3004 | String | Return code |
return_message | Invalid item | String | Return information |
# Delete Space Dashboard
TIP
Remove Dashboard if it was created by its API caller; otherwise move Dashboard from space to the creator's private directory.
Interface URL
/open/delete-dashboard-from-space?token=xxx&projectId=0&dashboardId=1&spaceId=1
Request method
POST
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
projectId | 0 | Integer | Yes | Project ID |
dashboardId | 1 | Integer | Yes | Dashboard ID |
spaceId | 1 | Integer | Yes | Space ID |
Successful Response Example
{
"return_code": 0,
"return_message": "success"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | 0 | Integer | Return code |
return_message | success | String | Return information |
Error Response Example
{
"return_code": -1008,
"return_message": "parameter error,dashboard not in space"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | -1008 | Integer | Return code |
return_message | Parameter error, dashboard not in space | String | Return information |
# III. Space management
# Query Space ID and Dashboard List
Interface URL
/open/get-space-dashboards-by-space-name?token=xxx&projectId=377&spaceName=b
Request method
GET
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
projectId | 377 | Integer | Yes | Project ID |
spaceName | b | String | Yes | Space name |
Successful Response Example
{
"data": {
"dashboards": [
{
"dashbordId": 3590,
"dashbordName": "lzm"
}
],
"spaceId": 31
},
"return_code": 0,
"return_message": "success"
}
$$Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
data | - | Object | Return data |
data.dashboards | - | List | Dashboard Information |
data.dashboards.dashbordId | 3590 | Integer | Dashboard ID |
data.dashboards.dashbordName | lzm | String | Dashboard name |
data.spaceId | 31 | Integer | Space ID |
return_code | 0 | Integer | Return code |
return_message | success | String | Return information |
Error Response Example
{
"return_code": -1006,
"return_message": "You do not have permission to operate(view space dashboards)"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | -1006 | Integer | Return code |
return_message | You do not have permission to operate (view space dashboards) | String | Return information |
# Query Space ID and Member Permission List
Interface URL
/open/get-space-members-by-space-name?token=xxx&projectId=377&spaceName=b
Request method
GET
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
projectId | 377 | Integer | Yes | Project ID |
spaceName | b | String | Yes | Space name |
Successful Response Example
{
"data": {
"allAuthUserAuthority": "MEMBER",
"authUserGroups": [
{
"authority": "ADMIN",
"id": 1301,
"name": "test1"
}
],
"authUsers": [
{
"authority": "ADMIN",
"id": 1149,
"name": "test2"
}
],
"creator": {
"id": 928,
"name": "test3"
},
"spaceId": 31
},
"return_code": 0,
"return_message": "success"
}
$$Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
data | - | Object | Return data |
data.allAuthUserAuthority | MEMBER | String | All staff permissions |
data.authUserGroups | - | List | Permission group list |
data.authUserGroups.authority | ADMIN | String | Permissions |
data.authUserGroups.id | 1301 | Integer | User ID |
data.authUserGroups.name | test1 | String | User name |
data.authUsers | - | List | User list |
data.authUsers.authority | ADMIN | String | Permissions |
data.authUsers.id | 1149 | Integer | User ID |
data.authUsers.name | test2 | String | User name |
data.creator | - | Object | Creator information |
data.creator.id | 928 | Integer | Creator user ID |
data.creator.name | test3 | String | Creator name |
data.spaceId | 31 | Integer | Space ID |
return_code | 0 | Integer | Return code |
return_message | success | String | Return information |
Error Response Example
{
"return_code": -1006,
"return_message": "You do not have permission to operate(view space members)"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | -1006 | Integer | Return code |
return_message | You do not have permission to operate (view space members) | String | Return information |
# Update Space Member Permissions list
Can be used to update space names, space default permissions, add or modify space member permissions, add or modify space member group permissions.
note
The submitted member permission list will replace the original member list as a whole.
Interface URL
/open/update-space?token=xxx&projectId=0&spaceId=0
Request method
POST
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
projectId | 0 | Integer | Yes | Project ID |
spaceId | 0 | Integer | Yes | Space ID |
Request Body Parameter
{
"allAuthUserAuthority": "MEMBER",
"authUserGroups": [
{
"id": 99,
"authority": "MEMBER",
"name": "member99"
}
],
"authUsers": [
{
"id": 88,
"authority": "ADMIN",
"name": "admin88"
}
],
"spaceName": "spaceTest"
}
$$Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
allAuthUserAuthority | string | String | No |
Full member permissions
|
authUserGroups | - | List | No | Field display name |
authUserGroups.id | 99 | Integer | No | User group ID |
authUserGroups.name | MEMBER | String | No | User group name |
authUserGroups.authority | member99 | String | No |
User group permissions
|
authUsers | - | List | No | Field description |
authUsers.id | 88 | Integer | No | User ID |
authUsers.name | ADMIN | String | No | User name |
authUsers.authority | admin88 | String | No |
User permissions
|
spaceName | spaceTest | String | No | Space name |
Successful Response Example
{
"return_code": 0,
"return_message": "success"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | 0 | Integer | Return code |
return_message | success | String | Return information |
Error Response Example
{
"return_code": -1023,
"return_message": "dashboard space does not exist"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | -1023 | Integer | Return code |
return_message | Dashboard space does not exist | String | Return information |
# Delete Space
Interface URL
/open/delete-space?token=xxx&projectId=0&spaceId=1
Request method
POST
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
projectId | 0 | Integer | Yes | Project ID |
spaceId | 1 | Integer | Yes | Space ID |
Successful Response Example
{
"return_code": 0,
"return_message": "success"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | 0 | Integer | Return code |
return_message | success | String | Return information |
Error response example
{
"return_code": -1023,
"return_message": "dashboard space does not exist"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | -1023 | Integer | Return code |
return_message | Dashboard space does not exist | String | Return information |