Other Data and Translation
  • 21 Nov 2022
  • Dark
    Light
  • PDF

Other Data and Translation

  • Dark
    Light
  • PDF

Article summary

You can create a schema that includes some of the data that you want (e.g., for validation or to translate), and also specify that you want the other data to remain as is.

By setting dynamicfields to true, you are telling the translator that if the field is not defined, pass the data “as is”.

When the external_name is different than the property name, the adapter knows to translate or map the data in the objects that it sends and receives so that IAP receives the data in a field that matches the property name and the other system receives the data in a field that matches external_name. For example:

  • {objectId: 123} goes to System A
  • {componentId: 123} goes to IAP

Example: Schema with Dynamic Fields and External Name

  "$id": "sevone_alert",
  "type": "object",
  "schema": "http://json-schema.org/draft-07/schema#",
  "translate": true,
  "dynamicfields": true,
  "properties": {
    "ph_request_type": {
      ….
    },
    "deviceId": {
      "type": "integer",
      "description": "the id of the device this alert originated on",
      "external_name": "deviceId"
    },
    "componentId": {
      "type": "integer",
      "description": "the id of the object/device componenet this alert originated on",
      "external_name": "objectId"
    }
  },
  "definitions": {}

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.