Skip to navigation

Restore factory defaults on a switch tray

View as MarkdownOpen in Claude

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:

  • nvos clears the NVOS configuration and reboots the switch.
  • sdn restores 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

AuthorizationBearer
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

orgstringRequired
Name of the organization whose provider owns the Site.
idstringRequired
Switch inventory identifier

Request

This endpoint expects an object.
siteIdstringRequiredformat: "uuid"

Registered site owned by the current organization’s provider.

targetenumRequired

Required reset scope. Accepted values are nvos and sdn; case-sensitive, with no default.

Allowed values:

Response

Reset tasks created; hardware work is asynchronous.

taskIdslist of strings

Asynchronous reset task IDs, one per owning rack; ordering is unspecified.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
412
Precondition Failed Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error