associate versus new

Thomas Sødring thomas.sodring at hioa.no
Thu Feb 16 13:30:14 CET 2017


Hi,

I need to come up with a general strategy when associating Noark
objects. The standard shows the following example for creating a
reference between two objects, in this case a record and
documentDescription:

-- page 21 of standard --

POST
http://localhost:49708/api/arkivstruktur/registrering/cf8e1d0d-e94d-4d07-b5ed-
46ba2df0465e/dokumentbeskrivelse/$ref?$id=http://localhost:49708/api/arkivstruktur/Dokumentb
eskrivelse/1fa94a89-3550-470b-a220-92dd4d709044

-- end page 21 of standard --


The following seems much easier and straight forward

POST
http://localhost:49708/api/arkivstruktur/registrering/cf8e1d0d-e94d-4d07-b5ed-
46ba2df0465e/ny-ref-dokumentbeskrivelse/1fa94a89-3550-470b-a220-92dd4d709044

Does anyone know if using this $ref field is a standardised way of
approaching this? When associating two existing objects, then you have
to use a HTTP-reference to the object, rather than simply using an
internal reference. I understand that in keeping with the HATEOAS
principles, all objects exists as a links. But this just seems to create
more unnecessary work server-side, stripping away everything up to
systemId.  I have done a quick search and can't find a definitive answer.

As it stands I think it is likely that the National Archive will stick
to the strict HATEOAS thinking so I guess I will develop with linking in
mind.

If you have any thoughts / comments / links on this, please share them.

 - Tom


More information about the nikita-noark mailing list