Restore factory defaults on a switch tray
Restores factory defaults on a switch tray. Only Provider Admins can call this endpoint. The Site must be Registered and belong to the current organizationβs provider.
target is required, case-sensitive, and has no default:
nvosclears the NVOS configuration and reboots the switch.sdnrestores the SDN configuration to factory defaults.
Only an ingested switch can be reset. The request returns 409 if a conflicting task is Pending or Running on the switchβs rack. The reset task fails without resetting the switch if a host in that rack does not become ready for a disruptive operation, for example because a Tenant is using it. This check cannot be overridden.
The reset runs in the background. A 202 response returns the reset task ID in taskIds; it means the task was created, not that the switch accepted or completed the reset. Use the Task APIs to see whether the task completed, failed, or was terminated. If the task fails before any reset is submitted, read the task message for the reason. When available, the task report provides additional details. A completed task means the Site reported the reset as finished, not that the switch is back in service. NICo does not restore the switch configuration or re-ingest the switch afterwards.
If the Site does not support the selected reset, the task fails.
Failed or uncertain reset submissions are not retried automatically. After a timeout or a lost response, check existing tasks and the switch before submitting again, since the first reset may already be running. Avoid starting another reset of the same type on the switch outside this API while its task is running, as the task may report that resetβs outcome instead.
Authentication
export JWT_BEARER_TOKEN="<jwt-bearer-token>"
# Example org name: "acme-inc
export ORG_NAME=<org-name>
# Use the JWT bearer token in your API request auth header:
curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current
Path parameters
Request
Registered site owned by the current organizationβs provider.
Required reset scope. Accepted values are nvos and sdn; case-sensitive, with no default.
Response
Reset tasks created; hardware work is asynchronous.
Asynchronous reset task IDs, one per owning rack; ordering is unspecified.