DataAPI Overview for iOS

the DataAPI enables developers to programmatically access an Agentry application's model data in the platform's natural language. Objective-C is the native language for iOS.


The iOS DataAPI 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.

The data for an Agentry application obtained via the 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

For this example, the following hierarchy represents the object definition for an Agentry application:
  • Main Object
    • players (collection property containing "Player" objects)

  • Player
    • name (string property)

    • birthday (date property)

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