Get the newest journal entry
const url = 'https://work.optidata.cloud/api/drives/1/wal/latest';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/latest \ --header 'Authorization: Bearer <token>'The most recent entry of the log. A client that is starting fresh records
this id and follows the log from there, rather than replaying history.
Answers null when the log is empty.
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.
Responses
Section titled “ Responses ”The newest entry, or null.
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.
Examples
{ "id": 950294, "node_id": 301320, "drive_id": 1, "guid": "a28a3269-6668-4b06-a429-e6cf4f962bfa", "optiwork_session_id": "a28a2b33-acec-47dc-875d-a49c24c0415d", "event_class": "App\\Events\\Drive\\Share\\SharePermissionCreated", "created_at": "2026-08-19T12:41:02.000000Z"}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."}