Overview

Web API Update operations fall into two categories:

  • Insert: The allows the user to insert new data into the database. As some resources, such as Property and Open House can have children, a deep insert ability allows for the addition of parent and children in one call. For example a Property resource can have Media, PowerProduction, PropertyGreen, PropertyUnits, and OpenHouse resource as children.

  • Change: Also refered to as a "Patch" operation, this allows the user to change one or more fields of an existing resource.

This diagram illustrates a typical Listing Input work flow:

sequenceDiagram LIM ->> Identity: 1. Authenticate activate LIM Identity -->> LIM: 2. Response with token LIM ->> MediaAPI: 3. POST Only Binaries MediaAPI -->> LIM: 4. JSON response with location and Id LIM ->> WebAPI: 5. POST/PATCH Entity WebAPI ->> WebAPI: 6. Validate WebAPI ->> SQL: 7. Commit to database WebAPI -->> LIM: 8. Respond with Entity or Errors deactivate LIM

Sequence Notes

  1. Authentication - Implicit or Resource owner password is required to POST/PATCH. It is needed to know the identity of the member using the LIM in order to properly validate the transaction.
  2. An out-of-band operation is required to post media binaries to a service. On success this service will respond with the required attributes that include the location uri and media key to post the media entities to the web api along with the listing entity.
  3. Listing deep insert is supported. Currently, deep update is NOT supported by OData 4.0 libraries.
  4. Validation - Embedded in the api we have primative "Who Can Edit" logic based on the resource owner's claims. Business Rules can be downloaded and examined

Participant Descriptions

LIM - Client application such as CloudMLX, Broker back office, etc...

Identity - Identity service: Getting Started

MediaAPI

WebAPI - OData service: https://h.api.crmls.org

SQL - Database server