Appearance
Switch every credential of a hub to polling or webhook
POST
/admin/credentials/sync-mode
Hub admins only (404 otherwise). With dry_run, returns what would switch and what would be skipped. Otherwise queues a background job (one live job per hub) and returns it; follow it with GET /admin/jobs/{id}.
Authorizations
Request Body
application/json
JSON "dry_run": true, "fqdn": "api.stage.pantahub.com", "mode": "webhook"
{
}
Responses
Dry run
application/json
JSON "job": { "actor_id": "string", "actor_nick": "string", "created_at": "string", "done": 0, "error": "string", "failed": 0, "failures": [ { "credential_id": "string", "error": "string", "owner_nick": "string" } ], "finished_at": "string", "fqdn": "string", "id": "string", "mode": "string", "skipped": 0, "started_at": "string", "status": "string", "stop_requested": true, "switched": 0, "total": 0, "type": "string" }, "plan": { "fqdn": "string", "items": [ { "credential_id": "string", "fqdn": "string", "owner_id": "string", "owner_nick": "string", "reason": "string", "switch": true, "sync_status": "string" } ], "mode": "string", "reasons": { "additionalProperties": 0 }, "skipped": 0, "total": 0, "would_switch": 0 }
{
}