-
Notifications
You must be signed in to change notification settings - Fork 0
Users
Maya Saxena edited this page Mar 22, 2018
·
1 revision
Requirements:
-
userId
: id of new user, must be alphanumeric and unique -
combination
: combination of new user's lock, may only contain digits 1-6
Example request:
POST /users
Content-Type: application/json
{
"userId": "BenHanscom",
"combination": "[1,2,3,4]"
}
Example response (success):
{
"token": "e117c602-da71-11e6-ba3e-a66e6dc7839b"
}
Example response (error):
{
"error": "<ERROR TEXT>"
}
Example request:
GET /users
Content-Type: application/json
Example response (success):
{
"result": [
{
"userId": "JackBlack",
"combinationLength": 4
},
{
"userId": "Paul",
"combinationLength": 3
},
{
"userId": "JohnM",
"combinationLength": 4
},
{
"userId": "Jimmy",
"combinationLength": 4
}
]
}