SebOuellette / TaskSystem

A task managing API system for the Project 6 class

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Task System

This is a custom task system for managing hardward-related tasks among a group of users. Features include:

  • Searching for tasks
  • Adding new tasks
  • Dynamically loading tasks
  • Updating task list
  • Responsive design
  • REST compliant

Task System Home Page

Documentation

How to use

To compile, you must be within a docker container. To first pull the docker container to update/install it onto your host system, use the following command: docker pull sebouellette/webserver:shoppingcart

To enter the docker container, find startup.txt in the Shared folder. This file contains the commands to start the docker instance on different types of terminals.

Once you are within the docker container terminal, enter the /Shared directory using the cd command. Here, you can run the ./recompile.sh command to recompile the project. The executable will be placed in the newly created build folder. If a build folder already exists, it will be deleted and a new one will be created while compiling.

If you only wish to compile without clearing out the current build, you can cd build, then use make to compile changes quickly.

To use the compiled executable, simply start it using the following comamnd /Shared/build/tasksystem.

Legend

<hello> -- Text surrounded by <> is a variable. Do not include <> when using the API.
?foobar? -- Text surrounded by ?? is content that is to be decided later in development.

View home page

GET http://localhost:8080/
Result: text/html

View Help page

GET /help
Result: text/html

Edit Task

GET /editor
Querystring Parameters: ?id=<task_id>
Result: text/html

Search list of tasks

GET /search
Querystring Parameters: ?key=<search_string>
Result: application/json
-> The provided search string is matched against the task title and description then returns an array of all matching tasks

Find specific task

GET /edit
Querystring Parameters: ?id=<task_id>
Result: application/json

Edit specific task

PATCH /edit
Request body format: application/json

{
    "id": <task_id> // required field
}

Result: N/A

Add new task

POST /add
Request body format: application.json

{
    "title": "<task_title>", // required
    "description": "<task_description>", // required
    "partid": <part_id>, // required
    "assigned": <assigned_user_id>, // required
}

Result: N/A
If a task with this partid and assigned user id already exists, status code 409 Conflict will be returned. When this result is given, the client must instead perform a PUT request to /add to replace the existing task.

Replace existing task

PUT /add
Request body format: application.json

{
    "title": "<task_title>", // required
    "description": "<task_description>", // required
    "partid": <part_id>, // required
    "assigned": <assigned_user_id>, // required
}

Result: N/A

Delete specific task

GET /delete
Querystring Parameters: ?id=<task_id>
Result: N/A

Find allowed methods

OPTIONS *

About

A task managing API system for the Project 6 class

License:GNU General Public License v3.0


Languages

Language:C++ 68.3%Language:C 30.5%Language:HTML 1.2%Language:CMake 0.0%Language:Shell 0.0%