目录
此内容是否有帮助?

# Project Management API

Call method See Call method description in Open API doc.

It is recommended to read the TA user manual first to understand the relevant functions of project management: project management

# List of user items

note

  • Get a list of items for this user based on the login name.

Interface URL

/open/project-list?token=xxx&loginName=test007

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
loginName
test007
String
Yes
Login name

Successful Response Example

{
    "data": [
        {
            "companyId": 1,
            "projectId": 2,
            "projectName": "Items for in-product testing",
            "projectType": 0,
            "remark": "",
            "roleName": "root"
        },
        {
            "companyId": 1,
            "projectId": 6,
            "projectName": "Thinkinggame Online",
            "projectType": 0,
            "remark": "",
            "roleName": "root"
        }
    ],
    "return_code": 0,
    "return_message": "success"
}
Parameter name
Sample value
Parameter type
Parameter description
data
-
Object
Return data
companyID 1
Integer
Company ID
projectId 2
Integer
Project ID
projectName Product internal test items
String
Project name
projectType 0
Integer
Project type
0: normal items
1: Chinese DEMO project
2: English DEMO project
remark -
String
Project Remarks
roleName root
String
Role name
return_code
0
Integer
Return code
return_message
success
String
Return information

Error Response Example

{
    "return_code": -1999,
    "return_message": "invalid item"
}
Parameter name
Sample value
Parameter type
Parameter description
return_code
-1999
Integer
Return code
return_message
Invalid user
String
Return information

# Update Project Information

note

Update project information, currently only support project name update.

Interface URL

/open/project/update-project-info?token=xxx&token=xxx&projectId=2

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
2
Integer
Yes
Project ID

Request Body Parameter

{
    "projectName": "new project name"
}
Parameter name
Sample value
Parameter type
Is required
Parameter description
projectName
New project name
String
Yes
Thunder general

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": -1006,
    "return_message": "You do not have permission to operate, please check that the token value is correct"
}
Parameter name
Sample value
Parameter type
Parameter description
return_code
-1006
Integer
Return code
return_message
You do not have permission to operate, please check whether the token value is correct
String
Return information

# Create a New Project and Generate appId

note

  • Will check whether the project name exists, if it exists, the creation fails, and return the result as an error response example.

Interface URL

/open/project/generate-project-app-id?token=xxx&projectName=test007&loadHistory=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
projectName
test007
String
Yes
Project name
loadHistory
1
Integer
Yes
Whether to turn on the import history mode
0: Close
1: Open

Curl Example

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' 'http://ta2:8992/open/project/generate-project-app-id?token=bTOzKiTIozG4e19FgXphcA8dDV3DIY8RwdHTO7aSnBsRqSNaIk19BnBMecJDWibD&projectName=test1222&loadHistory=111'

Successful Response Example

{
    "data": {
        "appid": "2ec39af5e0db4be2a1371b44a7cbedc5",
        "projectId": 2535
    },
    "return_code": 0,
    "return_message": "success"
}
Parameter name
Sample value
Parameter type
Parameter description
data
-
Object
Return data
appid 2ec39af5e0db4be2a1371b44a7cbedc5
String
appid
projectId 2535
Integer
Project ID
return_code
0
Integer
Return code
return_message
success
String
Return information

Error Response Example

{
    "return_code": -1015,
    "return_message": "test007 exists"
}
Parameter name
Sample value
Parameter type
Parameter description
return_code
-1015
Integer
Return code
return_message
Test007 already exists
String
Return information