Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
241 lines
8.8 KiB
JSON
241 lines
8.8 KiB
JSON
{
|
|
"info": {
|
|
"_postman_id": "YOUR_POSTMAN_ID",
|
|
"name": "User API",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "Auth",
|
|
"item": [
|
|
{
|
|
"name": "POST /api/auth/login",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"email\": \"\",\n\t\"password\": \"\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{API_URL}}/api/auth/login",
|
|
"host": [
|
|
"{{API_URL}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"auth",
|
|
"login"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "POST /api/auth/register",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"email\": \"\",\n\t\"password\": \"\",\n\t\"role\": \"user\",\n\t\"companyID\": \"\",\n\t\"hourlyRate\": 0\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{API_URL}}/api/auth/register",
|
|
"host": [
|
|
"{{API_URL}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"auth",
|
|
"register"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "GET /api/auth/me",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer {{JWT_TOKEN}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{API_URL}}/api/auth/me",
|
|
"host": [
|
|
"{{API_URL}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"auth",
|
|
"me"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Users",
|
|
"item": [
|
|
{
|
|
"name": "GET /api/users",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer {{JWT_TOKEN}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{API_URL}}/api/users",
|
|
"host": [
|
|
"{{API_URL}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "GET /api/users/:id",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer {{JWT_TOKEN}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{API_URL}}/api/users/:id",
|
|
"host": [
|
|
"{{API_URL}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"users",
|
|
":id"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "POST /api/users",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer {{JWT_TOKEN}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"email\": \"\",\n\t\"password\": \"\",\n\t\"role\": \"user\",\n\t\"companyID\": \"\",\n\t\"hourlyRate\": 0\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{API_URL}}/api/users",
|
|
"host": [
|
|
"{{API_URL}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"users"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "PUT /api/users/:id",
|
|
"request": {
|
|
"method": "PUT",
|
|
"header": [
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer {{JWT_TOKEN}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n\t\"email\": \"\",\n\t\"password\": \"\",\n\t\"role\": \"user\",\n\t\"companyID\": \"\",\n\t\"hourlyRate\": 0\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{API_URL}}/api/users/:id",
|
|
"host": [
|
|
"{{API_URL}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"users",
|
|
":id"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "DELETE /api/users/:id",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer {{JWT_TOKEN}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{API_URL}}/api/users/:id",
|
|
"host": [
|
|
"{{API_URL}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"users",
|
|
":id"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |