Other routes - SmartBeansGoe/smartbeans-backend GitHub Wiki

Other Routes

GET /info

Output

{
  "version": <String>,
  "hash": <String>
}

POST /task

Adds a task to the database. Requires header Authorization: Bearer <[email protected]>.

Input

{
  "taskid": <Integer>,
  "taskDescription": {
    ...
  },
  "solution": <String>,
  "lang": <String>,
  "tests": [
    ...
  ],
  "courseMetaData": [
    {
      "courseName": <String>,
      "tags": [
        {
          "name": <String>,
          "points": <Integer> (optional)
        },
        ...
      ],
      "orderBy": <Integer>,
      "prerequisites": {
        ...
      }
    },
    ...
  ]
}

Errors

  • 400: Wrong header or body format
  • 401: Wrong key
  • 403: No key set in Settings.toml
⚠️ **GitHub.com Fallback** ⚠️