2023-02-05 - ImportData Updating Objects

From Izara Wiki
Jump to navigation Jump to search

Service - Import Data

Update/remove existing object/link

  • have an "action" field
  • is possible to update existing data when identifier is not set (up to external service how it attempts to do this)
  • if identifier is not set then action can be set to "create"/"update", default: "update", create will make a new object even if existing object matches whatever properties can be used to match, (eg attribute name)
  • if identifier is set action can be set to "reference"/"update"/"remove", default: "reference"
  • "create" invokes createObject/createLink in external service
  • "update" invokes updateObject/updateLink in external service
  • "remove" invokes removeObject in external service, link has no need for "reference"?

Empty properties

  • only send non-empty properties to external service
  • up to external service which properties are required, if defaults are used

User Authorization for ImportData

Although it might be possible to do this on the ImportData side by setting which rbactype/permissions to check for each object type, it gets complicated as there might be multiple permissions used by the external service's task depending on the fields sent, so planning on handling this in the external service.

Authorization could be handled in external service's createObject function before passing to the flow that does the update/create, but if we place it in SQS/SNS handlers that would mean any request that begins in these handlers gets authenticated accordingly, choosing to do this.