docs: add query parameter to api user search

ref #7469
This commit is contained in:
Daniel Lee
2017-03-23 18:07:29 +01:00
parent 08984448d0
commit 44c9ba2edf

View File

@ -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**: