KVStore

FREE
By Carlo Alberto Degli Atti | Updated il y a 3 ans | Data
Popularity

9.4 / 10

Latency

408ms

Service Level

100%

Health Check

N/A

Followers: 204
Resources:
Product Website Terms of use
API Creator:
Rapid account: Carlo Alberto Degli Atti
Carlo Alberto Degli Atti
lordkada1
Log In to Rate API
Rating: 1 - Votes: 1

README

Very Important:

YOU MUST INVOKE THE KVSTORE USERS/SIGNUP ENDPOINT to complete the registration to KVStore.io (and in addition to your RapidAPI account)

KVStore.io is a simple Key/Value API based storage service.

Important information before using KVStore.io

  • In order to complete the registration to KVStore.io (and in addition to your Mashape account), YOU MUST INVOKE THE KVSTORE USERS/SIGNUP ENDPOINT. If you don’t complete this step, your API calls will fail returning a 401 HTTP code (Unauthorized)

  • Please, be careful and subscribe to KVStore.io using a different password than the one you’re using to access the Mashape marketplace
    If you need to store data, such as user forms, but you just have a static HTML website (such as GitHub pages), then this is what you need!

In order to use this feature, follow these simple steps:

  • go to the KVStore website
  • login using your credentials (the email & password you submitted by invoking the users/signup endpoint)
  • type the command js
  • copy and paste the HTML snippet to your target static page (it will inject the JS needed to save data to KVStore.io)
  • invoke the storage/update endpoint to set the regex used to verify your referer domain (for security reasons, the KVStore.io javascript code will be injected into pages that are served from domains matching this regex)
  • invoke the collections/update endpoint to set the ‘public_write’ flag to be true. This enables the client-side-only feature (if false any attempt to write data fails)
  • to store data, just invoke in your HTML page this javascript function: kvstoreio(collection, key, value, callback):
    • collection (string): the name of the collection on KVStore.io (it must exist)
    • key (string)
    • value (string)
    • callback (function, optional): async method invoked after the save has been completed
      Refer to the official KVStore.io API documentation on Mashape

Use-cases

KVStore.io (v0.2.x) supports two different uses:

  • RESTful API intended for server-to-server environments (e.g. to manage server configurations, to store dynamic data coming from user forms and so on…)
  • client-side-only applications (like static pages, e.g. gh-pages) for data provided by users, typically web forms

Please note: you can use KVStore.io in both ways at the same time. The client-side-only feature can be enabled by setting the public_write collection flag (see docs below)