Skip to content

Latest commit

 

History

History
64 lines (44 loc) · 1.23 KB

File metadata and controls

64 lines (44 loc) · 1.23 KB

📖 CounterAPI - Quick Usage Guide

This guide provides quick curl/API examples for using your deployed CounterAPI instance.


➕ Add a New Project

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"name": "my-cool-app", "description": "An example project"}' \
  https://<your-api-url>/projects

📈 Ping (Increase Count)

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"name": "my-cool-app"}' \
  https://<your-api-url>/projects/ping

📊 Get All Projects

curl https://<your-api-url>/projects

🗑️ Delete a Project

curl -X DELETE https://<your-api-url>/projects/my-cool-app

🛠️ Update a Project

Update name, description, and/or count:

curl -X PUT \
  -H "Content-Type: application/json" \
  -d '{"new_name": "my-renamed-app", "description": "Updated description", "count": 42}' \
  "https://<your-api-url>/projects?name=my-cool-app"

🏥 Health Check

Check API and database connectivity:

curl https://<your-api-url>/health

🧬 View Database Meta Info

curl https://<your-api-url>/meta

Replace <your-api-url> with your deployed Render URL (e.g., https://yourname-counterapi.onrender.com).