跳至主要内容

Create function transfer

POST 

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

Create a new function transfer to transform data object values using mathematical expressions.

Path Parameters

  • deviceId (string, required): Device identifier. The device must exist in the system. Example: 9f75abda56c3

Request Body Parameters

  • type (FunctionTransferType, required): Type of function transfer. Currently only Expression is supported. Example: Expression
  • outputDataObjectName (string, required): Output data object name for the transformed value. Must be unique for the device. Example: calibrated_temperature
  • expression (string, required): Mathematical expression for transformation. Supports basic arithmetic operators (+, -, *, /, %). The variable name will be automatically extracted. Example: (temperature * 1.8) + 32

Responses

  • 200 OK: Returns the created function transfer with generated ID and metadata.
  • 400 Bad Request: Invalid request parameters or expression syntax.
  • 409 Conflict: Function transfer already exists for the device and output name combination.

Security

  • This API requires authentication.

Request

Responses

OK