Page tree
Skip to end of metadata
Go to start of metadata

Basics

The UserRegistry Service is reachable at: {YOUR_APP_URL}/$dwo3rd-userregistry-api/registration)


Actions

Selfregistration

Actionname:register
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/registration?action=register
Purpose:Selfregistration of a user
Method:POST
Parameter

{

firstname: "Hans",
lastname: "Muster",
email: "hans.muster@acme.com",
password: "supersecrete",

confiormation: "supersecrete"

}

Response

JSON Response with status or validation error

Mail is send to activate the user

Possible Errors

ErrorResponseType
Missing attributes:
  • firstname
  • lastname
  • email
  • password
  • conformation
JSON (validation error)
Password complexityJSON (validation error)

Invitation

Actionname:invite
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/registration?action=invite
Purpose:Invitation for a user
Method:POST
Parameter

{

firstname: "Hans",
lastname: "Muster",
email: "hans.muster@acme.com",
}

Response

JSON Response with status or validation error

Mail is send to accept the invitation

Possible Errors

ErrorResponseType
Missing attributes:
  • firstname
  • lastname
  • email
JSON (validation error)
E-Mail send errorJSON (validation error)

Activate my User

Actionname:activate
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/registration?action=activate&id={confirmationid}
Purpose:Activate a user after selfregistration
Method:GET
Parameterid={confirmationid} --> id of the confirmation mail
Response

JSON Response with status or validation error

Mail is send to accept the invitation

Possible Errors

ErrorResponseType
No User found for this confirmation idJSON (validation error)
User is already activeJSON (validation error)

Activate an invited user

Actionname:activateinviteduser
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/registration?action=activateinviteduser&id={confimationid}
Purpose:Finalize the registration of an invited user
Method:POST
Parameter

{

firstname: "Hans",
lastname: "Muster",
password: "supersecrete"
confirmation: "supersecrete"
}

Response

JSON Response with status or validation error

Mail is send to accept the invitation

Possible Errors

ErrorResponseType
Missing attributes:
  • firstname
  • lastname
  • password
  • confirmation
JSON (validation error)
Password complexityJSON (validation error)

Change Password

Actionname:changepassword
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/registration?action=changepassword
Purpose:Changes the password of the current user
Method:POST
Payload

{

oldpasswort: "suppipw",
passoword:"newsuppipw",
confirmation:"newsuppipw"

}

ResponseJSON Response with status or validation error

Possible Errors

ErrorResponseType

 Missing attributes:

  • oldpassword
  • password
  • confirmation
JSON (validation error)
Password complexityJSON (validation error)
  

Forgotten Password

Actionname:newpassword
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/registration?action=newpassword
Purpose:Asks for a new password
Method:POST
Payload

{
email:"hans.muster@acme.com"

}

ResponseJSON Response with status or validation error

Possible Errors

ErrorResponseType
No User found with current mailadressJSON (validation error)
  

Activate new password

Actionname:activatenewpassword
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/registration?action=newpassword?action=activatenewpassword&id={confirmationid}
Purpose:Resets the passwort to a new one
Method:POST
Parameter

{

password: 'newpw',
confirmation: 'newpw'

}

ResponseJSON Response with status or validation error

Possible Errors

ErrorResponseType
Password complexityExceptionResponse
No request with this id 

Response

Data

The Response can contain following fields, please refer to the Responsetable below for more information about the Response contents.

FieldnameTypeContentoptional
statusStringthe status of the requestno
errorStringThe Error clearnameyes
messagesArray of String

Messages related to this request

yes
traceStringThe Stacktrace of the error as a Stringyes
actionStringCurrent executed actionyes

 

Responsetypes Success

NameFieldsStatus
ProfileOkResponsestatus, profileok
EmptyOkResponsestatusok

ResponseTypes Error

NameFieldsStatus
ErrorResponsestatus, errorerror
ExceptionResponsestatus, error, trace, profileerror
ValidationFailedResponsestatus, error, messages, profilevalidationfailed

Guides

 

  • No labels