@underpostnet/underpost
Version:
Underpost Platform — end-to-end CI/CD and application-delivery toolchain CLI. Covers bare metal, Kubernetes, K3s, kubeadm, LXD, container/image orchestration, secrets, databases, cron jobs, monitoring, SSH, runners, PWA + Workbox delivery, and release orc
217 lines (216 loc) • 6.52 kB
JSON
{
"info": {
"_postman_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"name": "User API",
"description": "A collection of requests for the User API.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "user",
"item": [
{
"name": "Log in",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"email\": \"user@example.com\",\n \"password\": \"Password123\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/user/auth",
"host": ["{{baseUrl}}"],
"path": ["user", "auth"]
},
"description": "This endpoint get a JWT for authenticated user"
},
"response": [
{
"name": "User logged in successfully",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseUrl}}/user/auth",
"host": ["{{baseUrl}}"],
"path": ["user", "auth"]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"status\": \"success\",\n \"data\": {\n \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Il9pZCI6IjY2YzM3N2Y1N2Y5OWU1OTY5YjgxZG...\",\n \"user\": {\n \"_id\": \"66c377f57f99e5969b81de89\",\n \"email\": \"user@example.com\",\n \"emailConfirmed\": false,\n \"username\": \"user123\",\n \"role\": \"user\",\n \"profileImageId\": \"66c377f57f99e5969b81de87\"\n }\n }\n}"
}
]
},
{
"name": "Create user",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"username\": \"user123\",\n \"password\": \"Password123\",\n \"email\": \"user@example.com\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/user",
"host": ["{{baseUrl}}"],
"path": ["user"]
},
"description": "This endpoint will create a new user account"
},
"response": []
},
{
"name": "Get user data by ID",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{authToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/user/:id",
"host": ["{{baseUrl}}"],
"path": ["user", ":id"],
"variable": [
{
"key": "id",
"value": "your_user_id"
}
]
},
"description": "This endpoint get user data by ID"
},
"response": []
},
{
"name": "Update user data by ID",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{authToken}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"username\": \"newuser123\",\n \"password\": \"NewPassword123\",\n \"email\": \"newuser@example.com\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/user/:id",
"host": ["{{baseUrl}}"],
"path": ["user", ":id"],
"variable": [
{
"key": "id",
"value": "your_user_id"
}
]
},
"description": "This endpoint will update user data by ID"
},
"response": []
},
{
"name": "Delete user data by ID",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{authToken}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/user/:id",
"host": ["{{baseUrl}}"],
"path": ["user", ":id"],
"variable": [
{
"key": "id",
"value": "your_user_id"
}
]
},
"description": "This endpoint deletes user data by ID, the path ID must match with the ID of the authenticated user"
},
"response": []
}
]
}
],
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:3000/api"
},
{
"key": "authToken",
"value": ""
}
]
}