Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API #54

Open
roipoussiere opened this issue Sep 14, 2022 · 1 comment
Open

New API #54

roipoussiere opened this issue Sep 14, 2022 · 1 comment
Milestone

Comments

@roipoussiere
Copy link
Owner

roipoussiere commented Sep 14, 2022

/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).
@roipoussiere roipoussiere added this to the 0.5 milestone Sep 14, 2022
@dcowden
Copy link

dcowden commented Sep 17, 2022

on /api/sandbox, here are a few suggestions:

  1. i think a name that more clearly indicates that this script is going to be executed would make ense, such as 'exec' or 'build'
  2. it still might be nice to supply parameters and values. I think /api/sandbox is essentially an 'anonymous/unnamed' model, so i would expect it to be nearly the same as /api/model

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.

@roipoussiere roipoussiere modified the milestones: 0.6, 0.5 Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants