GET for Virtual Attributes

When retrieving an Integration Object Item (IOI), you can see any defined virtual attributes along with the IOI.

The following example:
  • Creates an Integration Object (VirtualAttributeIO) and Integration Object Item (UnitItem) with a virtual attribute (formattedCode).
  • Creates a script that holds logic for retrieving the value of a UnitItem's formattedCode virtual attribute.
  • Creates an instance of a Unit using the UnitItem Integration Object Item. VirtualAttributeIO.
  • Retrieves a single Integration Object Item (UnitItem) displaying the IOI with its formattedCode virtual attribute.
  1. POST to https://localhost:9002/odata2webservices/IntegrationService/IntegrationObjects with the following body:
  2. POST to https://localhost:9002/odata2webservices/ScriptService/Scripts with the following body:
  3. Create a UnitModel using the defined UnitItem Integration Object Item (IOI) by sending a POST request to https://localhost:9002/odata2webservices/VirtualAttributeIO/UnitItems with the following body:
  4. Retrieve the UnitItem's formattedCode by making the following GET request: https://localhost:9002/odata2webservices/UnitItem/Units('pieces')

    Here is the response body that is returned: