Skip to content

Rodaja/Maceta-REST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image

Maceta-REST

Table of contents

Description

All the information is given in JSON format and the server has to receive all the data in JSON fromat too.

Installation

Security

JSON Structure

Flowerpot structure with example:

User structure with example adding flowerpots to it:

User Routes

POST methods

Save a user in the database.
http://url/api/users
This method is used to register a new user in to the database, it has to receive a JSON with the following information:

It returns a JSON that has all the information provided.

GET methods

Get all the users saved in the database.
http://url/api/users
This method is used to get all the users of the database, it doesn´t have to receive anything from the body and it returns a list with all the users found.

Example

PUT methods

Modify a user by its ID.
http://url/api/users/id
This method is used to modify a user by its ID, it recives in the URL the user ID and if the ID exists it returns a JSON with the new user modified, if the ID doesn´t exist it doesn´t return anything only a BAD REQUEST. It needs a JSON with the new user in the body.

DELETE methods

Delete a user from the database by its ID.
http://url/api/users/id
This method is used to delete a user by its ID, it recives in the URL the user ID and returns a String saying "Deleted" if the user has been deleted or "NOT Deleted" in the opposite case.It doesn´t need any JSON in the body.

Flowerpot Routes

POST methods

http://url/api/flowerpots
This method creates a new flowerpot in the database, it needs to receive a JSON with the information of the flowerpot, it´s obligatory to send the MAC address in the JSON.

Example

GET methods

http://url/api/flowerpots
This methods retruns the a JSON with all the flowerpots saved in the database.

Example

PUT methods

http://url/api/flowerpots/macAddress
This method modifies the fields of a given flowerpot, it has to receive a JSON with de data.

Example

DELETE methods

http://url/api/flowerpots/macAddress
This method is used to delete a flowerpot by its MAC address.

Login Routes

GET methods

http://url/api/login
This method is used to login in the API, it needs a user and a password to get in.

Example

Reset Password Routes

GET methods

http://url/api/resetPassword

Example

License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages