Endpoints
Endpoints are used to access the scoring API. The API is used to access the scoring engine and return results for the configured use case.
The recommended APIs to use to interact with the ecosystem.Ai runtime are POST /invocations for ranked offers and POST /response (singular) for learning feedback. If required the APIs can be customised to suit the use-case and the model being used.
UI Frameworks contains examples of integration of these endpoints with different channel interfaces. Try the closed loop in the Runtime Dashboard or on medemo.ecosystem.ai .
API Parameters
When using the /invocations API to access results, you will need to include the following parameters:
Campaign
This is the same name as provided when configuring project deployment settings. For dynamic recommenders ensure that the names are the same.
Sub-Campaign
The sub-campaign can be used to differentiate between different models that are used in the same campaign. This is useful when using multiple models in the same campaign.
Lookup
If there is a parameter lookup configured, then this is the value that will be used to lookup the model scoring parameters. If there is no lookup configured, then this value will be ignored.
Channel
Different channels can be used to access the scores. This is useful when using the same model in different channels.
Responses
The number of responses to return. This is useful when using the API to return multiple scores. For data lookup options only one response is returned.
Debug (optional)
Add top-level "debug": "true" on /invocations to receive a sibling debug object with operator-facing explanations, pipeline errors, Mongo status, and sanitized params when scoring fails silently. Workbench Test renders those explanations. Use for developer diagnostics only — omit in production traffic. See Runtime integration guide .
The params field
params on /invocations is a JSON string, not a nested object. With the Score API selected, encode one of the following objects as that string ("{}" or '{"input":[...],"value":[...]}').
Model based recommender:
{}Note that this approach will bypass any parameter lookup settings in the project deployment configuration. Model based configurations that require data lookup replacement use:
{
"input":["model_param1","model_param2"],
"value":["value to score","value to score"]
}Dynamic recommenders use:
{
"input":["contextual_variable_one","contextual_variable_two"],
"value":["",""]
}Tensorflow or PyTorch models:
{
"input":["text"],
"value":["Place text here"],
"type":"dense_1"
}Question and answer approaches with deep learning models:
{
"input":["text","question"],
"value":["BBC Japan was a general entertainment Channel. Which operated between December 2004 and April 2006.","When did BBC Japan start broadcasting?"],
"type":"qa"
}