Removing Duplicate Data Properties in Response Object
  • 06 Jun 2023
  • Dark
    Light
  • PDF

Removing Duplicate Data Properties in Response Object

  • Dark
    Light
  • PDF

Article summary

Integration Methods Wrapped with a Response Object

Integrations are currently used in Workflows and Golden Configuration JSON Compliance (called “Adapter Task Instances”). In both places, when an Integration method call is made, a Response Object is returned.

Legacy Properties Deprecated (2023.1.0)

To eliminate duplicate data in the response body, Itential is deprecating the data and obj properties from the Response Object that returns when making Integration calls in IAP. These properties are marked officially as legacy properties in the Swagger Client Library, with text and body as their equivalents, respectively.

Because "data" is a duplicate of "text" and "obj" is a duplicate of "body", the response body essentially has four (4) pieces of the same data, thereby resulting in a large response object. Removing data and obj reduces the object size and further helps to avoid performance issues that can occur when a large response body (greater than 16MB) takes a long time to process or uses too much memory.

Property Description Deprecation Release Scheduled Removal Release Replacement Property
data A textual body or Blob. 2023.1 2024.1 text
obj The JSON object that returns the response. 2023.1 2024.1 body

What Should I Do?

Stop using the data and obj properties from the response object and replace with text and body, respectively. Moreover, the text property should be handled by the system that is using the Integration (i.e., Workflow Engine or Golden Config).

Response Body - Deprecated

{
  "ok": true,
  "url": "http://localhost:8088/pet/7119",
  "status": 200,
  "statusText": "OK",
  "headers": {
    "connection": "close",
    "content-type": "application/json",
    "date": [
      "Fri",
      "05 May 2023 17:48:43 GMT"
    ],
    "transfer-encoding": "chunked",
    "x-powered-by": "Express"
  },
  "text": "{\n  \"id\": 7119,\n  \"tags\": [],\n  \"status\": \"available\",\n  \"name\": \"Lotus\",\n  \"photoUrls\": [\n    \"https://patchpuppy.com/wp-content/uploads/2022/06/WhatIsanAmericanBlackLab.jpg.webp\"\n  ]\n}",
  "data": "{\n  \"id\": 7119,\n  \"tags\": [],\n  \"status\": \"available\",\n  \"name\": \"Lotus\",\n  \"photoUrls\": [\n    \"https://patchpuppy.com/wp-content/uploads/2022/06/WhatIsanAmericanBlackLab.jpg.webp\"\n  ]\n}",
  "body": {
    "id": 7119,
    "tags": [],
    "status": "available",
    "name": "Lotus",
    "photoUrls": [
      "https://patchpuppy.com/wp-content/uploads/2022/06/WhatIsanAmericanBlackLab.jpg.webp"
    ]
  },
  "obj": {
    "id": 7119,
    "tags": [],
    "status": "available",
    "name": "Lotus",
    "photoUrls": [
      "https://patchpuppy.com/wp-content/uploads/2022/06/WhatIsanAmericanBlackLab.jpg.webp"
    ]
  }
}

Response Body - Replacement

{
  "ok": true,
  "url": "http://localhost:8088/pet/7119",
  "status": 200,
  "statusText": "OK",
  "headers": {
    "connection": "close",
    "content-type": "application/json",
    "date": [
      "Fri",
      "05 May 2023 17:48:43 GMT"
    ],
    "transfer-encoding": "chunked",
    "x-powered-by": "Express"
  },
  "text": "{\n  \"id\": 7119,\n  \"tags\": [],\n  \"status\": \"available\",\n  \"name\": \"Lotus\",\n  \"photoUrls\": [\n    \"https://patchpuppy.com/wp-content/uploads/2022/06/WhatIsanAmericanBlackLab.jpg.webp\"\n  ]\n}",
  "body": {
    "id": 7119,
    "tags": [],
    "status": "available",
    "name": "Lotus",
    "photoUrls": [
      "https://patchpuppy.com/wp-content/uploads/2022/06/WhatIsanAmericanBlackLab.jpg.webp"
    ]
  }
}

If you encounter any problems in replacing the legacy properties, please contact the Product Support Team.


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.