Readonly
keysOptional
serverThe api's settings. Change these by using VantAPI.configure.
Configures the vant api. You can setup the default units, the used port and the logging behaviour.
Pass { useEnvironmentVariables: true }
to setup these settings using environment variables (e.g. stored in a .env
file).
Generates a new api key for your api with the passed role. Once the key has been stored in the
database the promise resolves and the uuidv4
key is returned as string.
Role explanations
"read"
: One can use read routes only (requesting any kind of weather data)"write"
: One can use write routes only (uploading new weather data using post requests)"readwrite"
: Once can use all write and read routes."admin"
: One can use all write / read routes and generate new api keys.your desired role
the uuidv4 api key as string
Generated using TypeDoc
Holds the four base api keys which are generated while configuring the vant api for the first time.