{{define "title"}}{{.Store.Name}} · pocketkv{{end}} {{define "content"}}

Stores /

{{.Store.Name}}

{{if .Error}}

{{.Error}}

{{end}}

Values

New value
{{if .Values}} {{range .Values}} {{end}}
KeyValueSize
{{.Key}} {{.Preview}} {{.Size}} B
{{else}}

No values yet.

{{end}}

Read-only API keys

{{if .Store.APIKeys}} {{range .Store.APIKeys}} {{end}}
LabelKeyCreated
{{if .Label}}{{.Label}}{{else}}—{{end}} {{.Key}} {{.CreatedAt.Format "2006-01-02"}}
{{with index .Store.APIKeys 0}}

Usage

const headers = { Authorization: "Bearer {{.Key}}" };

// one value
const value = await fetch("{{$.BaseURL}}/api/v1/values/{{$.SampleKey}}", { headers }).then(r => r.json());

// every value in the store, as { key: value }
const all = await fetch("{{$.BaseURL}}/api/v1/values", { headers }).then(r => r.json());

Full reference: openapi.yaml

{{end}} {{else}}

No API keys yet. Create one to read this store from your sites.

{{end}}

Danger zone

{{end}}