Skip to main content

Update a Custom Device data source

PATCH 

/api/v1/orgs/{orgId}/devices/{deviceId}/data-source

Partially update an existing data source. Only the fields provided are changed; omitted fields keep their current value (unlike PUT, which replaces the entire object). There is no way to clear an already-set description back to null via this endpoint. Send an empty string instead, or use PUT.

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 source.
  • description (string, optional): The updated description for the data source.
  • connectorType (string, optional): One of MQTT(v3.1), WEDA Data-Stream, HTTP-Server. Immutable once set (same rule as PUT): setting it while unset succeeds, resending the same value is a no-op, a different value returns 400. Sending null keeps the current value, the same as omitting it.

Responses

  • 200 OK: Data source updated successfully.
  • 400 Bad Request: connectorType was already set to a different value and this request tries to change it.
  • 404 Not Found: The device does not exist, or exists but has no DataSource 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, but the running device may already use part of 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​

OK