Databases

Run a statement (SQL, a MongoDB command document or Redis commands) or browse tables/rows; audited

post/databases/{databaseId}/console/{sessionId}/run

Request

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

Path parameters

databaseIdstring uuid required
sessionIdstring uuid required

Request body

OR
OR

Response

Result

sessionIdstring uuid required
kind'statement' | 'tables' | 'rows' required
mode'read' | 'write' required
okboolean required

false when a statement failed; the failing result set carries the error

durationMsinteger required
nextCursorstring nullable required

Redis key listings: pass as cursor for the next page

noticesstring[] required
transaction'idle' | 'open' | 'failed' | 'null' nullable required

write mode: a transaction is still open (COMMIT or ROLLBACK it)

Changes

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