跳至主要内容

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's configs. When provided, replaces the entire existing array. Every dataStreamId across the whole parser must still be unique.

Responses

  • 200 OK: Data parser updated successfully.
  • 400 Bad Request: A channel's dataPacks/blob mappings share a duplicate dataStreamId, or a mapping references a dataStreamId that 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​

OK