URL: v3/api/admin/team

Method: GET

Description : Gets existing team list

Parameters:

Parameter Type Optional/Required Description
search_query string Optional Team name, team_lead, status value
sort_field string Optional Sort_field could be name or status
sort_order string Optional Either ‘asc’ or ‘desc’
limit integer Optional No. of records in a page

Success Response :

{
 "success": true,
 "data": {
   "current_page": 1,
   "data": [
     {
       "id": 1,
       "name": "Level 1 Support",
       "status": {
         "id": 1,
         "name": "Active"
       },
       "team_lead": {
         "id": 3,
         "name": "Ashley Knite"
       },
       "created_at": "2017-03-29 10:53:25",
       "updated_at": "2018-12-04 09:27:40",
       "team_members": {
         "count": 5
       }
     },
     {
       "id": 2,
       "name": "Level 2 Support",
       "status": {
         "id": 1,
         "name": "Active"
       },
       "team_lead": {
         "id": 3,
         "name": "Ashley Knite"
       },
       "created_at": "2017-03-29 10:53:25",
       "updated_at": "2018-12-04 09:27:53",
       "team_members": {
         "count": 5
       }
     },
     {
       "id": 3,
       "name": "Developer",
       "status": {
         "id": 1,
         "name": "Active"
       },
       "team_lead": [],
       "created_at": "2017-03-29 10:53:25",
       "updated_at": "2017-03-29 11:11:47",
       "team_members": {
         "count": 6
       }
     },
     ],
   "first_page_url": "http://localhost/faveo-helpdesk-advance/public/api/admin/team?page=1",
   "from": 1,
   "last_page": 1,
   "last_page_url": "http://localhost/faveo-helpdesk-advance/public/api/admin/team?page=1",
   "next_page_url": null,
   "path": "http://localhost/faveo-helpdesk-advance/public/api/admin/team",
   "per_page": 10,
   "prev_page_url": null,
   "to": 3,
   "total": 3
 }
}

Error Response :

{

"success":false,

"Message":"No data available in table"

}

Or

{

"success":false,

"Message":"No matching records found"

}

 

Tagged:

Leave a Reply

Your email address will not be published. Required fields are marked *