Using Model Names in API Calls
As mentioned in the previous topic, in RASON V2020 and later, models may be named or unnamed. Decision flows must be named. As a "best practice" it
is recommended to always use named models, though unnamed models are still supported (i.e. for synchronous operations). In any RASON API call that
creates, updates, deletes, retrieves model text, or executes a model resource, the model/flow name can be used instead of the ID in the URL. The new
API call POST rason.net/api/model/{name}/solvetype returns an ID for (only) that model or flow instance. Subsequent calls to
GET rason.net/api/model/name/status or GET rason.net/api/model/name/result (etc.) will point to
this model instance. (To get the result of the original model or flow, you can either replace "name" with the full resource ID of the original model or flow,
or make the original model/flow the "champion". For more information on champion models, see the next topic.)
The new API endpoint POST rason.net/api/model/name/solve solves both single models and decision flows and can be used in place of POST rason.net/api/solvetype,
GET rason.net/api/model/nameorid/solvetype and the new call to POST rason.net/api/model/nameorid/solvetype.
|