Salesforce

Extending the standard

« Go Back
Information
Extending the standard
000003933
Public
Product Selection
aiWare - aiWare
Article Details

The engine output standard can be extended with custom data in multiple ways depending on the need. This is done by either adding to the vendor section or leveraging the structured file. Both methods are described below.

By adding to the vendor section

The simplest way to add custom data to an .aion file is to include it in one of the vendor sections.

The data written in the vendor section will be visible in the generated asset and available through the aiWARE API. This data will not be visible in any aiWARE applications and will not be available through the search API.

The values must be valid JSON data types, but have no other constraints.

The four places to add data to vendor sections are:

  1. At the asset level (applies to the whole file): 

    {
          "sourceEngineName": "engine_a",
          "vendor": {
            "myCustomKey1": "custom string value",
            "piNumber": 3.14
          }
        }
  2. At the object level (applies to a particular object in the whole file):

    {
          "sourceEngineName": "engine_b",
          "object": [
            {
              "type": "object",
              "vendor": {
                "myCustomKey1": "custom string value",
                "piNumber": 3.14
              }
            }
          ]
        }
  3. At the time slice (series) item level (applies to a particular slice of time):

    {
          "sourceEngineName": "engine_c",
          "series": [
            {
              "startTimeMs": 10,
              "stopTimeMs": 1060,
              "vendor": {
                "myCustomKey1": "custom string value",
                "piNumber": 3.14
              }
            }
          ]
        }
  4. At the time slice (series) item object level (applies to a particular object in a particular slice of time):

    {
          "sourceEngineName": "engine_d",
          "series": [
            {
              "startTimeMs": 0,
              "stopTimeMs": 1000,
              "object": {
                "type": "object",
                "vendor": {
                  "myCustomKey1": "custom string value",
                  "piNumber": 3.14
                }
              }
            }
          ]
        }

By leveraging structured data

To display data in a table in the user interface and index it for searching via the search API, add the data to the .aion file in one of the structuredData sections.

  1. Register a schema through the Veritone Developer app that expresses the structure of the data. 
  2. Reference the schema ID in the structuredData section and include the custom data under it.

    The three places to add custom data are:

    1. At the object level (applies to a particular object in the whole file):

      {
                  "sourceEngineName": "engine_e",
                  "object": [
                      {
                      "type": "object",
                      "structuredData": {
                          "a0d65cfd-320b-4557-42ff-4e0c6fe9a152": {
                          "scale": "Fahrenheit",
                          "degrees": "80"
                      },
                          "ba735caa-fa9b-a4b2-bb72-2e4dc5a23ff5": {
                          "25_30": "1000",
                          "31_35": "1200",
                          "36_40": "200"
                          }
                      }
                      }
                  ]
                  }
    2. At the time slice (series) item level (applies to a particular slice of time):

      {
            "sourceEngineName": "engine_f",
            "series": [
              {
                "startTimeMs": 10,
                "stopTimeMs": 1060,
                "structuredData": {
                  "a0d65cfd-320b-4557-42ff-4e0c6fe9a152": {
                    "scale": "Fahrenheit",
                    "degrees": "80"
                  },
                  "ba735caa-fa9b-a4b2-bb72-2e4dc5a23ff5": {
                    "25_30": "1000",
                    "31_35": "1200",
                    "36_40": "200"
                  }
                }
              }
            ]
          }
    3. At the time slice (series) item object level (applies to a particular object in a particular slice of time):

      {
            "sourceEngineName": "engine_g",
            "series": [
              {
                "startTimeMs": 0,
                "stopTimeMs": 1000,
                "object": {
                  "type": "object",
                  "structuredData": {
                    "a0d65cfd-320b-4557-42ff-4e0c6fe9a152": {
                      "scale": "Fahrenheit",
                      "degrees": "80"
                    },
                    "ba735caa-fa9b-a4b2-bb72-2e4dc5a23ff5": {
                      "25_30": "1000",
                      "31_35": "1200",
                      "36_40": "200"
                    }
                  }
                }
              }
            ]
          }

By extending the specification itself

If you would like your data to be displayed in the aiWARE UI as its own new capability, contact us to discuss how the specification should be extended and what types of user interfaces should be created.

Additional Technical Documentation Information
Properties
8/7/2024 9:50 PM
8/7/2024 9:51 PM
8/7/2024 9:51 PM
Documentation
Documentation
000003933
Translation Information
English

Powered by