跳至主要内容

Update transfer function

PATCH 

/api/v1/devices/{deviceId}/inputs/data-objects/transfer-functions/{transferFunctionId}

Update an existing transfer function's expression, type, or enabled status. All fields are optional; only provided fields are updated.

Path Parameters

  • deviceId (string, required): Device identifier. Example: 9f75abda56c3
  • transferFunctionId (string, required): Unique identifier of the transfer function to update. Example: 3f2504e0-4f89-11d3-9a0c-0305e82c3301

Request Body Parameters (all optional)

  • type (FunctionTransferType, optional): Type of transfer function. Example: Expression
  • expression (string, optional): New mathematical expression for transformation. Supports arithmetic operators (+, -, *, /, %) and parentheses for grouping.
    • A variable in the expression represents the current value of an input data object on the device; use the exact data object name as the identifier (e.g., temperature, voltage).
    • Exactly one variable is allowed. If the expression contains multiple variable names, only the first one alphabetically takes effect.
    • Format constraints:
      • Must be a single line. Characters \n, \r, U+2028, and U+2029 are not allowed.
      • At most one semicolon (;) is allowed.
      • If a semicolon is present, it must be the last non-whitespace character. Example: temperature * 1.8; is valid; a;b is not.
    • Executable expression: A trailing ; marks the expression as a complete executable statement that can be executed by the Dynamic LINQ engine. Without a trailing ;, the expression is treated as a value expression. Both produce the same result.
      • Value form: ((x * 9) / 5) + 32
      • Executable form: ((x * 9) / 5) + 32;
  • isEnabled (boolean, optional): Enable or disable the transfer function. Example: true

Responses

  • 200 OK: Returns the updated transfer function object with updated lastModificationTime.
  • 404 Not Found: Transfer function with the specified ID does not exist.

Security

  • This API requires authentication.

Request

Responses

OK