Skip to main content

Data browser and query editor

The database dashboard exposes tables for PostgreSQL, collections for MongoDB and keys for Redis. The editor operates on real data; use a development database while learning.

Required workspace context​

Every table-list, table-data and query API request requires workspace_id in the query string, even though the database ID is already in the path. It must be the workspace that contains that database. Missing context returns 400 with workspace_id is required.

Example path pattern:

/e/v1/developer/databases/{database_id}/query/?workspace_id={workspace_id}

The list returns results and engine. Table-data requests accept integer limit (default 100) and offset (default 0); use small positive limits. URL-encode table/collection/key names. Do not assume the standard paginated-list envelope or its 100-row cap applies to editor data.

PostgreSQL​

Send SQL in a query string:

{"query":"SELECT 1 AS value"}

Members run queries in a read-only engine session; owners/admins can change data. Results include status, message and, for row-returning queries, columns and rows. A SQL failure can return HTTP 400 with status: "error".

Redis​

Owners/admins can run supported editor commands. The query field contains a JSON-encoded string, not a nested object:

{"query": "{\"operation\": \"get\", \"key\": \"example\"}"}

Supported operations are set, get, delete, lpush, rpush, hset, sadd, zadd and expire. The editor adds the database prefix; native drivers must add it themselves. Members can browse data but cannot execute this command API, including reads.

MongoDB​

Owners/admins use the same string encoding:

{"query": "{\"operation\": \"find\", \"collection\": \"example\", \"filter\": {}}"}

Supported operations include createCollection, dropCollection, insertOne, insertMany, find, updateOne, updateMany, deleteOne and deleteMany. This is a limited editor interface, not an arbitrary MongoDB command proxy. Use a native driver for application logic.

Editor API reference · Audit scope.

Command field reference​

Construct the command as an object in your application, JSON-encode it, then send that string as query. Every command requires operation. Types below describe the inner object, not the outer HTTP body.

Redis operationInner fields
setkey string required; value scalar defaults to empty string; no TTL option on this operation
get, deletekey string required
lpush, rpushkey string and nonempty values array required
hsetkey required; either nonempty mapping object, or field string and value scalar (default empty string)
saddkey and nonempty members array required
zaddkey and nonempty members array of objects with member string and numeric score
expirekey and nonzero seconds; use a positive integer for a future expiry

Redis get returns value (null when absent); mutations return a status/message. Engine type or ACL errors can still reject otherwise well-formed commands.

MongoDB operationInner fields
createCollectionname string required; optional options object
dropCollectionname string required
insertOnecollection string and document object required
insertManycollection string and nonempty documents array of objects required
findcollection required; filter object defaults to empty, limit integer defaults to 100
updateOne, updateManycollection required; supply a deliberate filter and valid update object such as $set
deleteOne, deleteManycollection required; supply a deliberate filter

Update/delete filters default to an empty object if omitted. An empty filter can select every document, especially with updateMany/deleteMany; it is not a safe default for a targeted edit. MongoDB driver validation applies to documents, options and updates.

MongoDB find returns rows/columns; inserts add inserted_id or inserted_ids; other mutations return messages. BSON values in rows can use Extended JSON representations. These editor commands do not provide a multi-operation transaction contract.