目录
此内容是否有帮助?

# Dashboard Report Management API

The use of call method please look over the call method description in Open API doc.

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
dashboards -
List
Dashboard
Information
dashbord_id 1440
Integer
Dashboard
ID
dashbord_name Conditional Universal Screening
Dashboard
String
Dashboard
name
reports -
List
Report Information
createType MANUAL_CREATE
String
Report creation method
Enum
:
MANUAL_CREATE: create manually
IMPORTED:
Dashboard
import
COPIED:
Dashboard
copy
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
)
reportDesc -
Object
Report Notes
reportId 4049
Integer
Report ID
reportModel 0
Integer
Analysis model
0:
Event analysis
1:
R
etention analysis
2: Funnel analysis
3:
User
analysis
4:
Flow
analysis
5: Distribution analysis
reportName Pointing
String
Report name
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
reportId 34214
Long
Report ID
reportName This is Report name
Integer
Report Name
reportDesc This is Report description
String
Report Description
projectId 0
Integer
Project ID
createType MANUAL_CREATE
String
Method of Report Creation
MANUAL_CREATE: Created manually
IMPORTED: Created by importing
COPIED: Created by copying
SCENE_CREATE: Created based on Templates
PACK_IMPORT: Created by project importing
reportModel EVENT
String
EVENT: Event Reports
RETENTION: Retention Reports
FUNNEL: Funnel Reports
PROP_ANALYSIS: Composition Reports
PATH_ANALYSIS: Flows Reports
SQL: SQL Reports
INTERVAL_ANALYSIS: Interval Reports
creator -
Object
Reports Creator
openId
UIODASBJ-Jiodas312
String
Open ID
loginName
user1
String
Login Account
userName
User1
String
Nickname
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,
RENAME_CREATE: automatic name change
SKIP: Skip
REPLACE: Replace
spaceDashboardPolicy
IN_EXISTED_SPACE_OR_CREATE_SPACE
String
Yes
Dashboard
placement strategy for shared space, default value IN_EXISTED_SPACE_OR_CREATE_SPACE
CREATE_SPACE:
put

d
ashboard
in the newly created space
IN_EXISTED_SPACE_OR_CREATE_SPACE:
put

Dashboard
in an existing space with the same name or in a newly created space
IN_PRIVATE: Put it under my
dash
board

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
boardCreateFailed 1
Integer
Number of
Dashboard
creation failures
boardCreated 1
Integer
Number of successful
Dashboard
creation
boardTotal 2
Integer
Total
Dashboard
folderCreated 1
Integer
Number of folders created
reportCreateFailed 1
Integer
Number of report creation failures
reportCreated 1
Integer
Number of reports created
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

::: tips

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
dashboards -
List
Dashboard
Information
dashbordId 3590
Integer
Dashboard
ID
dashbordName lzm
String
Dashboard
name
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
allAuthUserAuthority MEMBER
String
All staff permissions
authUserGroups -
List
Permission group list
authority ADMIN
String
Permissions
id 1301
Integer
User ID
name test1
String
User name
authUsers -
List
User list
authority ADMIN
String
Permissions
id 1149
Integer
User ID
name test2
String
User name
creator -
Object
Creator information
id 928
Integer
Creator user ID
name test3
String
Creator name
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
MEMBER: Ordinary member
ADMIN: Administrator
authUserGroups
-
List
No
Field display name
id 99
Integer
No
User group ID
name MEMBER
String
No
User group name
authority member99
String
No
User group permissions
MEMBER: Ordinary Member
ADMIN: Administrator
authUsers
-
List
No
Field description
id 88
Integer
No
User ID
name ADMIN
String
No
User name
authority admin88
String
No
User permissions
MEMBER: Ordinary member
ADMIN: Administrator
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

#

#

#

#

#

#

#

#

#