Databases

Enable (CREATE EXTENSION … CASCADE) or disable (DROP EXTENSION, refused while used) an allow-listed extension

post/databases/{databaseId}/extensions

Request

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

Path parameters

databaseIdstring uuid required

Request body

namestring required

extension to enable or disable (see GET /databases/{id}/extensions)

enabledboolean required

true: CREATE EXTENSION IF NOT EXISTS (… CASCADE for dependencies); false: DROP EXTENSION (refused while objects use it)

Response

Extensions after the change

databaseIdstring uuid required
supportedboolean required

extensions exist for PostgreSQL only

imagestring nullable required

database image, e.g. pgvector/pgvector:pg17

pgvectorboolean required

the image ships pgvector (the "vector" extension)

checkedAtstring nullable required

when the list was last read from the database; null = never (the list shows the allow-list only)

notestring nullable required

e.g. how to switch an older database to the pgvector image

Changes

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