目录
此内容是否有帮助?

# Dashboard Report Management API

Call method See 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: data dashboard

# I.Report Management

# Query Report List

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:
MANUAL_CREATE: create manually
IMPORTED:
Dashboard
import creation
COPIED:
Dashboard
copy creation
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
Event analysis
1: retention analysis
2: Funnel analysis
3: user feature analysis
4: Path 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

# 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: Place
Dashboard
in the newly created space
IN_EXISTED_SPACE_OR_CREATE_SPACE: Place
Dashboard
in an existing space with the same name or in a newly created space
IN_PRIVATE: Put it under my billboard

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

note

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 staff 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
Property type, event: event property, user: user feature

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": "ashboard 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

#

#

#

#

#

#

#

#

#