Skip to content
New issue

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

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

Already on GitHub? # to your account

Add templates/actions API #1

Open
1 of 10 tasks
halabooda opened this issue Feb 8, 2025 · 1 comment
Open
1 of 10 tasks

Add templates/actions API #1

halabooda opened this issue Feb 8, 2025 · 1 comment

Comments

@halabooda
Copy link
Member

halabooda commented Feb 8, 2025

Abstraction.

The sandbox can be launched with different configurations (sets of languages), which can be:

  • embedded in the repository — list,
  • provided via Docker mount,
  • or loaded from an S3 bucket (S3 is used as the state of a long-running service).

This describes the initialization process. However, it should also be possible to add new languages, modify existing ones, and remove them.

Configuration.
The configuration consists of a Dockerfile (along with the necessary files) and a config.json file that defines a template—containing the name, constraints, and actions (various execution options within a single container).

Example one: https://github.com/codiewio/codenire/blob/main/sandbox/dockerfiles/php83/config.json

Task.

An API needs to be implemented to modify template configurations and actions within a template.

Proposed API:

Actions

  • GET /actions (implemented) — Retrieve the list of actions
  • POST /actions/{templateId} — Add a new action
  • GET /actions/{templateId}/{id} — Retrieve data for a specific action
  • DELETE /actions/{templateId}/{id} — Remove an action
  • PUT /actions/{templateId}/{id} — Update an action

Templates

  • GET /templates — Retrieve the list of templates
  • POST /templates — Add a new template
  • GET /templates/{id} — Retrieve data for a specific template
  • DELETE /templates/{id} — Remove a template
  • PUT /templates/{id} — Update a template
@halabooda
Copy link
Member Author

Draft of templates API in #15

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant