Developers can retrieve master data through the YOUnite API. The differences between YOUnite Data Store and federated require different access patterns.
...
YOUnite Data Store Access Pattern
Make the Request
TODO Request
TODO Request body
TODO Payload
Federated Access Patterns
...
what is a FDDP (pointer to more). TODO - add request a response payload example
Make the Request
TODO... Default timeout is, it can be overriden using
TODO fix callbackURL
POST /drs/da53c1c5-945c-42fb-821f-77ea6e20302c/assembler
Code Block | ||||
---|---|---|---|---|
| ||||
{ "callbackUrl": "https://openmdmproduction.devccc-co.ccctechcenter.org/openmdm-metadatadata/6c5a754b-6ce0-4871-8dec-d39e255eccc3/drs/da53c1c5-945c-42fb-821f-77ea6e20302c/assembler", "zoneUuid": "6c5a754b-6ce0-4871-8dec-d39e255eccc3", "timeout": 10, "notificationRegistrationType": "WEB_SOCKET" } |
...
POST response. Note there is no data delivered since it will be delivered to the location specified in the request body's callbackUrl:
Code Block | ||||
---|---|---|---|---|
| ||||
{
"assemblerUuid": "a9e49f65-97ad-45e3-94ac-9bc771b7fcec",
"drUuid": "da53c1c5-945c-42fb-821f-77ea6e20302c",
"location": "https://younite.ccc-co.org/api/drs/da53c1c5-945c-42fb-821f-77ea6e20302c/assembler/a9e49f65-97ad-45e3-94ac-9bc771b7fcec"
} |
The response includes a location the consumer can use to retrieve metadata about the request:
Callback Payload
The data is delivered in the request method body specified by notificationRegistrationType and the callbackUrl specified:TODO fix callback URL
Code Block | ||||
---|---|---|---|---|
| ||||
{ "callbackUrl": "https://openmdm.dev.ccctechcenterproduction.ccc-co.org/openmdm-metadatadata/6c5a754b-6ce0-4871-8dec-d39e255eccc3/drs/da53c1c5-945c-42fb-821f-77ea6e20302c/assembler", "oneTimePad": null, "data": { "zip": "46406", "lastName": "Jadczak", "address": "959 Barby Place", "gender": "F", "city": "Gary", "lastVisit": "2013-01-12", "birthDate": "1978-03-25", "firstName": "Viki", "phone": "219-375-6563", "customerId": "0A0V6HWEIL", "serviceRep": "Eileen", "state": "IN", "accountBalance": 1666.78, "email": "ejadczak5@cbslocal.com" }, "assemblerUuid": "25e1b386-48db-45b9-a8e9-dc1499c56e23", "notificationRegistrationType": "WEB_SOCKET" } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "callbackUrl": "https://openmdm.dev.ccctechcenter.org/openmdm-metadata/6c5a754b-6ce0-4871-8dec-d39e255eccc3/drs/da53c1c5-945c-42fb-821f-77ea6e20302c/assembler", "zoneUuid": "6c5a754b-6ce0-4871-8dec-d39e255eccc3", "goldAdaptors": { "uuids": [] }, "silverAdaptors": { "uuids": [] }, "timeout": 10, "notificationRegistrationType": "WEB_SOCKET" } |
Metadata payload
TODO the metadata for the request can be retrieved...The POST /drs/<dr-uuid>/assembler response included a location the consumer can use to retrieve metadata about the request. For example:
GET https://younite.ccc-co.org/api/drs/da53c1c5-945c-42fb-821f-77ea6e20302c/assembler/a9e49f65-97ad-45e3-94ac-9bc771b7fcec
Code Block | ||||
---|---|---|---|---|
| ||||
{ "uuid": "a9e49f65-97ad-45e3-94ac-9bc771b7fcec", "drUuid": "da53c1c5-945c-42fb-821f-77ea6e20302c", "status": "RESPONSE_SENT", "requestedProperties": [ "zip", "lastName", "address", "gender", "city", "lastVisit", "birthDate", "firstName", "phone", "customerId", "serviceRep", "state", "accountBalance", "email" ], "goldAdaptors": { "uuids": [ "80121e99-516d-445a-9cbe-7915280c4d42", "f96f8385-5a6d-47f4-a784-5bfca05af35d" ] }, "silverAdaptors": { "uuids": [ "d798d987-afd0-4cd1-8830-5e7627a69f2e", "f8264016-f8bf-4bab-8b2e-fb5a845d2d50" ] }, "capableAdaptors": { "uuids": [] }, "invokeCallbackOn": "GOLD_SILVER", "timeout": 7, "zoneUserUuid": "9ef2f7e2-ceca-499d-9664-7c8f8c2ea9a0", "zoneUuid": "d3b70b3a-9c5f-4ef4-bc70-54b713e46854", "callbackUrl": "http://{{callback_ip}}:8082/notify", "notificationRegistrationType": "WEB_HOOK" } |
...
Check if Data Record is Mapped at a Specific Adaptor
To check if YOUnite server has an adaptor-to-domain-entry link for a given master data record at an adaptor.
GET /drs/{uuid}/adaptor/{adaptorUuid}/check
If the link exists a 200 OK is returned and a 404 NOT FOUND if not.
NOTE: A NOT FOUND is not a definitive result since the YOUnite server makes no assumptions if a POST DR (data record )request sent to an adaptor was honored by the adaptor and does not create the server does not create the adaptor-to-domain-entry link until the adaptor sends a data event back to the YOUnite server for a given DR. The following two events, are examples of events that will create an adaptor-to-domain-entry link in the YOUnite server:
- Adaptor responding to a GET request.
- PUT or POST data event request (sent from the adaptor to the YOUnite server).