ouyangyewei opened a new issue #7049: URL: https://github.com/apache/dolphinscheduler/issues/7049
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Third-party integration scenarios often need to maintain the relationship between the product business and DolphinScheduler’s `AccessToken`, `User`, `Queue`, and `Project`. In the current `CreateXxx` API, only the status code is returned, even if the creation is successful, the entity object will not be returned. Therefore, if you need to obtain The created object information, such as ProjectCode and TenantId, it requires multiple API calls (first call the `CreateXxx` API first, then call the `QueryXxx`), and if the entity object can be returned in the `CreateXxx` API, the times of API calls can be reduced. ### Use case ### 1. Create AccessToken API: `org.apache.dolphinscheduler.api.controller.AccessTokenController#createToken` Response: ``` json { "code": 0, "msg": "success", "data": { "id": 3, "userId": 5, "token": "dba40cd3e522599b7b4de4eb928dc690", "expireTime": "9999-12-31T23:59:59.000+0800", "createTime": "2021-11-29T19:45:31.000+0800", "updateTime": "2021-11-29T19:45:31.000+0800", "userName": "u_23456" }, "success": true, "failed": false } ``` ### 2. Create Queue API: `org.apache.dolphinscheduler.api.controller.QueueController#createQueue` Response: ``` json { "code": 0, "msg": "success", "data": { "id": 1, "queueName": "default", "queue": "default", "createTime": null, "updateTime": null }, "success": true, "failed": false } ``` ### 3. Create Tenant API: `org.apache.dolphinscheduler.api.controller.TenantController#createTenant` Response: ``` json { "code": 0, "msg": "success", "data": { "id": 6, "tenantCode": "t_12345", "description": "", "queueId": 1, "queueName": "default", "queue": null, "createTime": "2021-11-29 19:42:24", "updateTime": "2021-11-29 19:42:24" }, "success": true, "failed": false } ``` ### 4. Create User API: `org.apache.dolphinscheduler.api.controller.UsersController#createUser` Response: ``` json { "code": 0, "msg": "success", "data": { "id": 5, "userName": "u_23456", "userPassword": "e9335e177b288c7af4af8f1225c3f333", "email": "[email protected]", "phone": null, "userType": "GENERAL_USER", "tenantId": 6, "state": 1, "tenantCode": "t_12345", "queueName": "default", "alertGroup": null, "queue": "default", "createTime": "2021-11-29 19:42:48", "updateTime": "2021-11-29 19:42:48" }, "success": true, "failed": false } ``` ### 5. Create Project API: `org.apache.dolphinscheduler.api.controller.ProjectController#createProject` Response: ``` json { "code": 0, "msg": "success", "data": { "id": 1, "userId": 1, "userName": "admin", "code": 3643998558592, "name": "test_user", "description": "", "createTime": "2021-11-26T11:58:59.000+0800", "updateTime": "2021-11-26T11:58:59.000+0800", "perm": 0, "defCount": 2, "instRunningCount": 0 }, "success": true, "failed": false } ``` ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
