...
POST http://<openhim-core_host>:<api_port>/mediatormediators
with a body contain the following sample structure:
Code Block | ||
---|---|---|
| ||
{ uuid: "<a UUID>", // A unique identifier to identify the mediator, this identifier should always stay the same even if the mediator changes version: "", // the version of the mediator, if this is incremented the OpenHIM-core will update the channel configuration - expects a semver string name: "", // a human readable name for the mediator defaultChannelConfig: {[ // (optional) aan maparray of default channelchannels to add for this mediator { ... }, // a channel object as defined by the OpenHIM-core { ... } }], endpoints: {[ // (A minimum of 1 endpoint must be defined) aan maparray of endpoints that the mediator can be contacted on { ... }, // a route object as defined by OpenHIM-core - https://github.com/jembi/openhim-core-js/blob/master/src/model/channels.coffee#L5-L15 { ... } }] } |
The OpenHIM-core SHALL respond with a HTTP status of 201 if the mediator registration was successful.
...
Code Block | ||
---|---|---|
| ||
{ "status": "SuccessSuccessful", // (optional) an indicator of the status of the transaction, this can be one of the following: ['Processing', 'Failed', 'Completed', 'Successful', 'Completed with error(s)'] "response": { ... }, // a response object as defined by OpenHIM-core - https://github.com/jembi/openhim-core-js/blob/master/src/model/transactions.coffee#L13-L18 "orchestrations": { ... }, // (optional) an array of orchestration objects as defined by OpenHIM-core - https://github.com/jembi/openhim-core-js/blob/master/src/model/transactions.coffee#L26-L30 "properties": { // (optional) a map of properties that the HIM may want to report "pro1": "val", "pro2": "val" } } |
...