See Stacksync in action with a solution architect. Book a demo ↗
Syncs

Syncs

Set delete protection of an app

POST
/v1/workspaces/{workspace_id}/bases/{base_id}/apps/{app_id}/delete-protection

Turn delete protection on or off for one app of the sync. With it on, a record deleted in the other app is kept in this app. Turning it off releases the deletes held back so far.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace the resources belong to

base_id*string

The sync (a sync is called a base in these paths)

Formatuuid
app_id*string

One of the two apps of the sync, by its app_id (read it from the sync)

Query Parameters

region*string

Data region of the sync

Value in"besg""usnv"

Request Body

The setting to apply

application/json
  1. body

Turn delete protection on or off for an app

action*string

ON keeps deletes from reaching the app, OFF lets them through again

Value in"ON""OFF"

Response Body

Delete protection set

application/json
  1. response

The app whose delete protection was set

msg*string

Successfully Toggled Delete Protection for app

app_id*string

The app

Set delete protection of an app
curl -X POST 'https://api.stacksync.com/v1/workspaces/0/bases/497f6eca-6276-4993-bfeb-53cbbbba6f08/apps/string/delete-protection?region=besg' \  -H 'Content-Type: application/json' \  -d '{  "action": "ON"}'
{  "msg": "Successfully Toggled Delete Protection for app",  "app_id": "b71d04e5"}