Browse Source

docs: add query parameter to api user search

ref #7469
Daniel Lee 8 năm trước cách đây
mục cha
commit
44c9ba2edf
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      docs/sources/http_api/user.md

+ 3 - 3
docs/sources/http_api/user.md

@@ -48,16 +48,16 @@ Default value for the `perpage` parameter is `1000` and for the `page` parameter
 
 ## Search Users with Paging
 
-`GET /api/users/search?perpage=10&page=1`
+`GET /api/users/search?perpage=10&page=1&query=mygraf`
 
 **Example Request**:
 
-    GET /api/users/search?perpage=10&page=1 HTTP/1.1
+    GET /api/users/search?perpage=10&page=1&query=mygraf HTTP/1.1
     Accept: application/json
     Content-Type: application/json
     Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
 
-Default value for the `perpage` parameter is `1000` and for the `page` parameter is `1`. The `totalCount` field in the response can be used for pagination of the user list E.g. if `totalCount` is equal to 100 users and the `perpage` parameter is set to 10 then there are 10 pages of users.
+Default value for the `perpage` parameter is `1000` and for the `page` parameter is `1`. The `totalCount` field in the response can be used for pagination of the user list E.g. if `totalCount` is equal to 100 users and the `perpage` parameter is set to 10 then there are 10 pages of users. The `query` parameter is optional and it will return results where the query value is contained in one of the `name`, `login` or `email` fields. Query values with spaces need to be url encoded e.g. `query=Jane%20Doe`.
 
 **Example Response**: