---
title: "Restore device configuration"
method: POST
path: "/v1/objects/{object-id}/restore-device-config"
tags: ["Objects"]
---

# Restore device configuration

`POST /v1/objects/{object-id}/restore-device-config`

Push a configuration to the device represented by the given node using the device driver's restore hook (merge semantics over interactive SSH for CLI-driven devices, full override over NETCONF where supported). The configuration comes either from a stored backup, which may belong to a different node (replacement-device scenario), or from the request body. The restore runs as a background task; poll its state with GET /v1/background-tasks/{task-id}. Requires the upload-device-configuration access right on the target node and, when restoring from a backup, the read-device-configuration right on the source node. Every request is recorded in the audit log together with the SHA-256 hash of the configuration; events SYS_DEVICE_CONFIG_RESTORE_STARTED / COMPLETED / FAILED are generated on the target node.

## Path parameters

- `object-id` integer, required

## Request body

- union
  - object
    - `sourceObjectId` integer, required — ID of the node the backup belongs to (may differ from the target node)
    - `backupId` integer, required — Backup ID as returned by GET /v1/objects/{object-id}/device-config-backups
    - `useStartupConfig` boolean — Restore the startup configuration from the backup instead of the running configuration
    - `force` boolean — Apply even if the device drivers of source and target nodes differ
  - object
    - `config` string, required — Configuration text to apply

## Response `202`

Restore started; the task ID can be used to poll for completion

- object
  - `taskId` integer — Background task ID

## Other responses

- `400` — Invalid request. Possible reasons: - Invalid object ID, object is not a node, or invalid source object ID - Request body is missing or specifies neither sourceObjectId nor config - Device driver of the target node does not support configuration restore - Neither interactive SSH nor NETCONF is available on the target node - Requested backup holds a binary configuration - Configuration is empty
- `401` — Unauthorized
- `403` — User does not have upload-device-configuration access to the target node or read-device-configuration access to the source node
- `404` — Object with given ID does not exist, or the requested backup cannot be retrieved
- `409` — Device driver of the target node differs from the device driver of the source node; repeat with force set to true to apply anyway
- `501` — Backup provider does not implement backup retrieval

## Changes

- **2026-09-15** `c87f37318fa9` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/netxms/apis/netxms-api/changes/v1/objects/:object-id/restore-device-config/post.md)

---

[API](https://skmtc.dev/netxms/apis/netxms-api.md) · [All operations](https://skmtc.dev/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/netxms/apis/netxms-api/revisions/2827204d68d9?raw)
