const url = ' https://api.opdns.io/v1/auth/me/export ' ;
headers: {cookie: ' __Host-opdns_session=<__Host-opdns_session> ' }
const response = await fetch ( url , options );
const data = await response . json ();
--url https://api.opdns.io/v1/auth/me/export \
--cookie __Host-opdns_session=<__Host-opdns_session>
Needs a sign-in within the last five minutes. The API builds the archive in
the background. It is a zip with README.md,
manifest.json, account.json, sessions.json, tokens.json (metadata
only), audit_log.ndjson, and the CSV tables profiles.csv, rules.csv,
devices.csv and logs_summary.csv. For each profile, it also has
profiles/<id>/profile.json (the profile document that a standalone node
reads, and that opdns-node import-export installs), metadata.json,
rules.json, linked_ips.json, devices.json, nodes.json and logs.csv.
logs.csv holds the cloud query log within retention: a header row, then one
row per query. Format opdns-export/2. An email says when the archive is
ready. The API deletes it 24 hours later. Each account can have one export in
progress (export_in_progress) and one export per day (429 rate_limited).
Idempotency-Key
string
>= 1 characters <= 255 characters
Makes the POST safe to try again. A repeat with the same key and the same
request within 24 h returns the stored response (with Idempotent-Replayed: true)
and does not create the resource again. On an operation that needs a recent
sign-in, a repeat needs one too (reauth_required). 1 to 255 visible ASCII
characters (a UUID works).
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 the API deletes a ready archive (24 hours after it is ready).
string | null format: date-time
Set when status is ready. It is a presigned object-storage URL when the
server gives those out. Otherwise, it is 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 signup_closed invite_required waitlist_unavailable mail_unavailable invalid_token token_expired token_used email_unverified session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict managed_by_opwan no_opdns _account service_unavailable 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 mfa_required reauth_required account_pending_deletion deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists profile_not_empty no_adoption_pending invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports profile_suspended plan_limit owner_required billing_unavailable billing_provider_error subscription_exists no_billing_account block_page_ca_exists oidc_unavailable feedback_status_conflict reply_not_wanted reply_unavailable
retry_after
Seconds, the same value as the Retry-After header (rate limits, offline nodes).
integer
limit
The plan limit that a plan_limit problem reached.
object string
Allowed values: profiles linked_ips nodes queries_per_month log_retention_days api_tokens api_requests_per_minute
The value of the limit in the plan.
integer format: int64
string
Allowed values: free personal family business
Where to change to a larger plan.
string format: uri
required_scope
The scope that the API token did not have (insufficient_scope).
string
Allowed values: profiles:read profiles:write nodes:write account:read billing:read logs:read analytics:read
Example "type" : " https://opdns.io/problems/unauthenticated " ,
"code" : " unauthenticated " ,
"detail" : " You are not signed in, or your sign-in ended. Sign in again to continue. " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
Authenticated but not allowed: insufficient_scope, session_required, csrf_rejected, reauth_required (sign in again within five minutes), account_pending_deletion (the account is in its deletion cooling-off period), email_unverified (creating a profile before the email address is verified).
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated signup_closed invite_required waitlist_unavailable mail_unavailable invalid_token token_expired token_used email_unverified session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict managed_by_opwan no_opdns _account service_unavailable 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 mfa_required reauth_required account_pending_deletion deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists profile_not_empty no_adoption_pending invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports profile_suspended plan_limit owner_required billing_unavailable billing_provider_error subscription_exists no_billing_account block_page_ca_exists oidc_unavailable feedback_status_conflict reply_not_wanted reply_unavailable
retry_after
Seconds, the same value as the Retry-After header (rate limits, offline nodes).
integer
limit
The plan limit that a plan_limit problem reached.
object string
Allowed values: profiles linked_ips nodes queries_per_month log_retention_days api_tokens api_requests_per_minute
The value of the limit in the plan.
integer format: int64
string
Allowed values: free personal family business
Where to change to a larger plan.
string format: uri
required_scope
The scope that the API token did not have (insufficient_scope).
string
Allowed values: profiles:read profiles:write nodes:write account:read billing:read logs:read analytics:read
Example "type" : " https://opdns.io/problems/insufficient_scope " ,
"code" : " insufficient_scope " ,
"detail" : " This API token does not have the profiles:write scope that this request needs. Create a token with this scope, then try again. " ,
"required_scope" : " profiles:write " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated signup_closed invite_required waitlist_unavailable mail_unavailable invalid_token token_expired token_used email_unverified session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict managed_by_opwan no_opdns _account service_unavailable 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 mfa_required reauth_required account_pending_deletion deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists profile_not_empty no_adoption_pending invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports profile_suspended plan_limit owner_required billing_unavailable billing_provider_error subscription_exists no_billing_account block_page_ca_exists oidc_unavailable feedback_status_conflict reply_not_wanted reply_unavailable
retry_after
Seconds, the same value as the Retry-After header (rate limits, offline nodes).
integer
limit
The plan limit that a plan_limit problem reached.
object string
Allowed values: profiles linked_ips nodes queries_per_month log_retention_days api_tokens api_requests_per_minute
The value of the limit in the plan.
integer format: int64
string
Allowed values: free personal family business
Where to change to a larger plan.
string format: uri
required_scope
The scope that the API token did not have (insufficient_scope).
string
Allowed values: profiles:read profiles:write nodes:write account:read billing:read logs:read analytics:read
Example "type" : " https://opdns.io/problems/export_in_progress " ,
"code" : " export_in_progress " ,
"detail" : " We are already preparing your data export. We will email you when it is ready. " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
Rate limited (rate_limited). For an API token, the organization used all of the rate of its plan until RateLimit-Reset.
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated signup_closed invite_required waitlist_unavailable mail_unavailable invalid_token token_expired token_used email_unverified session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict managed_by_opwan no_opdns _account service_unavailable 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 mfa_required reauth_required account_pending_deletion deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists profile_not_empty no_adoption_pending invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports profile_suspended plan_limit owner_required billing_unavailable billing_provider_error subscription_exists no_billing_account block_page_ca_exists oidc_unavailable feedback_status_conflict reply_not_wanted reply_unavailable
retry_after
Seconds, the same value as the Retry-After header (rate limits, offline nodes).
integer
limit
The plan limit that a plan_limit problem reached.
object string
Allowed values: profiles linked_ips nodes queries_per_month log_retention_days api_tokens api_requests_per_minute
The value of the limit in the plan.
integer format: int64
string
Allowed values: free personal family business
Where to change to a larger plan.
string format: uri
required_scope
The scope that the API token did not have (insufficient_scope).
string
Allowed values: profiles:read profiles:write nodes:write account:read billing:read logs:read analytics:read
Example "type" : " https://opdns.io/problems/rate_limited " ,
"title" : " Too Many Requests " ,
"detail" : " You sent too many requests in a short time. Wait a moment, then try again. " ,
"request_id" : " 5f2c9a0e7b1d4c38 " ,
RateLimit-Limit
integer
>= 1
On every response to an API token: the rate of the plan of the organization, in requests per one-minute window (api_requests_per_minute).
RateLimit-Remaining
integer
On every response to an API token: the requests left to the organization in the current window.
RateLimit-Reset
integer
On every response to an API token: the seconds until the current window ends and the count resets.
RateLimit-Policy
string
On every response to an API token: the quota policy, <limit>;w=60.
not_implemented (cloud log queries are not configured on this server) or shape_unsupported (the node is too old).
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated signup_closed invite_required waitlist_unavailable mail_unavailable invalid_token token_expired token_used email_unverified session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict managed_by_opwan no_opdns _account service_unavailable 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 mfa_required reauth_required account_pending_deletion deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists profile_not_empty no_adoption_pending invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports profile_suspended plan_limit owner_required billing_unavailable billing_provider_error subscription_exists no_billing_account block_page_ca_exists oidc_unavailable feedback_status_conflict reply_not_wanted reply_unavailable
retry_after
Seconds, the same value as the Retry-After header (rate limits, offline nodes).
integer
limit
The plan limit that a plan_limit problem reached.
object string
Allowed values: profiles linked_ips nodes queries_per_month log_retention_days api_tokens api_requests_per_minute
The value of the limit in the plan.
integer format: int64
string
Allowed values: free personal family business
Where to change to a larger plan.
string format: uri
required_scope
The scope that the API token did not have (insufficient_scope).
string
Allowed values: profiles:read profiles:write nodes:write account:read billing:read logs:read analytics:read
Example "type" : " https://opdns.io/problems/not_implemented " ,
"title" : " Not Implemented " ,
"code" : " not_implemented " ,
"detail" : " The query log is not available on this server, so there is nothing to show here. " ,
"request_id" : " 5f2c9a0e7b1d4c38 "