node

Creates or updates the pending operational dataset

Changed on

Creates or updates the pending operational dataset on the current node. Delay needs to be set to let the pending dataset apply as active dataset in the near future.

The request is applied on top of the current pending dataset, or on top of the current active dataset when none is pending: fields the request leaves out keep their current value, so a partial request (for example only a new channel plus a newer active timestamp) describes a change to the current network.

The dataset is registered with the Thread leader (MGMT_PENDING_SET), so leader-side validation applies: the pending timestamp must be newer than that of any pending dataset already known to the network, the active timestamp must be newer than that of the current active dataset unless the network key changes, the delay timer is raised to the allowed minimum (default 30 s, or the default delay when the network key changes), and the node must be attached to a Thread network. A JSON request that omits the pending timestamp gets one generated from the current time, advanced past the pending timestamp of the dataset it replaces if necessary.

put/node/dataset/pending

Request

  • Base URL
    http://localhost:8081
  • URL
    http://localhost:8081/node/dataset/pending
  • Auth
    none required

Headers

If-None-Match'*'

With the value *, the dataset is only written when none is in place yet; if one exists the request fails with 412 and nothing is written. Any other value is rejected with 400: the dataset resources carry no entity tags to match against. Without the header an existing dataset is replaced. The active dataset is only writable while Thread is stopped, and that check runs first: on a running node the response is 409 whether or not this header is present.

Request body

delayinteger

Delay timer in milliseconds

Example request

{
  "activeDataset": {
    "activeTimestamp": {
      "seconds": 10
    },
    "networkKey": "08277229F21FB7342D705D3CEFDC042A",
    "networkName": "OpenThread-e445",
    "extPanId": "996D3BEE320097A3",
    "meshLocalPrefix": "fd33:d3b9:89e3:72e4::/64",
    "panId": 58437,
    "channel": 21,
    "pskc": "FD943ECA225A28979B991EFAC1218A72",
    "securityPolicy": {
      "rotationTime": 672,
      "obtainNetworkKey": true,
      "nativeCommissioning": true,
      "routers": true,
      "externalCommissioning": true
    },
    "channelMask": 134215680
  },
  "pendingTimestamp": {
    "seconds": 10
  },
  "delay": 30000
}

Response

Successfully updated the pending operational dataset.

Changes

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the new optional header request parameter If-None-Match

    • info

      added the non-success response with the status