API Documentation

Hey! This is the API for my portfolio. It's pretty straightforward - you can grab project data, search through stuff, and if you're me (with auth), add or delete projects. Everything returns JSON.

REST JSON Rate limited

Base URL

Endpoint
https://muaves-portfolio-api.onrender.com

Authentication

Most endpoints are public - just hit them and get data. But if you want to create or delete stuff, you'll need to include an auth hash in your headers. That's just for admin stuff though.

Getting the Auth Hash

The auth hash is generated from your password + secret key. Here's how you get it:

Default credentials:

  • Password: admin123
  • Secret Key: mysecret456

When you log into /admin.html, it automatically generates the hash for you. But if you need it for API calls, check the browser console after logging in, or use the admin panel to make changes (which handles auth automatically).

Header
X-Auth-Hash: your-auth-hash-here

Rate Limits

Don't spam the API. You get 100 requests per hour per IP. If you go over, you'll get a 429 error. Should be plenty for normal use.

GET /api/projects

Returns all my projects as an array. Pretty simple.

Example

Request
curl https://muaves-portfolio-api.onrender.com/api/projects
Response
[
  {
    "name": "Redstone Launcher",
    "description": "The best launcher currently on the entire planet!",
    "tech": "HTML, CSS, JS, Node.js",
    "status": "Completed"
  },
  {
    "name": "ProTiers",
    "description": "Uhm smth with tiers",
    "tech": "JavaScript, WebServer, HTML, CSS",
    "status": "Completed"
  }
]
GET /api/projects/{id}

Get one specific project by its ID. IDs start at 1.

Parameters

Parameter Type Description
idrequired integer The project ID (starts at 1)
Example
curl https://muaves-portfolio-api.onrender.com/api/projects/1
GET /api/stats

Get some stats about the portfolio - how many projects, visitors, top viewed stuff, etc. Nothing too crazy.

Response
{
  "total_projects": 5,
  "total_links": 5,
  "version": "1.0.4",
  "total_visits": 127,
  "last_visit": "2025-02-15T12:45:00",
  "most_viewed_projects": []
}
POST /api/projects

Create a new project. You need auth for this one.

Request Body

Field Type Description
namerequired string Project name
descriptionrequired string What the project does
techrequired string Tech stack used
statusrequired string Completed, In Progress, etc.
Example
curl -X POST https://muaves-portfolio-api.onrender.com/api/projects \
  -H "Content-Type: application/json" \
  -H "X-Auth-Hash: your-hash" \
  -d '{
    "name": "Cool New Project",
    "description": "Does something awesome",
    "tech": "Python, Flask",
    "status": "In Progress"
  }'
DELETE /api/projects/{id}

Delete a project. Also needs auth. Be careful with this one.

Parameters

Parameter Type Description
idrequired integer ID of the project to delete
Example
curl -X DELETE https://muaves-portfolio-api.onrender.com/api/projects/1 \
  -H "X-Auth-Hash: your-hash"