Project management API
For how to call the API, see the calling method described in the Open API document.
We recommend that you first read the AE user guide to learn about the project management features: Project management
1. List user projects
Get the project list of a user by login name
Endpoint URL
/open/project-list?token=xxx&loginName=test007
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| loginName | test007 | String | Yes | Login name |
Success response example
{
"data": [
{
"companyId": 1,
"projectId": 2,
"projectName": "Internal beta project",
"projectType": 0,
"remark": "",
"roleName": "root"
},
{
"companyId": 1,
"projectId": 6,
"projectName": "thinkinggame official website (live)",
"projectType": 0,
"remark": "",
"roleName": "root"
}
],
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.companyId | 1 | Integer | Company ID |
| data.projectId | 2 | Integer | Project ID |
| data.projectName | Internal beta project | String | Project name |
| data.projectType | 0 | Integer | Project type
|
| data.remark | - | String | Project remarks |
| data.roleName | root | String | Role name |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1999,
"return_message": "Invalid user"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1999 | Integer | Return code |
| return_message | Invalid user | String | Return message |
2. Update project information
Update project information. Currently, only the project name can be updated
Endpoint URL
/open/project/update-project-info?token=xxx&projectId=2
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 2 | Integer | Yes | Project ID |
Request body parameters
{
"projectName": "New project name"
}
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| projectName | New project name | String | Yes | Project name |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1006,
"return_message": "You don't have permission for this operation. Check whether the token value is correct"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1006 | Integer | Return code |
| return_message | You don't have permission for this operation. Check whether the token value is correct | String | Return message |
3. Create a project and generate an appId
- Checks whether the project name already exists. If it does, creation fails and the result shown in the error response example is returned
Endpoint URL
/open/project/generate-project-app-id?token=xxx&projectName=test007&loadHistory=1
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectName | test007 | String | Yes | Project name |
| loadHistory | 1 | Integer | Yes | Whether to turn on historical data import mode
|
curl example
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' 'http://ta2:8992/open/project/generate-project-app-id?token=YOUR_TOKEN&projectName=test1222&loadHistory=1'
Success response example
{
"data": {
"appid": "2ec39af5e0db4be2a1371b44a7cbedc5",
"projectId": 2535
},
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.appid | 2ec39af5e0db4be2a1371b44a7cbedc5 | String | appid |
| data.projectId | 2535 | Integer | Project ID |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1015,
"return_message": "test007 already exists"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1015 | Integer | Return code |
| return_message | test007 already exists | String | Return message |

