Server API Contracts
Shiny.DataSync communicates with your server via standard HTTP + JSON. This page describes the expected request and response shapes for each endpoint type.
Endpoint Summary
Section titled “Endpoint Summary”| Endpoint | Method | Request Body | Response Body |
|---|---|---|---|
| Pull | GET | — | T[] (entity array) |
| Push | POST | T[] (entity array) | 2xx status |
| Delete | POST | T[] (entities to delete) | 2xx status |
| Tombstone | GET | — | string[] (deleted entity IDs) |
| Reconciliation | GET | — | string[] (all valid entity IDs) |
Returns an array of entities. Supports an optional ?since=<ISO8601> query parameter when PullDateVariable is configured.
GET /api/todos?since=2026-05-01T00:00:00Z
Response 200:[ { "id": "abc", "title": "Buy milk", "isComplete": false, "version": 3 }, { "id": "def", "title": "Walk dog", "isComplete": true, "version": 7 }]Receives an array of entities to create or update. The server should return any 2xx status code on success.
POST /api/todosContent-Type: application/json
[ { "id": "abc", "title": "Buy milk", "isComplete": true, "version": 3 }]
Response 200Delete
Section titled “Delete”If DeleteUri is configured separately from PushUri, delete operations are sent here. Receives the full entity objects, not just IDs.
POST /api/todos/deleteContent-Type: application/json
[ { "id": "abc", "title": "Buy milk", "isComplete": true, "version": 3 }]
Response 200Tombstone
Section titled “Tombstone”Returns an array of entity ID strings representing entities deleted on the server. Supports ?since=<ISO8601> when TombstoneDateVariable is configured.
GET /api/todos/tombstones?since=2026-05-01T00:00:00Z
Response 200:["abc", "def", "ghi"]Reconciliation
Section titled “Reconciliation”Returns an array of all valid entity ID strings. Any local entity whose ID is not in this set will be removed (except entities with pending local changes).
GET /api/todos/ids
Response 200:["abc", "def", "jkl", "mno"]