Retrieve APIs
Two MDM APIs are used in the MDM and Cloudant® integration sample: Retrieve by PartyId and Retrieve Organization by PartyId.
Retrieve by PartyId
A client retrieves a
person instance through the /person API, and supplying
the PartyId parameter:
curl -i -X GET -H "Accept: application/json" http://127.0.0.1:4800/mcs/person/nnn
where nnn represents
a PartyId value.The MDM and Cloudant sample
service responds as follows.
- If no person instance is associated with the PartyId, return a 404 HTTP RC and an empty hash as the payload.
- If an error occurs, return a 400 HTTP RC, and a hash with an error property.
- Otherwise, return a 200 HTTP RC and a hash.
Retrieve Organization by PartyId
A client
can retrieve the organization instance by using a PartyId through
the /org API.
curl -i -X GET -H "Accept: application/json" http://127.0.0.1:4800/mcs/org/nnn
The semantics of this API are identical to the /person API, except that the JSON document must correspond to an organization rather than a person.