Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

/manager/user/{user_id}

Returns a list of this managers users (GET)

Allows a manager to create users (POST)

Allows a manager to add users (PUT)

Allows a manager to remove users (DELETE)

Possible Methods

GET POST PUT DELETE

Arguments

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

JSON Object
for POST only
{
  "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/5367a137e4b0f21816352e9e" > response.txt
curl -b cookies.txt -X PUT "http://localhost:8185/manager/user/5367a137e4b0f21816352e9e" > 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/5367a137e4b0f21816352e9e" > 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}}
  • No labels