'.. http:get:: /api/1/users
Get a list of users, checking that the requester is an admin.
**Example Request**:
.. sourcecode:: http
GET /api/1/users HTTP/1.1
Host: example.com
Accept: application/json
**Example Response**:
.. sourcecode:: http
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
"auth": {
"authenticated": true,
"administrator": true,
"user": "user@example.com"
"users": [
"active": true,
"email": "john@example.com",
"id": "15",
"roles": [
1,
2,
3,
6,
17,
21,
22
:statuscode 200: no error
:statuscode 401: Authentication Error. Please ensure you have administrator rights.'

def get(self):

    self.reqparse.add_argument('count', type=int, default=30, location='args')
    self.reqparse.add_argument('page', type=int, default=1, location='args')
    self.reqparse.add_argument('order_by', type=str, default=None, location='args')
    self.reqparse.add_argument('order_dir', type=str, default='desc', location='args')
    args = self.reqparse.parse_args()
    page = args.pop('page', None)
    count = args.pop('count', None)
    order_by = args.pop('order_by', None)
    order_dir = args.pop('order_dir', None)
    SENSITIVE_FIELDS = ['password']
    query = User.query
    if (order_by and hasattr(User, order_by) and (order_by not in SENSITIVE_FIELDS)):
        if (order_dir.lower() == 'asc'):
            query = query.order_by(getattr(User, order_by).asc())
        else:
            query = query.order_by(getattr(User, order_by).desc())
    results = query.paginate(page, count)
    return_dict = {'page': results.page, 'total': results.total, 'count': len(results.items), 'users': [marshal(user.__dict__, USER_FIELDS) for user in results.items], 'auth': self.auth_dict}
    return (return_dict, 200)
