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 ofMQTT(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 returns400.
Responses
200 OK: Data source updated successfully.400 Bad Request:connectorTypewas 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: The update was saved, but applying it failed. The whole change was rolled back.
Request
Responses
- 200
- 400
- 404
- 417
OK
Bad Request - connectorType is already set and the request tries to change it to a different value.
Not Found - the device does not exist, or exists but has no DataSource configured yet.
Expectation Failed - the update was saved, but applying it failed; the whole change was rolled back.