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
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
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"
The relationship resource needs to support
- 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.