Databases

Turn the REST API on (or change public access): apps using @vercel/kv, @upstash/redis or @upstash/ratelimit work unchanged. Returns a read-write and a read-only token, shown once; earlier tokens stop working.

post/databases/{databaseId}/rest

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/databases/{databaseId}/rest
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Path parameters

databaseIdstring uuid required

Request body

publicboolean

also answer on https://kv-<team>.<app domain> (default false: team network only)

Response

REST API with new tokens

databaseIdstring uuid required
supportedboolean required

the REST API exists for Redis databases only

enabledboolean required
publicboolean required

also answers on the public https address (for browsers and builds outside the team network)

status'disabled' | 'provisioning' | 'running' | 'error' required

the team's REST gateway: provisioning while it starts (about a minute the first time)

statusDetailstring nullable required
restUrlstring nullable required

KV_REST_API_URL / UPSTASH_REDIS_REST_URL for apps on the team network (http://kvrest-<id>:8079)

publicUrlstring nullable required

the public https address, when public is on

notesstring[] required
updatedAtstring nullable required

ISO-8601 timestamp

tokenstring nullable required

read-write token (KV_REST_API_TOKEN, UPSTASH_REDIS_REST_TOKEN); shown once; null when not replaced

readOnlyTokenstring nullable required

read-only token (KV_REST_API_READ_ONLY_TOKEN); shown once; null when not replaced

Changes

No recorded changes to this operation across all 1 revision of this API.