API Documentation
1. Supported HTTP methods
Currently all API endpoints support only the HTTP GET method. Accepting HTTP POST is work in progress.
2. Generation options
Since currently only GET methods exist, all options should be set using query parameters. Every endpoint supports a resultsCount query parameter that controls how many items are returned at once.
Example: https://hipstapas.dev/api/?resultsCount=5 generates 5 phrases at once and returns a JSON array containing the newly generated strings.
For query parameters of type boolean that are not explicitly specified, true is always the default option.
3. Endpoints
3.1 Password - the default endpoint
GET /api/indexThe easiest way to generate a strong phrase is to call the base API address - call https://hipstapas.dev/api to generate a new password. That's it! You just created a password using the default options (alphabet consists of small, capital, numbers and special characters, min. length is 16 and max. length is 32 characters).
Options
| Parameter name | Type | Allowed values |
|---|---|---|
alphabetSmall | Boolean | true | false |
| If set to true the generation alphabet contains small characters: abcdefghijklmnopqrstuvwxyz | ||
alphabetCapital | Boolean | true | false |
| If set to true the generation alphabet contains capital characters: ABCDEFGHIJKLMNOPQRSTUVWXYZ | ||
alphabetNumber | Boolean | true | false |
| If set to true the generation alphabet contains numbers: 0123456789 | ||
alphabetSpecial | Boolean | true | false |
| If set to true the generation alphabet contains special characters: .,+-*/!?;:{}()[]%$&~#@| | ||
lengthMin | Number | 1..2048 |
| Defines the minimal length of the generated phrase | ||
lengthMax | Number | 1..2048 |
| Defines the maximal length of the generated phrase | ||
resultsCount | Number | 1..100 |
| Defines how many results should be generated at once | ||
Example call
- generate 5 phrases at once
- where each phrase is exactly 5 characters long
- excluding special and capital characters (in other words - using only small characters and numbers)
3.2 Generating UUID
GET /api/uuidCall https://hipstapas.dev/api/uuid to generate a new (version 4) UUID. That's it!
Options
| Parameter name | Type | Allowed values |
|---|---|---|
resultsCount | Number | 1..100 |
| Defines how many results should be generated at once | ||
3.3 EFF wordlist
GET /api/wordlist
Call https://hipstapas.dev/api/wordlist to create a passphrase from 6 words (as described and suggested by EFF https://www.eff.org/de/dice). This is the default option. The count of the words per passphrase can be set between 1 and 50 using the query parameter words, e.g. https://hipstapas.dev/api/wordlist/?words=3.
Options
| Parameter name | Type | Allowed values |
|---|---|---|
words | Number | 1..50 |
| Defines the count of the words per passphrase | ||
resultsCount | Number | 1..100 |
| Defines how many results should be generated at once | ||
3.4 Random number
GET /api/randomCall https://hipstapas.dev/api/random to create a random number between 1 and 1048576. The default values are:
min=1max=1sort=falsenoDuplicates=falseresultsCount=1
Options
| Parameter name | Type | Allowed values |
|---|---|---|
min | Number | 1..1048576 |
| Defines the lower bound of the number generator | ||
max | Number | 1..1048576 |
| Defines the upper bound of the number generator | ||
sort | Boolean | true | false |
| Sorts the generated number sequence | ||
noDuplicates | Boolean | true | false |
| The generated number sequence should contain only unique numbers | ||
resultsCount | Number | 1..100 |
| Defines how many results should be generated at once | ||
4. Custom policy
🚧 Work in Progress (WIP)5. API definition (OpenAPI / Swagger)
The hipstapas API specification files: