mirror of
https://github.com/itsnaveenk/bazar3.git
synced 2025-12-19 21:27:05 +00:00
295 lines
7.2 KiB
JSON
295 lines
7.2 KiB
JSON
{
|
|
"info": {
|
|
"_postman_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
"name": "Kings Backend API",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "Admin Login",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"accessKey\": \"<ACCESS_KEY>\",\n \"password\": \"<PASSWORD>\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "http://localhost:5500/admin/login",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["admin", "login"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Publish Result (Admin)",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
},
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer <SESSION_TOKEN>"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"team\": \"BIKANER SUPER\",\n \"result\": \"45\",\n \"result_time\": \"2025-03-12 15:00:00\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "http://localhost:5500/admin/results",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["admin", "results"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Get All Teams",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "http://localhost:5500/api/teams",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["api", "teams"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Update Result (Admin)",
|
|
"request": {
|
|
"method": "PUT",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
},
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer <SESSION_TOKEN>"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"team\": \"UPDATED TEAM\",\n \"result\": \"55\",\n \"result_time\": \"2025-03-12 16:00:00\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "http://localhost:5500/admin/results/1",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["admin", "results", "1"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Delete Result (Admin)",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer <SESSION_TOKEN>"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "http://localhost:5500/admin/results/1",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["admin", "results", "1"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Get Results By Team (Admin)",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer <SESSION_TOKEN>"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "http://localhost:5500/admin/results?team=BIKANER SUPER",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["admin", "results"],
|
|
"query": [
|
|
{
|
|
"key": "team",
|
|
"value": "BIKANER SUPER"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Create Team (Admin)",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
},
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer <SESSION_TOKEN>"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"name\": \"NEW TEAM\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "http://localhost:5500/admin/teams",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["admin", "teams"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Update Team (Admin)",
|
|
"request": {
|
|
"method": "PUT",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
},
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer <SESSION_TOKEN>"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"name\": \"UPDATED TEAM\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "http://localhost:5500/admin/teams/1",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["admin", "teams", "1"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Delete Team (Admin)",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer <SESSION_TOKEN>"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "http://localhost:5500/admin/teams/1",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["admin", "teams", "1"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Get Today's Results",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "http://localhost:5500/api/today",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["api", "today"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Get Monthly Results",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"team\": \"BIKANER SUPER\",\n \"month\": \"2025-03\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "http://localhost:5500/api/results/monthly",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["api", "results", "monthly"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Get Daily Results",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "http://localhost:5500/api/results/daily?date=2025-03-12",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["api", "results", "daily"],
|
|
"query": [
|
|
{
|
|
"key": "date",
|
|
"value": "2025-03-12"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Get Results By Team (Public)",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "http://localhost:5500/api/results/team?team=BIKANER SUPER",
|
|
"protocol": "http",
|
|
"host": ["localhost"],
|
|
"port": "5500",
|
|
"path": ["api", "results", "team"],
|
|
"query": [
|
|
{
|
|
"key": "team",
|
|
"value": "BIKANER SUPER"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|