dry_run_storage_policy_migration
const url = 'https://example.com/api/v1/admin/storage-migrations/dry-run';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"mode":"normal","recovery_plan_hash":"example","source_policy_id":1,"target_policy_id":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://example.com/api/v1/admin/storage-migrations/dry-run";
let payload = json!({ "mode": "normal", "recovery_plan_hash": "example", "source_policy_id": 1, "target_policy_id": 1 });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.post(url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request POST \ --url https://example.com/api/v1/admin/storage-migrations/dry-run \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "mode": "normal", "recovery_plan_hash": "example", "source_policy_id": 1, "target_policy_id": 1 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Check a storage policy migration plan without creating a task.
object
Selects routine migration or recoverable-data preflight.
Optional recovery evidence to revalidate during dry-run.
Responses
Section titled “Responses”Storage policy migration preflight
统一 API 响应格式
成功: { "code": "success", "msg": "", "data": {...} }
失败: { "code": "auth.credentials_failed", "msg": "Invalid Credentials" }
object
object
object
Read-only source evidence used by recover-available mode.
object
Whether the current evidence permits a recovery migration to start.
Digest binding task creation to the policy revision, counts, and sample evidence.
Source policy selected by the administrator.
Source policy revision that must still match when a recovery task is created.
Deterministic sample results, bounded by the service sample limit.
Secret-free result for one stored blob sampled during policy recovery preflight.
object
Sampled blob ID used to correlate the result with admin blob observability.
Secret-free administrator diagnostic.
Whether retrying the sample may reasonably produce a different result.
Stable object probe status.
Aggregate recoverability classification.
Number of stored blob rows under the source policy.
Logical bytes represented by stored blob rows.
Number of virtual-empty blob rows that need only metadata migration.
object
object
object
Connector-owned field that caused a configuration validation failure.
This is intentionally optional so existing diagnostics remain wire-compatible.
Connector field scope, for example connector_config or static_credential.
Example
{ "code": "success", "data": { "multipart_plan": { "reason": "provider_limits", "upload_mode": "native_streaming" }, "source_recovery_probe": { "samples": [ { "error_kind": "auth", "status": "readable" } ], "status": "recoverable" }, "target_capacity": { "status": "supported" }, "target_capacity_check": "sufficient", "warnings": [ "target_capacity_unavailable" ] }}Validation error
Unauthorized
Forbidden