Create a new snapshot of a database
Changed onCaptures a snapshot of the database and returns a signed download URL valid for 1 hour (to a caller that can read snapshots: a key without snapshots:read gets an empty response).
The snapshot has a soft deadline: if it finishes within ~90s the response carries the signed URL. Otherwise the route answers 202 SNAPSHOT_PROCESSING while it keeps generating in the background — expected for large databases, not a failure. Poll the snapshot listing (GET /v2/databases/:databaseId/snapshots) ~2min later instead of re-posting.
Rate limits: 1 snapshot per 5s per user, 1 snapshot per 3min per database, and the plan's daily snapshot quota per user.
Request
- Base URLhttps://api.squarecloud.app
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Database identifier.
Response
Snapshot created. url is a signed download URL valid for 1 hour, returned only to a caller that can read snapshots (a session, or a key with snapshots:read): a key without it gets an empty response.
Changes
- warning
added the new
SNAPSHOTS_UNAVAILABLEenum value to the////response property for the response status - warning
added the new
SNAPSHOTS_UNAVAILABLEenum value to the////response property for the response status - warning
added the new
SNAPSHOTS_UNAVAILABLEenum value to the////response property for the response status - warning
added the new
SNAPSHOTS_UNAVAILABLEenum value to the////response property for the response status - warning
added the new
SNAPSHOTS_UNAVAILABLEenum value to the////response property for the response status - warning
added the new
SNAPSHOTS_UNAVAILABLEenum value to the////response property for the response status
- warning
- warning
added the new
WRITE_FAILEDenum value to the////response property for the response status - warning
added the new
WRITE_FAILEDenum value to the////response property for the response status - warning
added the new
WRITE_FAILEDenum value to the////response property for the response status - warning
added the new
WRITE_FAILEDenum value to the////response property for the response status - warning
added the new
WRITE_FAILEDenum value to the////response property for the response status - warning
added the new
WRITE_FAILEDenum value to the////response property for the response status - warning
added the new
WRONG_HOSTenum value to the////response property for the response status - warning
added the new
WRONG_HOSTenum value to the////response property for the response status - warning
added the new
WRONG_HOSTenum value to the////response property for the response status - warning
added the new
WRONG_HOSTenum value to the////response property for the response status - warning
added the new
WRONG_HOSTenum value to the////response property for the response status - warning
added the new
WRONG_HOSTenum value to the////response property for the response status
- warning