While not as human-friendly, UUIDs can be used to be more lookup-friendly to the web service. Since YOUnite uses UUIDs for lookups in the underlying store, UUIDs can be considered if there are performance concerns (for example, for domains that are frequently referenced) but it has not been quantified how much performance is actually gained by using them.
The UUIDs for a domain/s properties is returned with the following:
Getting the UUIDs of a Domain's Properties
GET /domains/<domain-name>/properties
{ "properties": [{ . "uuid": "bab4b589-be75-4e7c-93c8-c89e037d307d", . . "propertyName": "capital", . . }, { . "uuid": "7388d88b-d2b8-4585-a08f-ab373c1b0043", . . "propertyName": "capital.city", . . }, { . . . }] }
Getting the UUIDs of an MDR's Properties
To get the UUIDs for a MDR's properties use:
GET /mdr/<domain-name>/<display-value>?refs=true
For example, to post a student
MDR with a reference to a country
MDR using an UUID:
GET /mdr/country/CAN?refs=true
{ "name": { "value": "Canada", "_self": "9a472159-fc7c-4730-b8af-5007b26f890c" }, "immigrationAddress": { "Street": { "value": "220 4th Avenue, SE, Room 210", "_self": "df879f43-cd93-4f5e-b77a-4ac64e0b5ba4" }, "city": {... }, "province-state": {}, "postal-code": {} }, . . . }
Then, POST the student
MDR with the appropriate UUID for the cross-references
POST /mdr/students
{ "firstname": "Jane", "lastname": "D'oe", . . "homeCountry": "9a472159-fc7c-4730-b8af-5007b26f890c", "immigrationAddress": "08c257b-74ac-406e-b56f-9cbbab87a57f" }