Built-in User model
The User model represents users of the application or API. You must create your own custom model (named something other than “User,” for example “Customer” or “Client”) that extends the built-in User model rather than use the built-in User model directly. The built-in User model provides a great deal of commonly-used functionality that you can use via your custom model.
Here is list of generated API endpoints for built-in user model as below:
Method
URL
Description
PATCH
/Users
Patch an existing model instance or insert a new one into the data source.
GET
/Users
Find all instances of the model matched by filter from the data source.
PUT
/Users
Replace an existing model instance or insert a new one into the data source.
POST
/Users
Create a new instance of the model and persist it into the data source
PATCH
/Users/{id}
Patch attributes for a model instance and persist it into the data source.
GET
/Users/{id}
Find a model instance by {{id}} from the data source.
HEAD
/Users/{id}
Check whether a model instance exists in the data source.
PUT
/Users/{id}
Replace attributes for a model instance and persist it into the data source.
DELETE
/Users/{id}
Delete a model instance by {{id}} from the data source.
GET
/Users/{id}/
accessTokens
Queries accessTokens of User.
POST
/Users/{id}/
accessTokens
Creates a new instance in accessTokens of this model.
DELETE
/Users/{id}/
accessTokens
Deletes all accessTokens of this model.
GET
/Users/{id}/
accessTokens/{fk}
Find a related item by id for accessTokens.
PUT
/Users/{id}/
accessTokens/{fk}
Update a related item by id for accessTokens.
DELETE
/Users/{id}/
accessTokens/{fk}
Delete a related item by id for accessTokens.
GET
/Users/{id}/
accessTokens/count
Counts accessTokens of User.
GET
/Users/{id}/exists
Check whether a model instance exists in the data source.
POST
/Users/{id}/replace
Replace attributes for a model instance and persist it into the data source.
POST
/Users/{id}/verify
Trigger user's identity verification with configured verifyOptions
POST
/Users/change-password
Change a user's password.
GET
/Users/change-stream
Create a change stream.
POST
/Users/change-stream
Create a change stream.
GET
/Users/confirm
Confirm a user registration with identity verification token.
GET
/Users/count
Count instances of the model matched by where from the data source.
GET
/Users/findOne
Find first instance of the model matched by filter from the data source.
POST
/Users/login
Login a user with username/email and password.
POST
/Users/logout
Logout a user with access token.
POST
/Users/replaceOrCreate
Replace an existing model instance or insert a new one into the data source.
POST
/Users/reset
Reset password for a user with email.
POST
/Users/reset-password
Reset user's password via a password-reset token.
POST
/Users/update
Update instances of the model matched by {{where}} from the data source.
POST
/Users/upsertWithWhere
Update an existing model instance or insert a new one into the data source based on the where criteria.
Hormo Studio does not support multiple models based on the User model in a single application. That is, you cannot have more than one model derived from the built-in User model in a single app.
Last updated