Update a Custom Device data parser
PATCH/api/v1/orgs/{orgId}/devices/{deviceId}/data-source/data-parser
Partially update an existing data parser. Only the fields provided are
changed; omitted fields keep their current value. If configs is provided, it fully replaces the
existing array (same full-replace rule as PUT). It is not merged channel-by-channel.
Parameters
orgId(string, required, path): Organization identifier.deviceId(UUID, required, path): Custom device identifier.
Request Body
All fields optional; only the fields present in the request are changed.
name(string, optional): The updated name for the data parser.description(string, optional): The updated description for the data parser.configs(array, optional): The updated channel-based configuration, same shape as PUT'sconfigs. When provided, replaces the entire existing array. Channels you leave out are removed. Omitconfigsor sendnullto keep the current channels. EverydataStreamIdacross the whole parser must still be unique.
Responses
200 OK: Data parser updated successfully.400 Bad Request: A channel'sdataPacks/blobmappings share a duplicatedataStreamId, or a mapping references adataStreamIdthat doesn't exist (CustomDevice.DataStreamIdNotFound).404 Not Found: The device does not exist, or exists but has no DataParser configured yet. PATCH does not create one (use PUT for that).417 Expectation Failed: WEDA could not apply the change to the device, so the change was not saved. GET returns the previous settings. In rare cases the running device may already use the new settings. The error is temporary. Resend the same request after a short wait to bring both back in line. Resending is safe and gives the same result each time.
Request
Responses
- 200
- 400
- 404
- 417
OK
Bad Request - a channel's dataPacks/blob mappings share a duplicate dataStreamId (rejected during request validation; see the DataParser.DuplicateDataStreamIds example), or a mapping references a dataStreamId that doesn't exist (CustomDevice.DataStreamIdNotFound).
Not Found - the device has no DataParser configured yet.
Expectation Failed - the change could not be applied and was not saved. In rare cases the running device may already use the new settings. Resend the same request.