REST/JSON Rules

  1. The MobileSmith platform uses RESTful web service calls for integration with data not hosted on a MobileSmith server – aka ‘remote data source’.
  2. The REST service response must be in JSON format; we do not currently support XML responses.
  3. The user’s device (containing the MobileSmith app) will communicate directly with the remote data source; MobileSmith server DOES NOT play ‘middle man’. 
  4. MobileSmith DOES NOT ever see/store data from remote servers.
  5. HTTP and HTTPS requests are both supported.
  6. Authentication - MobileSmith uses OAuth 2.0 
  7. CRUD operations supported (Create, Read, Update, Delete).
  8. Local data storage (caching) - The MobileSmith platform and its associated apps will obey the storage/caching rules specified in the response header returned from the REST service call.  If the response header specifies “No Store” (for example), then the app will not store any data locally on the device.
  9. Pagination - The MobileSmith platform will allow the app creator to specify the “Next Page” URL from the JSON response in order to activate pagination.
  10. JSON Structures Supported
    1. Simple Object
    2. Simple Array (Array of Objects)
    3. Array of Primitives
      1. Primitives are currently displayed only in an app
      2. Primitives cannot currently be used for “Tap to call”, “Tap to email”, “Get directions”, or “Add to calendar”.
    4. Object containing an Array of Primitives
    5. FIHR HL7 support coming soon (MobileSmith is an active committee member)
  11. JSON Structures NOT Supported
    1. An Array of Objects containing an Array of Objects – aka “Nested Object Arrays”
  12. In the MobileSmith platform, every UI component (page) will have a specific REST Service URL to GET, PUT, POST, DELETE data.  Common data fields (“id” for example) are used to pass arguments from one page to the next.