Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: pin and tagId separation

...

Code Block
languagejs
titleResult
collapsetrue
{
"validateAccountFact": {
"statusFact": {
"success": true
}
,"accountFact": {
"pin": null
,"token": "6d033802-9e9d-4fc6-a8fd-2a0c677a43a6"
,"role": null
,"userId": null
,"activeDevices": []
}
}
}

...

  • A Facility with 'facility' id must exist
  • A Role with 'role' id must exist
  • A UserStatus with 'status' value must exist
  • 'password' must be longer than 5 characters and shorter than 20
  • If 'tagId' is not null, it must be unique among existing users
  • If 'tagId' is not null, it must be longer than 5 characters and shorter than 20
  • If 'pin' is not null, it must be unique among existing users
  • If 'pin' is not null, it must be longer than 5 characters and shorter than 20
  • 'email' must be a well formed email
  • 'email' must be unique among existing users
  • 'username' must be unique among existing users

...

NameTypeMandatoryDescription
tokenStringYesSecurity Token obtained before.
temporalSessionBooleanNoDEFAULT: 'false'.
Indicates whether the provided token is temporal or not. 
firstNameStringYesThe name for the new user.
lastNameStringYesThe last name for the new user.
usernameStringYesThe username for the new user. The username must be unique among all the users in the system.
emailStringYesThe email address for the new user. The email must be unique among all the users in the system.
passwordStringYesThe password for the new user.
At the moment, this is plain text. 
organizationStringYesThe id of the organization for the new user.
facilityStringYesThe id of the facility for the new user.
roleStringYesThe id of the role for the new user.
pinStringNoThe security pin of this user. (This pin is not still being used by the application)
tagIdStringNoThe NFC tag id for the new user.

...

Code Block
languagejs
titleResult
collapsetrue
{ "data" : [ { "email" : "e@e.com",
"facilityId" : "UNC",
"facilityName" : "UNC",
"firstName" : "e",
"id" : "354a7aae-ac06-4892-ac61-ce302351eb35",
"lastName" : "e",
"organizationId" : "UNC",
"organizationName" : "UNC",
"pinroleId" : "esteban",
"roleId" : 2,
"roleName" : "pod",
"status" : "ACTIVE",
"username" : "username-e",
"updateDate" : "2014-01-06 19:07:40.0"
},
{ "facilityId" : "UNC",
"facilityName" : "UNC",
"id" : "chargenurse",
"organizationId" : "UNC",
"organizationName" : "UNC",
"pin" : "charge",
"roleId" : 1,
"roleName" : "admin",
"status" : "ACTIVE",
"username" : "username-charge",
"updateDate" : "2013-03-08 01:20:37.0"
},
...
],
"statusFact" : { "success" : true }
}

...

Code Block
languagejs
titleResult
collapsetrue
{
data: {
id: "354a7aae-ac06-4892-ac61-ce302351eb35",
lastName: "e",
facilityName: "UNC",
organizationName: "UNC",
status: "ACTIVE",
pin: "esteban",
username: "eaa",
email: "e@e.com",
roleName: "pod",
organizationId: "UNC",
firstName: "e",
facilityId: "UNC",
updateDate: "2014-01-06 19:07:40.0",
roleId: 2
},
statusFact: {
success: true
}
}

...

  • A Facility with 'facility' id must exist
  • A Role with 'role' id must exist
  • A UserStatus with 'status' value must exist
  • 'password' must be longer than 5 characters and shorter than 20
  • If 'pin' is not null, it must unique among existing users.
  • If 'pin' is not null, it must be longer than 5 characters and shorter than 20
  • If 'tagId' is not null, it must unique among existing users.
  • If 'tagId' is not null, it must be longer than 5 characters and shorter than 20
  • If 'emai' is not null, 'email' must be a well formed email
  • If 'emai' is not null, 'email' must be unique among existing users.

...

Important notice: If a user is trying to modify his/her email, password, pin and/or tagId, the argument 'passwordValidation' of this operation is mandatory and it must be the original (old) password of the current user.  

...

NameTypeMandatoryDescription
{requestedUserId}StringYesThe id of the requested user.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
firstNameStringYesThe new name for the user.
lastNameStringYesThe new last name for the user.
emailStringNoThe new email address for the user. If this parameter is not provided, the email of the user will not be modified.
passwordStringNo

The new password for the user.
At the moment, this is plain text. If this value is not provided, the original password of the user will not be modified.

organizationStringYesThe new id of the organization for the user.
facilityStringYesThe new id of the facility for the user.
roleStringYesThe new id of the role for the user.
pinStringNoThe security pin of this user. (This pin is not still being used by the application)
tagIdStringNoThe new NFC tag id for the new user. If this value is not provided, the original tagId of the user will not be modified.
passwordValidationStringIf a user is trying to modify his/her email, password and/or tagId, the argument 'passwordValidation' -> YesThe original (old) password of the user. This argument is used for when a user tries to modify his/her OWN email, password and/or tag id.

...

Code Block
languagejs
titleResult
collapsetrue
{ "data" : { "email" : "e@e.com",
"facilityId" : "UNC",
"facilityName" : "UNC",
"firstName" : "e",
"id" : "354a7aae-ac06-4892-ac61-ce302351eb35",
"username" : "e",
"lastName" : "e",
"organizationId" : "UNC",
"organizationName" : "UNC",
"roleId" : 2,
"roleName" : "pod",
"status" : "SUSPENDED",
"updateDate" : "Wed May 14 13:24:38 CEST 2014"
},
"statusFact" : { "success" : true }
}

...