Skip to content

Add templates/actions API #1

@halabooda

Description

@halabooda

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions