Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-3468

Relationships Addressable as a Resource


    • Epic Name:
      Relationships as Resource
    • Sprint:
      OpenIDM Sprint 47, OpenIDM Sprint 49
    • Epic Status:


      Allow relationships between objects in our system to be addressable as their own resource. The relationship can have its own properties.

      Currently relationships are modelled as simple stringified URIs, directly referencing from the source object - such as in a managed/user/jdoe

      "roles" : ["managed/role/x", "role/y"]

      We want to add
      a) The ability to CRUDPAQ on the relationship itself ,and
      b) The ability to associate properties with a link, such as dates from when to when the specific roles assignment is effective

      To that effect, the relationship should be structured as

      • A complex JSON object
      • With its own URI, addressable from the source object, e.g. managed/user/jdoe/roles

      In our model meta-data we would identify a relationship to one, multiple specific or arbitrary other resource types.

      Querying all on this resource "managed/user/jdoe/roles" might look as follows

        "remainingPagedResults": -1,
        "pagedResultsCookie": null,
        "resultCount": 2,
        "result": [
          {"_id" : "<uuid>", "_ref" : "managed/role/x", "_properties" : {"from" : "2015-06-11T15:30:00Z", "to" : "2015-09-11T15:30:00Z"},
          {"_id" : "<uuid>", "_ref" : "managed/role/y", "_properties" : {}

      The relationship needs to stay (optionally) viewable and navigable from the source resource. A separate epic describes the additional desirable options there in terms of view defaults and resource expansion.

      e.g. doing a read on managed/user/jdoe and requesting the firstName and roles relationship "field"

        "firstName" : "John",
        "roles" : [
          {"_id" : "<uuid>", "_ref" : "managed/role/x", "_properties" : {"from" : "2015-06-11T15:30:00Z", "to" : "2015-09-11T15:30:00Z"},
          {"_id" : "<uuid>", "_ref" : "managed/role/y", "_properties" : {}

      The relationship resource needs to support

      • Create
      • Read
      • Update
      • Delete
      • Patch
      • Query including reliable paging


      • Upsert (needs to align with our general support for resources)

      We have not yet identified action(s) for the resource, but these can be added as any get identified.

      The relationship view from the source resource should ideally also stay create - update - delete - patch-able.




            • Assignee:
              huck.elliott Huck Elliott
              andi Andi Egloff
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: