OData Batch Requests
BeginnerSend multiple OData requests in a single HTTP call using OData batch to improve performance and enable atomic operations.
What you'll learn
- The OData $batch endpoint and multipart request format
- Mixing reads and writes in a batch
- Atomic change sets for transactional operations
- FileMaker-specific constraints on batch requests
OData batch ($batch) lets you combine multiple requests -- reads, creates, updates, and deletes -- into a single HTTP call. This reduces round-trip latency for multi-operation workflows and allows atomic transaction semantics: either all operations in a change set succeed, or they all roll back. FileMaker OData 4.0 supports batch with some constraints.
1/4
1
The $batch endpoint
Batch requests go to the $batch endpoint with a multipart/mixed content type:
HTTP
POST /fmi/odata/v4/MyDatabase/$batch
Authorization: Basic {credentials}
Content-Type: multipart/mixed; boundary=batch_boundary
--batch_boundary
Content-Type: application/http
Content-Transfer-Encoding: binary
GET Contacts?$top=10 HTTP/1.1
--batch_boundary
Content-Type: application/http
Content-Transfer-Encoding: binary
GET Orders?$top=10 HTTP/1.1
--batch_boundary--Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo