Solve Using a Runtime Token
As discussed in the previous chapter, RASON Subscriptions, runtime tokens can be used to execute (only) a model that has already been posted to
the server. When using a runtime token, you will not be able to edit or delete the model. See the "Runtime Token" section within the "Rason
Subscription" chapter for more information on how to create and manage runtime tokens.
Given that a resource ID has already been posted to the RASON Server, the process for executing a model with a runtime token continues as:
- Use GET rason.net/api/model/{id}/optimize (or simulate, datamine, decision or solve) to solve the model.
- Use GET rason.net/api/model/{id}/status to check the progress.
- Use GET rason.net/api/model/{id}/result or GET rason.net/api/model/{id}/result/data to obtain the model results.
Note that you must pass the resource ID, rather than the model name, when using a runtime token.
The bearer of a runtime token may also call POST rason.net/api/model/{id}/stop to stop the execution of a model in progress. The complete
list of API's allowed by a runtime token are listed below. Calls to any other API will result in a 401 Unauthorized error.
- /api/model/{id}/solve
- /api/model/{id}/optimize
- /api/model/{id}/decision
- /api/model/{id}/simulate
- /api/model/{id}/datamine
- /api/model/{id}/status
- /api/model/{id}/result
- /api/model/{id}/result/data
- /api/model/{id}/stop
Note that a runtime token is valid only for the model for which it was generated and may not be used with Quick Solve REST API endpoints.
The token does not allow access, even execution, to other models.
Click My Account to manage your Runtime tokens. (See the RASON Subscription page for more information on this page.) You can also
create and obtain Runtime tokens on the Editor page by clicking the two icons found within the Run Token section of the ribbon.
Click the key icon to call the REST API endpoint, GET rason.net/api/model/{nameorid}/runtoken, to create and obtain a runtime token.
Click the X icon to call the REST API endpoint DELETE rason.net/api/model/{nameorid}/runtoken to delete the runtime token. See the
following section for more information on both of these endpoints.
|