Open roipoussiere opened 2 years ago
on /api/sandbox, here are a few suggestions:
Since a model is a resource on the server, you might consider nesting execute as an endpoint underneath the model like:
/<model_name
In this example, /model_name should return the model resource itself ( file name/date, source code, named parameters, perhaps links to results of prior executions, and /exec would run a new build
If this api is designed for programmatic clients, I think format is better requested using Content-type header, not a uri parameter.
/api/sandbox
/<format>
POST
: retrieve some code as plain text and return the resulting model in the given format/api/models/
GET
: retrieve information about all models/<model_name>
:GET
: retrieve information about the given model/<model_name>/<format>
GET
: return the model in the given format. Url parameters can be used to configure model parameters. ex:/api/models/box/json?width=20,height=10
(default model parameters are used otherwise).