Skip to content

Read journal entries after an id

GET
/drives/{drive}/wal/since/{nodeWalEntryId}
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.

drive
required
integer format: int64

Numeric id of the drive. Read it from GET /drives/config.json.

nodeWalEntryId
required
integer format: int64

Journal id to read from. Entries after this id are returned; pass the highest id you have already processed.

paginated
boolean

Return a paginator envelope instead of a plain array.

page
integer
default: 1 >= 1

1-based page number.

pageSize
integer
>= 1

Number of items per page.

Journal entries after the given id.

Media typeapplication/json
One of:
Array<object>

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
id
integer format: int64
node_id
integer | null format: int64
drive_id
integer format: int64
guid
string format: uuid
optiwork_session_id

Session that produced the change. Pass it back as optiwork_session_id to skip your own writes.

string | null
event_class

Fully qualified name of the domain event that produced the entry.

string
event_json

JSON-encoded payload of the event.

string
created_at
string format: date-time
Example
{
"current_page": 1,
"per_page": 30,
"data": [
{
"id": 950294,
"event_class": "App\\Events\\Drive\\Share\\SharePermissionCreated"
}
]
}

Missing, malformed or expired authentication key.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

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.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplemissing
{
"message": "No query results for model [App\\Models\\Node] 99999999"
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}