const url = ' https://api.opdns.io/v1/auth/me/export ' ;
const options = {method: ' POST ' , headers: {cookie: ' opdns_session=<opdns_session> ' }} ;
const response = await fetch ( url , options );
const data = await response . json ();
--url https://api.opdns.io/v1/auth/me/export \
--cookie opdns_session=<opdns_session>
Needs a sign-in within the last five minutes. The archive is built in the
background: a zip with README.md, manifest.json,
account.json, sessions.json, tokens.json (metadata only),
audit_log.ndjson and, per profile, profiles/<id>/profile.json (the
profile document a standalone node reads), metadata.json, rules.json,
linked_ips.json, devices.json, nodes.json and logs.ndjson (cloud
query logs within retention, one JSON object per line). An email says when it
is ready; it is deleted 24 hours later. One export in flight
(export_in_progress) and one per day (429 rate_limited) per account.
Idempotency-Key
string
>= 1 characters <= 255 characters
Makes the POST safe to retry: a repeat with the same key and the same request
within 24 h returns the stored response (with Idempotent-Replayed: true)
without creating again. 1 to 255 visible ASCII characters (a UUID is fine).
Media type application/json
object object string
Allowed values: pending running ready failed expired
error
Why the last attempt failed.
string
string | null format: date-time
string | null format: date-time
When a ready archive is deleted (24 hours after it is ready).
string | null format: date-time
Set when status is ready: a presigned object-storage URL when the server
hands those out, otherwise the path of GET /v1/auth/me/export/{id}/download
on the API origin (send the session cookie).
string | null
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/unauthenticated " ,
"code" : " unauthenticated " ,
"detail" : " authentication required " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
Authenticated but not allowed: insufficient_scope, session_required, csrf_rejected, mfa_enrolment_required (restricted session), mfa_required (an operator action, or an admin-scoped token, from a session signed in with the password alone; not in dev), reauth_required (sign in again within five minutes), account_pending_deletion (the account is in its deletion cooling-off).
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/insufficient_scope " ,
"code" : " insufficient_scope " ,
"detail" : " the token lacks the profiles:write scope " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/export_in_progress " ,
"code" : " export_in_progress " ,
"detail" : " an export of this account is already being prepared " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
Rate limited (rate_limited).
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/rate_limited " ,
"title" : " Too Many Requests " ,
"detail" : " too many requests " ,
"request_id" : " 5f2c9a0e7b1d4c38 " ,
not_implemented (cloud log queries not configured on this server) or shape_unsupported (node too old).
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/not_implemented " ,
"title" : " Not Implemented " ,
"code" : " not_implemented " ,
"detail" : " cloud log queries are not configured on this server " ,
"request_id" : " 5f2c9a0e7b1d4c38 "