Projects

The Projects endpoint allows you to manage project records. You can create, update, delete, or retrieve them. Each project record has fields like name, technologies used, project duration, description, and project URLs.

Summary Table

MethodEndpointRequires apikey HeaderRequires :id
GET/api/projectsNoNo
POST/api/projectsYesNo
PATCH/api/projects/:idYesYes
DELETE/api/projects/:idYesYes

Schema

The project schema includes the following fields:

  • name (String, Required): Name of the project.
  • tech (Array of Strings, Required): A list of technologies used in the project.
  • range (String, Required): The project timeline or duration.
  • description (String, Optional): A brief description of the project.
  • url (Array of Strings, Required): URLs associated with the project.

Usage

Getting All Project Records

Endpoint: /api/projects
Method: GET
Description: Retrieves a list of all project records.

Creating a New Project Record

Endpoint: /api/projects
Method: POST
Description: Adds a new project record. Requires the apikey header.
Headers:

  • apikey: Your API key

Request Body Example:

{
  "name": "VA11-Hall-A Drinktionary Fansite",
  "tech": [
    "React",
    "Firebase",
    "Tailwind",
    "Python"
  ],
  "range": "08.2023",
  "url": [
    "https://github.com/kylezhao101/va11halla-drink-recipes"
  ],
  "description": "UI Design & Web Development"
}

Updating a Project Record

Endpoint: /api/projects/:id
Method: PATCH

Description: Updates an existing project record by its ID. Requires the apikey header.
Headers:

  • apikey: Your API key

Request Body Example:

{
  "name": "Updated Project Name",
  "tech": ["React", "Node.js"],
  "description": "Updated project description."
}

Deleting a Project Record

Endpoint: /api/projects/:id
Method: DELETE
Description: Deletes an existing project record by its ID. Requires the apikey header.
Headers:

  • apikey: Your API key