starsz commented on pull request #949:
URL: https://github.com/apache/apisix-dashboard/pull/949#issuecomment-740584908


   ### Get server_info
   Method: Get
   URI: /apisix/server_info/{id}
   Response:
   ```
   {
       "code":0,
       "message":"",
       "data":{
           "id":1,
           "last_report_time":1607400888,
           "up_time":100,
           "boot_time":1607400745,
           "etcd_version":"3.5.0",
           "hostname":"gentoo",
           "version":"2.0"
       },
       "request_id":"afd668da-5245-40c4-a674-011014a22753"
   }
   ```
   
   ### list server_info
   Method: Get
   URI: 
/apisix/server_info?hostname={hostname}&page_size={page_size}&page={page}
   Response:
   ```
   {
       "code":0,
       "message":"",
       "data":{
           "rows":[
               {
                   "id":1,
                   "last_report_time":1607400888,
                   "up_time":100,
                   "boot_time":1607400745,
                   "etcd_version":"3.5.0",
                   "hostname":"gentoo",
                   "version":"2.0"
               }
           ],
           "total_size":2
       },
       "request_id":"66f1a516-3ed9-411a-a8dc-9d5cc130fedc"
   }
   ```
   
   |field|value|note|
   |---|---|---|
   |hostname|default ""|If the hostname is not "", the API only returns the 
server_info whose `hostname` field contains hostname.
   |page_size|default 0|If the `page_size` is larger than zero. The API only 
returns the `page_size` number value of data per request.
   |page|default 0|If the `page` is lager than zero.The api only returns the 
[(page-1)\*page_size, page\*page_size).Otherwise it will return whole 
server_infos.
   ----
   
   BTW, I add `hostname` for filter response if there are lots of apisix 
instances


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to