Skip to content

Page through the whole sync journal

GET
/drives/{drive}/wal
curl --request GET \
--url 'https://work.optidata.cloud/api/drives/1/wal?page=1' \
--header 'Authorization: Bearer <token>'

Every entry of the drive’s write-ahead log, oldest first, a hundred at a time. Normal clients follow the log with GET /drives/{drive}/wal/since/{id} instead; this endpoint exists for a full replay.

drive
required
integer format: int64

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

page
integer
default: 1 >= 1

1-based page number.

A page of journal entries.

Media typeapplication/json
object
current_page
required
integer
data
required
Array
first_page_url
string | null format: uri
from
integer | null
last_page

Absent on endpoints that use the simple paginator.

integer
last_page_url
string | null format: uri
links
Array<object>

Navigation links of a paginated envelope.

object
url
string | null format: uri
label
string
page
integer | null
active
boolean
next_page_url
string | null format: uri
path
string format: uri
per_page
required
integer
prev_page_url
string | null format: uri
to
integer | null
total

Absent on endpoints that use the simple paginator.

integer
data
required
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."
}