Demo Client

Test BitStore Reads And Writes

This demo now runs inside the main app layout, so it uses the same header/menu as the rest of BitStore.

Connection

Endpoint: -

1. Read Bucket (GET)

Fetches /api/buckets/{slug} and shows summary + latest value.

No data yet.

2. Add Value (POST)

Sends POST /api/buckets/{slug}/records with X-BitStore-Key.

Paste the raw key token (48 chars). If you paste X-BitStore-Key: ..., it will be cleaned automatically.

Value max length: 8 characters.

No write attempt yet.

3. Filter Records (GET)

Fetches /api/buckets/{slug}/records with optional paging, time, and value-prefix filters.

No filtered read yet.
Ready.

4. Minimal HTML Example

This will loop your array in bucket main. Change main to your slug, like yourslug.

<!doctype html>
<html lang="en">
  <body>
    <script>
      fetch("https://your-bitstore-host/api/buckets/main/records?take=50&valuePrefix=g4c:", {
        headers: {
          "X-BitStore-Key": "your key"
        }
      })
        .then((r) => r.json())
        .then((d) => {
          const values = Array.isArray(d.records) ? d.records.map((x) => x.value) : [];
          document.body.textContent = values.join("\n");
        });
    </script>
  </body>
</html>