about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-11-07 16:24:57 +0100
committerEmile <hanemile@protonmail.com>2019-11-07 16:24:57 +0100
commit28291bf1af8e4f465315404eff6348612fa5c649 (patch)
treee79092ccd2c143efc71aed6514bab52b05a06a1d
parent44d36b2f7318b191e2e29126b7c4e4f379fa92d5 (diff)
simple description HEAD master
-rw-r--r--README.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/README.md b/README.md
index 41cf41b..034e865 100644
--- a/README.md
+++ b/README.md
@@ -8,4 +8,46 @@ This container exposes and api for all other containers to use. It should be the
 only container into which the docker-socket is mounted and all containers should
 communicate with it over an HTTP api.
 
+## Endpoints
 
+### `/`
+
+IndexHandler
+
+Handles requests to the "/" endpoint. Returns a small desription of what can be
+found where.
+
+### `/api/companion/getChallenges`
+
+getChallengesHandler
+
+get a list of all challenges (this is handled by the manager container as all
+that is needed is access to the database which is handled by the manager)
+
+### `/api/companion/startContainer`
+
+startChallengeHandler
+
+Handles starting a challenge and inserting it into the companion network.
+
+The handler needs a few informations from the user in order to start the right
+container in the right context:
+- challenge name (the name of the docker-container)
+- networkName (the name of the network into which the container should be
+    inserted into)
+- flag (the flag of the challenge)
+
+The handler returns two things
+- the IP of the container
+- the container ID
+
+### `/api/companion/stopContainer`
+
+stopContainerHandler
+
+Handles stoping a container
+
+The handler needs some information about what container to stop it:
+- container id
+
+### `/api/companion/getRunningContainer`