Getting started
The idea is to be able to quickly store and retrieve data with minimum fuss. With that goal in mind, the API was designed to be as frictionless as possible. Basically obtain an API key and use read and write endpoint with that key. No logins, no sign ups - just you and your data that will delete itself when you forget about it.
Step 1: Get Your API token.
Any read or write operation requires a valid API token (a.k.a. API Key). /getkey function takes two parameters:
- the key-id: a plain string identifying the API token, and
- a string array containing seed phrases.
A new API key will be generated if one does not exist.
See also: Generate API Key ahead of time
Step 2: API Endpoints
Use .read() and .write() methods to save and retrieve your data.
First, include prefs.us library in your project
To save data:
To read data:
Quick notes
-
Keep and use the same key for all subsequent queries to keep your items grouped together, whether saving or retrieving them.
-
Use grouping parameters such as 'project', 'domain', 'subdomain', or 'list' to help with organizing your data attached to your API key.
-
Create as many keys as you need but traffic may be a subject to rate limiting.
-
All timestamps are UTC