Oxelone Docs

Search docs and API

Find a guide, a section of one, or an API operation by its name.

Open console (opens in a new tab)

API reference Resources

Data encryption

Stored content only the workspace's own age key can open.

21 operations

Where this workspace stands with data encryption

GET/encryption

Response200

The state, any job, and the keys used before

batch_key_countintegerrequired
coverageEncryptionCoverage[]required
encryptedintegerrequired

Of stored, what is sealed today.

fieldsstring[]required
storedintegerrequired
tablestringrequired
earlier_keysEarlierKey[]required
batch_keysintegerrequired

Batch keys still locked to it: rows under them read as locked with an earlier key.

idstringrequired
public_keystringrequired
set_atstringrequired
deleted_by_retention_onstring · null

When interaction retention will have removed the last row under it. null when no batch key is locked to it.

in_use_untilstring · null

The same moment under the name a reader wants: when it stopped being used.

failed_countintegerrequired
pausedbooleanrequired
plan_includesbooleanrequired
statestringrequired

off, encrypting, on, rekeying or decrypting.

jobEncryptionJob · null

A running job.

countsobjectrequired

Progress, per kind of content.

doneintegerrequired
kindstringrequired

encrypt, decrypt, rekey_browser or rekey_server.

totalintegerrequired

Rows to walk. 0 until the sweep has counted.

eta_secondsinteger · null

null until there is a rate to go by.

heartbeat_atstring · null

Set only while a browser holds the lease on a change of key.

next_public_keystring · null
public_keystring · null
rekey_modestring · null

browser or server during a change of key.

set_atstring · null
set_bystring · null

The email of whoever set it.

Errors

401

No valid session

Fetch batch keys by id

GET/encryption/batch-keys

The batch keys these rows need. Whoever may read interaction content may fetch them: they open with nothing but the workspace's private key.

Query parameters

idsstringrequired

Comma-separated batch key ids, at most 500.

Response200

Those of them that exist

batchesBatchKey[]required
check_valuestringrequired

Base64 of HMAC-SHA256 under the batch key, over the text oxelone-batch-check-v1 and the id as 16 bytes.

has_copybooleanrequired

During a change of key: whether its copy for the new key is here.

idstringrequired
key_idstringrequired
public_keystringrequired

The key wrapped is locked to.

wrappedstringrequired

Base64 of a binary age file: <id> <base64 of the key>\n.

Errors

400

An id that is not one, or more than 500

403

Caller lacks interaction_content:read in this workspace

Download every batch key as a zip

GET/encryption/batch-keys.zip

Every batch key under the current key as a zip of <id>.age files, to open with age --decrypt on your own computer. Each file holds one line, so the output concatenates into a file this API can read.

Response200

One <id>.age per batch key

Errors

403

Caller lacks settings:manage in this workspace

Page through every batch key

GET/encryption/batch-keys/all

Page through the batch keys under the current key, for a change of key or for turning off in this browser.

Query parameters

afterstring

The last id of the page before.

limitinteger

At most 500, and 500 when absent.

Response200

One page, by id

batchesBatchKey[]required
check_valuestringrequired

Base64 of HMAC-SHA256 under the batch key, over the text oxelone-batch-check-v1 and the id as 16 bytes.

has_copybooleanrequired

During a change of key: whether its copy for the new key is here.

idstringrequired
key_idstringrequired
public_keystringrequired

The key wrapped is locked to.

wrappedstringrequired

Base64 of a binary age file: <id> <base64 of the key>\n.

next_afterstring · null

Pass as after; absent on the last page.

Errors

403

Caller lacks settings:manage in this workspace

Ask for a code that only the holder of this key can read

POST/encryption/challenge

Request bodyChallengeInput

public_keystringrequired

An age1… X25519 public key.

Response200

An age file holding the code

challengestringrequired

An armored age file. age --decrypt with the private key prints the code.

expires_atstringrequired
tries_leftintegerrequired

Errors

403

Caller lacks settings:manage in this workspace

409

plan_feature, or key_reused: this workspace has used that key, and the error says when it was last in use

422

not_a_public_key or private_key

503

This deployment has no key configured

Turn off encryption

POST/encryption/disable

Turn off. New data goes readable at once, and the stored rows are decrypted in the background with the opened keys already sent.

Response200

Turning off

batch_key_countintegerrequired
coverageEncryptionCoverage[]required
encryptedintegerrequired

Of stored, what is sealed today.

fieldsstring[]required
storedintegerrequired
tablestringrequired
earlier_keysEarlierKey[]required
batch_keysintegerrequired

Batch keys still locked to it: rows under them read as locked with an earlier key.

idstringrequired
public_keystringrequired
set_atstringrequired
deleted_by_retention_onstring · null

When interaction retention will have removed the last row under it. null when no batch key is locked to it.

in_use_untilstring · null

The same moment under the name a reader wants: when it stopped being used.

failed_countintegerrequired
pausedbooleanrequired
plan_includesbooleanrequired
statestringrequired

off, encrypting, on, rekeying or decrypting.

jobEncryptionJob · null

A running job.

countsobjectrequired

Progress, per kind of content.

doneintegerrequired
kindstringrequired

encrypt, decrypt, rekey_browser or rekey_server.

totalintegerrequired

Rows to walk. 0 until the sweep has counted.

eta_secondsinteger · null

null until there is a rate to go by.

heartbeat_atstring · null

Set only while a browser holds the lease on a change of key.

next_public_keystring · null
public_keystring · null
rekey_modestring · null

browser or server during a change of key.

set_atstring · null
set_bystring · null

The email of whoever set it.

Errors

403

Caller lacks settings:manage in this workspace

409

keys_missing or state_conflict

503

This deployment has no key configured

Cancel turning off

POST/encryption/disable/cancel

Cancel turning off. The opened keys are destroyed, and what was already opened is encrypted again.

Response200

Encrypting again

batch_key_countintegerrequired
coverageEncryptionCoverage[]required
encryptedintegerrequired

Of stored, what is sealed today.

fieldsstring[]required
storedintegerrequired
tablestringrequired
earlier_keysEarlierKey[]required
batch_keysintegerrequired

Batch keys still locked to it: rows under them read as locked with an earlier key.

idstringrequired
public_keystringrequired
set_atstringrequired
deleted_by_retention_onstring · null

When interaction retention will have removed the last row under it. null when no batch key is locked to it.

in_use_untilstring · null

The same moment under the name a reader wants: when it stopped being used.

failed_countintegerrequired
pausedbooleanrequired
plan_includesbooleanrequired
statestringrequired

off, encrypting, on, rekeying or decrypting.

jobEncryptionJob · null

A running job.

countsobjectrequired

Progress, per kind of content.

doneintegerrequired
kindstringrequired

encrypt, decrypt, rekey_browser or rekey_server.

totalintegerrequired

Rows to walk. 0 until the sweep has counted.

eta_secondsinteger · null

null until there is a rate to go by.

heartbeat_atstring · null

Set only while a browser holds the lease on a change of key.

next_public_keystring · null
public_keystring · null
rekey_modestring · null

browser or server during a change of key.

set_atstring · null
set_bystring · null

The email of whoever set it.

Errors

403

Caller lacks settings:manage in this workspace

409

state_conflict

Turn data encryption on with a verified key

POST/encryption/enable

Request bodyEnableInput

verified_key_idstringrequired

Response200

On, and encrypting what is stored

batch_key_countintegerrequired
coverageEncryptionCoverage[]required
encryptedintegerrequired

Of stored, what is sealed today.

fieldsstring[]required
storedintegerrequired
tablestringrequired
earlier_keysEarlierKey[]required
batch_keysintegerrequired

Batch keys still locked to it: rows under them read as locked with an earlier key.

idstringrequired
public_keystringrequired
set_atstringrequired
deleted_by_retention_onstring · null

When interaction retention will have removed the last row under it. null when no batch key is locked to it.

in_use_untilstring · null

The same moment under the name a reader wants: when it stopped being used.

failed_countintegerrequired
pausedbooleanrequired
plan_includesbooleanrequired
statestringrequired

off, encrypting, on, rekeying or decrypting.

jobEncryptionJob · null

A running job.

countsobjectrequired

Progress, per kind of content.

doneintegerrequired
kindstringrequired

encrypt, decrypt, rekey_browser or rekey_server.

totalintegerrequired

Rows to walk. 0 until the sweep has counted.

eta_secondsinteger · null

null until there is a rate to go by.

heartbeat_atstring · null

Set only while a browser holds the lease on a change of key.

next_public_keystring · null
public_keystring · null
rekey_modestring · null

browser or server during a change of key.

set_atstring · null
set_bystring · null

The email of whoever set it.

Errors

403

Caller lacks settings:manage in this workspace

409

plan_feature, key_reused or state_conflict

422

not_verified or challenge_expired

List rows that could not be converted

GET/encryption/failed

The rows the sweep could not convert. Each is retried hourly, and none stops the job.

Response200

Up to 200, oldest first

rowsFailedRow[]required
errorstringrequired

A code: the_blob_did_not_open, no_opened_key and the like.

first_atstringrequired
last_tried_atstringrequired
row_idstringrequired
tablestringrequired
triesintegerrequired
totalintegerrequired

Errors

403

Caller lacks settings:manage in this workspace

Send opened batch keys

PUT/encryption/opened

Send opened batch keys for a job on the server. Each is checked against its check value, kept for that job, and destroyed when it ends. The private key is never sent.

Request bodyOpenedInput

keysOpenedKeyInput[]required

Up to 500.

batch_idstringrequired
keystringrequired

Base64 of 32 bytes.

purposestringrequired

disable or rekey.

Response200

Stored; send the same chunk again safely

coveredintegerrequired

Batch keys under the current key with an opened copy here.

totalintegerrequired

Errors

400

An unknown purpose, or more than 500 keys

403

Caller lacks settings:manage in this workspace

409

state_conflict

422

wrong_key or unknown_batch, naming batch_id; nothing in the chunk is stored

503

This deployment has no key configured

Destroy unused opened batch keys

DELETE/encryption/opened

Destroy opened batch keys sent for a job that did not start. Keys a running job is using stay; ending that job destroys them.

Response204

Destroyed, or nothing to destroy

Errors

403

Caller lacks settings:manage in this workspace

Hold the running job. New data still follows the state

POST/encryption/pause

Response200

Held

batch_key_countintegerrequired
coverageEncryptionCoverage[]required
encryptedintegerrequired

Of stored, what is sealed today.

fieldsstring[]required
storedintegerrequired
tablestringrequired
earlier_keysEarlierKey[]required
batch_keysintegerrequired

Batch keys still locked to it: rows under them read as locked with an earlier key.

idstringrequired
public_keystringrequired
set_atstringrequired
deleted_by_retention_onstring · null

When interaction retention will have removed the last row under it. null when no batch key is locked to it.

in_use_untilstring · null

The same moment under the name a reader wants: when it stopped being used.

failed_countintegerrequired
pausedbooleanrequired
plan_includesbooleanrequired
statestringrequired

off, encrypting, on, rekeying or decrypting.

jobEncryptionJob · null

A running job.

countsobjectrequired

Progress, per kind of content.

doneintegerrequired
kindstringrequired

encrypt, decrypt, rekey_browser or rekey_server.

totalintegerrequired

Rows to walk. 0 until the sweep has counted.

eta_secondsinteger · null

null until there is a rate to go by.

heartbeat_atstring · null

Set only while a browser holds the lease on a change of key.

next_public_keystring · null
public_keystring · null
rekey_modestring · null

browser or server during a change of key.

set_atstring · null
set_bystring · null

The email of whoever set it.

Errors

403

Caller lacks settings:manage in this workspace

409

No job is running

Start changing key

POST/encryption/rekey

Start changing key. New batch keys are locked to both keys from here on.

Request bodyRekeyInput

key_idstringrequired

The verified_key_id of the new key.

modestringrequired

browser or server.

Response200

Changing key

batch_key_countintegerrequired
coverageEncryptionCoverage[]required
encryptedintegerrequired

Of stored, what is sealed today.

fieldsstring[]required
storedintegerrequired
tablestringrequired
earlier_keysEarlierKey[]required
batch_keysintegerrequired

Batch keys still locked to it: rows under them read as locked with an earlier key.

idstringrequired
public_keystringrequired
set_atstringrequired
deleted_by_retention_onstring · null

When interaction retention will have removed the last row under it. null when no batch key is locked to it.

in_use_untilstring · null

The same moment under the name a reader wants: when it stopped being used.

failed_countintegerrequired
pausedbooleanrequired
plan_includesbooleanrequired
statestringrequired

off, encrypting, on, rekeying or decrypting.

jobEncryptionJob · null

A running job.

countsobjectrequired

Progress, per kind of content.

doneintegerrequired
kindstringrequired

encrypt, decrypt, rekey_browser or rekey_server.

totalintegerrequired

Rows to walk. 0 until the sweep has counted.

eta_secondsinteger · null

null until there is a rate to go by.

heartbeat_atstring · null

Set only while a browser holds the lease on a change of key.

next_public_keystring · null
public_keystring · null
rekey_modestring · null

browser or server during a change of key.

set_atstring · null
set_bystring · null

The email of whoever set it.

Errors

400

An unknown mode

403

Caller lacks settings:manage in this workspace

409

key_reused, state_conflict, or in server mode keys_missing

422

not_verified or challenge_expired

Send re-locked batch keys

PUT/encryption/rekey/copies

Send batch keys re-locked to the new key. Idempotent, and safe to resume.

Request bodyCopiesInput

copiesCopyInput[]required

Up to 500.

batch_idstringrequired
wrappedstringrequired

Base64 of a binary age file locked to the new key.

Response200

Stored

doneintegerrequired
totalintegerrequired

Errors

400

Not base64, not an age file, or more than 500 copies

403

Caller lacks settings:manage in this workspace

409

state_conflict

422

unknown_batch

Discard a change of key

POST/encryption/rekey/discard

Discard a change of key. The new key stays in the history and cannot be used again.

Response200

Back on the current key

batch_key_countintegerrequired
coverageEncryptionCoverage[]required
encryptedintegerrequired

Of stored, what is sealed today.

fieldsstring[]required
storedintegerrequired
tablestringrequired
earlier_keysEarlierKey[]required
batch_keysintegerrequired

Batch keys still locked to it: rows under them read as locked with an earlier key.

idstringrequired
public_keystringrequired
set_atstringrequired
deleted_by_retention_onstring · null

When interaction retention will have removed the last row under it. null when no batch key is locked to it.

in_use_untilstring · null

The same moment under the name a reader wants: when it stopped being used.

failed_countintegerrequired
pausedbooleanrequired
plan_includesbooleanrequired
statestringrequired

off, encrypting, on, rekeying or decrypting.

jobEncryptionJob · null

A running job.

countsobjectrequired

Progress, per kind of content.

doneintegerrequired
kindstringrequired

encrypt, decrypt, rekey_browser or rekey_server.

totalintegerrequired

Rows to walk. 0 until the sweep has counted.

eta_secondsinteger · null

null until there is a rate to go by.

heartbeat_atstring · null

Set only while a browser holds the lease on a change of key.

next_public_keystring · null
public_keystring · null
rekey_modestring · null

browser or server during a change of key.

set_atstring · null
set_bystring · null

The email of whoever set it.

Errors

403

Caller lacks settings:manage in this workspace

409

state_conflict

Finish changing key

POST/encryption/rekey/finish

Finish changing key: the sample's answers against the stored check values, and if every one matches the new key takes over in one transaction.

Request bodyFinishInput

checksCheckInput[]required
batch_idstringrequired
checkstringrequired

Base64 of HMAC-SHA256 under the batch key, over the text oxelone-batch-check-v1 and the id as 16 bytes.

Response200

The new key is active

batch_key_countintegerrequired
coverageEncryptionCoverage[]required
encryptedintegerrequired

Of stored, what is sealed today.

fieldsstring[]required
storedintegerrequired
tablestringrequired
earlier_keysEarlierKey[]required
batch_keysintegerrequired

Batch keys still locked to it: rows under them read as locked with an earlier key.

idstringrequired
public_keystringrequired
set_atstringrequired
deleted_by_retention_onstring · null

When interaction retention will have removed the last row under it. null when no batch key is locked to it.

in_use_untilstring · null

The same moment under the name a reader wants: when it stopped being used.

failed_countintegerrequired
pausedbooleanrequired
plan_includesbooleanrequired
statestringrequired

off, encrypting, on, rekeying or decrypting.

jobEncryptionJob · null

A running job.

countsobjectrequired

Progress, per kind of content.

doneintegerrequired
kindstringrequired

encrypt, decrypt, rekey_browser or rekey_server.

totalintegerrequired

Rows to walk. 0 until the sweep has counted.

eta_secondsinteger · null

null until there is a rate to go by.

heartbeat_atstring · null

Set only while a browser holds the lease on a change of key.

next_public_keystring · null
public_keystring · null
rekey_modestring · null

browser or server during a change of key.

set_atstring · null
set_bystring · null

The email of whoever set it.

Errors

403

Caller lacks settings:manage in this workspace

409

copies_missing or state_conflict

422

wrong_check, unknown_batch or sample_incomplete; nothing is switched

Say the tab changing key is still open

POST/encryption/rekey/heartbeat

Say the tab changing key is still there. With none for 60 seconds, the change reads as paused.

Response204

Noted

Errors

403

Caller lacks settings:manage in this workspace

409

No change of key is running in a browser

Get the final check sample

POST/encryption/rekey/sample

Twenty random new copies to open with the new private key.

Response200

The copies the finish must prove

batchesBatchKey[]required
check_valuestringrequired

Base64 of HMAC-SHA256 under the batch key, over the text oxelone-batch-check-v1 and the id as 16 bytes.

has_copybooleanrequired

During a change of key: whether its copy for the new key is here.

idstringrequired
key_idstringrequired
public_keystringrequired

The key wrapped is locked to.

wrappedstringrequired

Base64 of a binary age file: <id> <base64 of the key>\n.

Errors

403

Caller lacks settings:manage in this workspace

409

copies_missing or state_conflict

Let a held job go on

POST/encryption/resume

Response200

Running

batch_key_countintegerrequired
coverageEncryptionCoverage[]required
encryptedintegerrequired

Of stored, what is sealed today.

fieldsstring[]required
storedintegerrequired
tablestringrequired
earlier_keysEarlierKey[]required
batch_keysintegerrequired

Batch keys still locked to it: rows under them read as locked with an earlier key.

idstringrequired
public_keystringrequired
set_atstringrequired
deleted_by_retention_onstring · null

When interaction retention will have removed the last row under it. null when no batch key is locked to it.

in_use_untilstring · null

The same moment under the name a reader wants: when it stopped being used.

failed_countintegerrequired
pausedbooleanrequired
plan_includesbooleanrequired
statestringrequired

off, encrypting, on, rekeying or decrypting.

jobEncryptionJob · null

A running job.

countsobjectrequired

Progress, per kind of content.

doneintegerrequired
kindstringrequired

encrypt, decrypt, rekey_browser or rekey_server.

totalintegerrequired

Rows to walk. 0 until the sweep has counted.

eta_secondsinteger · null

null until there is a rate to go by.

heartbeat_atstring · null

Set only while a browser holds the lease on a change of key.

next_public_keystring · null
public_keystring · null
rekey_modestring · null

browser or server during a change of key.

set_atstring · null
set_bystring · null

The email of whoever set it.

Errors

403

Caller lacks settings:manage in this workspace

409

No job is running

Start over with a new key

POST/encryption/start-over

Use a new key from now on, when the old one is lost. Rows under the old key stay under it until retention removes them.

Request bodyStartOverInput

verified_key_idstringrequired
workspace_namestringrequired

The workspace's name, typed.

Response200

New data uses the new key

batch_key_countintegerrequired
coverageEncryptionCoverage[]required
encryptedintegerrequired

Of stored, what is sealed today.

fieldsstring[]required
storedintegerrequired
tablestringrequired
earlier_keysEarlierKey[]required
batch_keysintegerrequired

Batch keys still locked to it: rows under them read as locked with an earlier key.

idstringrequired
public_keystringrequired
set_atstringrequired
deleted_by_retention_onstring · null

When interaction retention will have removed the last row under it. null when no batch key is locked to it.

in_use_untilstring · null

The same moment under the name a reader wants: when it stopped being used.

failed_countintegerrequired
pausedbooleanrequired
plan_includesbooleanrequired
statestringrequired

off, encrypting, on, rekeying or decrypting.

jobEncryptionJob · null

A running job.

countsobjectrequired

Progress, per kind of content.

doneintegerrequired
kindstringrequired

encrypt, decrypt, rekey_browser or rekey_server.

totalintegerrequired

Rows to walk. 0 until the sweep has counted.

eta_secondsinteger · null

null until there is a rate to go by.

heartbeat_atstring · null

Set only while a browser holds the lease on a change of key.

next_public_keystring · null
public_keystring · null
rekey_modestring · null

browser or server during a change of key.

set_atstring · null
set_bystring · null

The email of whoever set it.

Errors

400

The workspace name does not match

403

Caller lacks settings:manage in this workspace

409

key_reused or state_conflict

422

not_verified or challenge_expired

Prove the key with its code

POST/encryption/verify

Request bodyVerifyInput

codestringrequired
public_keystringrequired

The key the code was asked for. The newest code for it is the one tried.

Response200

The key is proved

verified_key_idstringrequired

What turning on, changing key and starting over each require.

Errors

403

Caller lacks settings:manage in this workspace

409

plan_feature

422

wrong_code, challenge_expired, challenge_exhausted or not_verified; a wrong code also says how many tries are left

503

This deployment has no key configured