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. 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: The update was saved, but applying it failed. The whole change was rolled back.
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 update was saved, but applying it failed; the whole change was rolled back.