Read journal entries after an id
const url = 'https://work.optidata.cloud/api/drives/1/wal/since/950294?page=1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://work.optidata.cloud/api/drives/1/wal/since/950294?page=1' \ --header 'Authorization: Bearer <token>'Entries newer than {nodeWalEntryId}, oldest first — the call a sync
client repeats to stay current, passing the highest id it has processed.
By default a bare array is returned, capped at a server-side limit. Pass
paginated (or any page) to get a paginator envelope instead, which is
what you want when catching up after a long absence.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Numeric id of the drive. Read it from GET /drives/config.json.
Journal id to read from. Entries after this id are returned; pass the highest id you have already processed.
Query Parameters
Section titled “Query Parameters”Return a paginator envelope instead of a plain array.
1-based page number.
Number of items per page.
Responses
Section titled “ Responses ”Journal entries after the given id.
One entry of the write-ahead log. Every change to the drive appends an entry; clients replay the log from the last id they processed.
object
Session that produced the change. Pass it back as
optiwork_session_id to skip your own writes.
Fully qualified name of the domain event that produced the entry.
JSON-encoded payload of the event.
object
Absent on endpoints that use the simple paginator.
Navigation links of a paginated envelope.
object
Absent on endpoints that use the simple paginator.
One entry of the write-ahead log. Every change to the drive appends an entry; clients replay the log from the last id they processed.
object
Session that produced the change. Pass it back as
optiwork_session_id to skip your own writes.
Fully qualified name of the domain event that produced the entry.
JSON-encoded payload of the event.
Example
{ "current_page": 1, "per_page": 30, "data": [ { "id": 950294, "event_class": "App\\Events\\Drive\\Share\\SharePermissionCreated" } ]}Missing, malformed or expired authentication key.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The resource does not exist, or does not belong to the given drive.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "No query results for model [App\\Models\\Node] 99999999"}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}