Playground API Logo
Playground API
v1.0
Sandbox Active
๐Ÿ“š Dev Portal ๐Ÿฅ Health

Session Resource Documentation

Session sandbox management endpoints for exporting state snapshots as downloadable JSON files, restoring/importing snapshot payloads, and purging overlay data.

GET /session/export

Request Parameters
Name Type Required Location Description
resource String (Query) Optional
curl -X
  GET 'http://playground-api-xi.vercel.app/session/export' \
 -H 'Content-Type: application/json' \
 -b "pg_identity=your_cookie_uuid" 

Response Schema Example

{
  "version": "1.0",
  "exportedAt": "2026-08-02T23:00:00.000Z",
  "identityId": "550e8400-e29b-41d4-a716-446655440000",
  "targetResource": "all",
  "stats": {
    "totalRecords": 2,
    "creates": 1,
    "updates": 1,
    "deletes": 0
  },
  "records": [
    {
      "resource": "users",
      "op": "create",
      "targetId": null,
      "data": {
        "name": "Custom User"
      },
      "createdAt": "2026-08-02T22:00:00.000Z"
    }
  ]
}
โšก Try it out โ€” Test endpoint live Test now
POST /session/import

Request Parameters
Name Type Required Location Description
strategy String (Query) Optional
resource String (Query) Optional
curl -X POST 'http://playground-api-xi.vercel.app/session/import' \
 -H 'Content-Type: application/json'
  \
 -b "pg_identity=your_cookie_uuid" \
 -d '{
  "version": "1.0",
  "records": [
    {
      "resource": "users",
      "op": "create",
      "data": {
        "name": "Restored User",
        "email": "restored@sandbox.dev"
      }
    }
  ]
}' 

Request Payload Example

{
  "version": "1.0",
  "records": [
    {
      "resource": "users",
      "op": "create",
      "data": {
        "name": "Restored User",
        "email": "restored@sandbox.dev"
      }
    }
  ]
}

Response Schema Example

{
  "message": "Session sandbox snapshot imported successfully.",
  "importedRecords": 1,
  "strategy": "replace",
  "affectedResources": [
    "users"
  ]
}
โšก Try it out โ€” Test endpoint live Test now
DELETE /session/reset

curl -X DELETE 'http://playground-api-xi.vercel.app/session/reset' \
 -H 'Content-Type: application/json' \

  -b "pg_identity=your_cookie_uuid" 

Response Schema Example

{
  "message": "Session sandbox overlay purged successfully.",
  "purgedRecords": 3
}
โšก Try it out โ€” Test endpoint live Test now