Show TOC

DataAPI Overview for iOSLocate this document in the navigation structure

DataAPI enable developers to access an Agentry application's model data programmatically in the platform's natural language. For iOS, that language is Objective-C.


DataAPI in iOS is exposed to the user as a group of protocols and interfaces in pure Objective-C. See the iOSDataAPIExternal module to investigate the interfaces of these protocols in more detail.

The data for an Agentry application obtained via DataAPI is hierarchically organized in a manner that mirrors the corresponding object definitions for an application in the Agentry Editor. The main entity is the "object" which is represented by a class adopting the SMPDataAPIProtocol protocol. These objects can contain properties and collections. The properties can be of different types that map to specific Agentry data types (such as Decimal, DateAndTime, and so forth). The collections contain an arbitrary number of objects.

Example: Object Diagram
Consider if the following hierarchy were the object definition for an Agentry application:
  • Main Object
    • players (collection property containing "Player" objects)

  • Player
    • name (string property)

    • birthday (date property)

You can always navigate down the tree structure using the `descendant` methods and up using the `ancestor` method.

Currently DataAPI is used by OpenUI to provide access to the items in an SMPCollectionDisplayModel and their properties.