Manager / User

/manager/user/{user_id}

Returns a list of this managers users (GET)

Allows a manager to create users (POST)

Allows a manager to edit users profiles (PUT)

Allows a manager to disable users (DELETE)

Possible Methods

GET POST PUT DELETE

Arguments

user_id: (required for DELETE only)
user_id of the user you want to add/delete

JSON Object
for POST/PUT only, note: email is required for both (have to know what user to update)
{
  "user":{
    "firstname":"test1",
    "lastname":"burch",
    "phone":"5555555555",
    "email":["cburch@test1.com"]
  },
  "auth":{
    "username":"cburch@test1.com",
    "password":"8675309" 				//unhashed password
  }
}

 

Example
curl -b cookies.txt -X GET "http://localhost:8185/manager/user" > response.txt
curl -b cookies.txt -X POST -d '{  "user":{    "firstname":"test1",    "lastname":"burch",    "phone":"5555555555",    "email":["cburch@test1.com"]  },  "auth":{    "username":"cburch@test1.com",    "password":"8675309"  }}' "http://localhost:8185/manager/user" > response.txt
curl -b cookies.txt -X PUT -d '{  "user":{ "firstname":"test my new name", "email":["cburch@test1.com"] }, "auth":{ }}' "http://localhost:8185/manager/user" > response.txt
curl -b cookies.txt -X DELETE "http://localhost:8185/manager/user/5367a137e4b0f21816352e9e" > response.txt

 

Example Response
curl -b cookies.txt -X POST -d '{  "user":{    "firstname":"test1",    "lastname":"burch",    "phone":"5555555555",    "email":["cburch@test1.com"]  },  "auth":{    "username":"cburch@test1.com",    "password":"8675309"  }}' "http://localhost:8185/manager/user/5367a137e4b0f21816352e9e" > response.txt

 

 {"response":{"action":"Manager/User","success":true,"message":"Created user successfully","time":0}}