This is the API used by the Password Rules website (Link provided below). The url for the API is:
api.password-rules.myrandomcode.com/(route)
This is only the current implementation of the API. It is subject to change over time and more routes to be added. It is being worked on in parallel
to the website and the chrome extension. Links to the other two projects are provided below.
This API is built using:
Node.js
Express.js
MongoDB
Grabs all the site entries from the database.
siteName - The name of website which entry should be grabbed from the database.
Grabs the entry matching the site name provided. query - The search string to query the database with.
Returns all sites which site name contains the query string. For example, searching "game" will return the entry for gamefaqs.com or any other entry that might contain "game" in their site name.
siteName - The name of the site to check.
Pings the website provided to see if it is valid and alive. Returns an object with a key alive with a value of true or false, indicating if the website is alive or not.
Adds a new site entry to the database. This route expects a JSON object in the body of the request. The format of the JSON object should be as follows:
site - A string indicating the name of the web site.
rules - An array of rule objects.
Rule objects have the following format.
rule - The requirement for the rule. For example, "Minimum"/"Maximum"/"Range"/"No".
category - The category that the rule pertains to. For example, "Letters", "Numbers", "Characters" and more.
quantity - An array of size two that contains the minimum and/or maximum amounts for the rule. For example, a value of
[8, 30] - Range with a minimum of 8 and a maximum of 30.
[undefined, 16] - A maximum of 16.
[1, undefined] - A minimum of 1.
The "No" rule does not utilize the quantity array. So any values in the array will be ignored even if provided.
PUT and DELETE routes have not been implemented yet. They will be worked on in parallel with the website and the chrome extension.
When a feature is implemented in one of the parts, it will be implemented throughout the stack. If you want to learn more about the other parts
of the project, follow the links below.
Want to check out the web front end for Password Rules? Click here.
Interested in the chrome extension? Click here.