Creates or updates the active operational dataset
Changed onCreates or updates the active operational dataset on the current node. Only allowed if the Thread node is inactive. If the Thread node is active, a pending dataset should be used to update the current active operational dataset.
Request
- Base URLhttp://localhost:8081
- URLhttp://localhost:8081/node/dataset/active
- Authnone required
Headers
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
Example request
{
"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
}Response
Successfully updated the active operational dataset.
Changes
- breaking
removed the media type
plain/textfrom the request body - info
added the media type
text/plainto the request body
- breaking
- info
added the new optional
headerrequest parameterIf-None-Match - info
added the non-success response with the status
- info