hudmol/archivesspace — pull request #218 by marktriggs (2013-01-08 06:07:42+00:00)
Title: External ids

New functionality for:

https://www.pivotaltracker.com/story/show/40547867

Allows you to attach external IDs to the major record types by including an extra JSON property:

'external_ids' => [{'external_id': 'hello', 'source': 'My ILS'}],

You'll get these back whenever you GET a record, and you can also use a new endpoint to search by external ID:

scripts/curl_as admin admin 'http://localhost:4567/by-external-id?eid=hello'

That endpoint sends back a few different possible codes (from the endpoint docs):

[303, "A redirect to the URI named by the external ID (if there's only one)"],
[300, "A JSON-formatted list of URIs if there were multiple matches"],
[404, "If there were no matches"]