Files
VLoop/test/account.json

138 lines
4.0 KiB
JSON
Raw Normal View History

{
"info": {
2025-12-05 14:27:26 +08:00
"name": "FeedSystem Account API",
2025-12-09 15:31:27 +08:00
"_postman_id": "e5572218-8268-4a26-9ad8-77c13c908908",
"description": "Account endpoints without automated scripts. Fill jwt_token manually after calling Login.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
2025-12-05 14:27:26 +08:00
"name": "Register Account",
"request": {
"method": "POST",
2025-12-09 15:31:27 +08:00
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
2025-12-07 16:49:41 +08:00
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}"
},
"url": {
2025-12-05 14:27:26 +08:00
"raw": "{{host}}/account/register",
"host": ["{{host}}"],
2025-12-05 14:27:26 +08:00
"path": ["account", "register"]
}
}
},
{
2025-12-07 16:49:41 +08:00
"name": "Login",
"request": {
"method": "POST",
2025-12-09 15:31:27 +08:00
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
2025-12-07 16:49:41 +08:00
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}"
},
"url": {
2025-12-07 16:49:41 +08:00
"raw": "{{host}}/account/login",
"host": ["{{host}}"],
2025-12-07 16:49:41 +08:00
"path": ["account", "login"]
}
}
},
{
"name": "Change Password",
"request": {
"method": "POST",
2025-12-09 15:31:27 +08:00
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
2025-12-07 16:49:41 +08:00
"raw": "{\n \"username\": \"{{username}}\",\n \"old_password\": \"{{password}}\",\n \"new_password\": \"{{newPassword}}\"\n}"
},
"url": {
2025-12-05 14:27:26 +08:00
"raw": "{{host}}/account/changePassword",
"host": ["{{host}}"],
2025-12-05 14:27:26 +08:00
"path": ["account", "changePassword"]
}
}
},
{
2025-12-05 14:27:26 +08:00
"name": "Find Account By ID",
"request": {
"method": "POST",
2025-12-09 15:31:27 +08:00
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
2025-12-07 16:49:41 +08:00
"raw": "{\n \"id\": {{accountId}}\n}"
},
"url": {
2025-12-05 14:27:26 +08:00
"raw": "{{host}}/account/findByID",
"host": ["{{host}}"],
2025-12-05 14:27:26 +08:00
"path": ["account", "findByID"]
}
}
},
{
2025-12-05 14:27:26 +08:00
"name": "Find Account By Username",
"request": {
"method": "POST",
2025-12-09 15:31:27 +08:00
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
2025-12-07 16:49:41 +08:00
"raw": "{\n \"username\": \"{{username}}\"\n}"
},
"url": {
2025-12-05 14:27:26 +08:00
"raw": "{{host}}/account/findByUsername",
"host": ["{{host}}"],
2025-12-05 14:27:26 +08:00
"path": ["account", "findByUsername"]
}
}
2025-12-07 16:49:41 +08:00
},
{
"name": "Rename Account (JWT protected)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" },
{ "key": "Authorization", "value": "Bearer {{jwt_token}}" }
],
"body": {
"mode": "raw",
"raw": "{\n \"id\": {{accountId}},\n \"new_username\": \"{{newUsername}}\"\n}"
},
"url": {
"raw": "{{host}}/account/rename",
"host": ["{{host}}"],
"path": ["account", "rename"]
}
}
},
{
"name": "Logout (JWT protected)",
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" },
{ "key": "Authorization", "value": "Bearer {{jwt_token}}" }
],
"body": {
"mode": "raw",
"raw": "{\n \"id\": {{accountId}}\n}"
},
"url": {
"raw": "{{host}}/account/logout",
"host": ["{{host}}"],
"path": ["account", "logout"]
}
}
}
],
"variable": [
2025-12-07 16:49:41 +08:00
{ "key": "host", "value": "http://localhost:8080" },
{ "key": "username", "value": "alice" },
{ "key": "password", "value": "pass123" },
{ "key": "newPassword", "value": "newpass456" },
{ "key": "newUsername", "value": "alice_new" },
{ "key": "accountId", "value": "1" },
{ "key": "jwt_token", "value": "" }
]
}