Supported protocols
HTTP Protocol using REST
REST is currently only supported on the north side, and the main destination is Information Router. For this destination, the endpoint details are preset in the appsettings. If further REST destinations are needed, then a settings block like below should be added under the "RestDestinations" block in the app settings:
Example Rest endpoint definition
"RestDestinations": {
"ExampleEndpointName": { (1)
"Name": "ExampleEndpointName", (2)
"Url": "http://localhost:5000", (3)
"Path": "messaging/v1/{tenantId}/oppml", (4)
"Method": "Post", (5)
"CredentialType": "Basic", (6)
"Timeout": 60000, (7)
"DestinationPayloadInformation": { (8)
"RequestPayloadType": "OppMl", (9)
"RequestPayloadVersion": "V0_9", (10)
"ResponsePayloadType": "OppMl", (11)
"ResponsePayloadVersion": "V0_9" (12)
}
}
}
Where:
1 | Fantasy name with which the endpoint can be referred to. |
2 | Name must equal with the EndpointName property. |
3 | The base address of the destination service |
4 | The rest of the destination URL, which can contain dynamic data. The dynamic data is filled from the "additionalData" dictionary which currently only supports the "tenantId" placeholder. |
5 | The REST method to use when exacting the call. |
6 | The credential type to use in the request headers. Currently only None, and Basic is supported. |
7 | The send-time-out for the call. |
8 | The destination payload information details. |
9 | The message format the destination is expecting. Currently supported formats are: OpConXml, OppMl |
10 | The version of the request format, if relevant. |
11 | The message format the destination is sending the response in. Currently supported formats are: OpConXml, OppMl |
12 | The version of the response format, if relevant. |
After the new destination is defined, it has to be added to the destination list of the MainRoute route settings:
Example Route setting
"Routes": {
"MainRoute": {
"Id": "MainRoute",
"Destinations": "ExampleEndpointName"
}
}
Credential settings
Basic auth In case the REST request should contain the basic auth credential header, the username and password can be set in the "TenantConfig" settings block
Example Tenant config
"TenantConfig": {
"Tenant0": "7311ea8c-5d48-43fe-acf9-980eedf24b6c",
"InstanceId": "instance01",
"UserName": "user",
"Password": "!PasS!"
}