- 1. API
- 2 Configuration
- 3. Department
-
4. User
- 4.1 Get Parameters of Add User
- 4.2 Add User
- 4.3 Get User List
- 5. Product
- 6. Project
-
7. Task
- 7.1 Get Task List
- 7.2 Get Task Optional Information
- 7.3 Add Task
- 7.4 Finish Task Optional Information
- 7.5 Finish Task
- 8. Bug
Get Department List
- 2020-03-24 10:07:27
- John Ten
- 3320
- Last edited by Taotao on 2020-03-24 13:56:06
- Share links
Method Description |
By requesting this method, the department list data can be obtained. Based on the department list data, it can be used to add child departments. |
|||||||||
Example |
public function getDeptList() { include_once('../vendor/zentao/zentao.php'); $zentao = new \zentao(); $params = array('deptID' => 1); // parameters of the method $extraFields = array('title', 'deptID', 'parentDepts', 'sons', 'tree'); // customize fields returned $result = $zentao->getDeptList($params, $extraFields); return $result; } |
|||||||||
Request | GET | |||||||||
Method |
getDeptList |
|||||||||
Parameter |
|
|||||||||
Result |
success | error | ||||||||
{ "status": 1, "msg": "success", "result": { //the navbar of ZenTao "title": "Manage Department-ZenTao", //Department ID "deptID": "1", //Department information "parentDepts": [ { "id": "1", "name": "Manager", "parent": "0", "path": ",1,", "grade": "1", "order": "0", "position": "", "function": "", "manager": "" } ], //child department list of the current department "sons": [ { "id": "11", "name": "PO", "parent": "1", "path": ",1,11,", "grade": "2", "order": "10", "position": "", "function": "", "manager": "" }, { "id": "12", "name": "PM", "parent": "1", "path": ",1,12,", "grade": "2", "order": "20", "position": "", "function": "", "manager": "" } ], //department tree "tree": [ { "id": "1", "name": "Manager", "parent": "0", "path": ",1,", "grade": "1", "order": "0", "position": "", "function": "", "manager": "", "managerName": "", "children": [ { "id": "11", "name": "PO", "parent": "1", "path": ",1,11,", "grade": "2", "order": "10", "position": "", "function": "", "manager": "", "managerName": "" }, { "id": "12", "name": "PM", "parent": "1", "path": ",1,12,", "grade": "2", "order": "20", "position": "", "function": "", "manager": "", "managerName": "" } ], "actions": { "delete": false } }, { "id": "2", "name": "Dev", "parent": "0", "path": ",2,", "grade": "1", "order": "1", "position": "", "function": "", "manager": "", "managerName": "" }, { "id": "3", "name": "QA", "parent": "0", "path": ",3,", "grade": "1", "order": "2", "position": "", "function": "", "manager": "", "managerName": "" }, { "id": "4", "name": "Sales", "parent": "0", "path": ",4,", "grade": "1", "order": "3", "position": "", "function": "", "manager": "", "managerName": "" }, { "id": "8", "name": "Customer", "parent": "0", "path": ",8,", "grade": "1", "order": "13", "position": "", "function": "", "manager": "", "managerName": "" } ] } } |
{ "status": 0, "msg": "error", "result": [] } |
Write a Comment
Support
- Book a Demo
- Tech Forum
- GitHub
- SourceForge
About Us
- Company
- Privacy Policy
- Term of Use
- Blogs
- Partners
Contact Us
- Leave a Message
- Email Us: [email protected]