v1

latestOpenAPI 3.0.32026-07-17485661.9 KB

Share a database

Creates a shareable snapshot of a database. Returns a share token that can be used to create a new database from the snapshot in another space.

post/spaces/{space_id}/databases/{database_ref}/share

Path parameters

space_idstring required

Ghost space ID.

database_refstring required

Database ID or name.

Request body

expires_atstring date-time

Time after which the share expires. If omitted, the share does not expire.

Response

Share created

share_tokenstring required

Token passed to createDatabase (via share_token) to create a new database from the shared snapshot in another space. Also used to revoke the share via revokeShare. Always begins with gs_.

database_idstring required

ID of the source database.

database_namestring required

Name of the source database.

created_atstring date-time required

Time the share was created.

expires_atstring date-time

Time the share expires. Absent if the share does not expire.

revoked_atstring date-time

Time the share was revoked. Absent if the share is still active.