corrad-af-2024/docs/postman_collection.json

1151 lines
40 KiB
JSON

{
"info": {
"name": "Corrad AF 2024 API Platform",
"description": "Complete API collection for the Corrad AF 2024 API Platform project",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"version": "1.0.0"
},
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:3000",
"description": "Base URL for the API"
},
{
"key": "accessToken",
"value": "",
"description": "Access token for authenticated requests"
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"item": [
{
"name": "Authentication",
"description": "Authentication and authorization endpoints",
"item": [
{
"name": "Login",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"username\": \"admin\",\n \"password\": \"password123\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/auth/login",
"host": ["{{baseUrl}}"],
"path": ["api", "auth", "login"]
},
"description": "Authenticate user and receive access/refresh tokens"
},
"response": []
},
{
"name": "Logout",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/auth/logout",
"host": ["{{baseUrl}}"],
"path": ["api", "auth", "logout"]
},
"description": "Logout user and clear authentication cookies"
},
"response": []
},
{
"name": "Validate Token",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/auth/validate",
"host": ["{{baseUrl}}"],
"path": ["api", "auth", "validate"]
},
"description": "Validate current authentication token"
},
"response": []
}
]
},
{
"name": "Business Logic",
"description": "Core business functionality endpoints",
"item": [
{
"name": "Analyze Asnaf Profile",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"monthlyIncome\": \"2000\",\n \"otherIncome\": \"500\",\n \"totalIncome\": \"2500\",\n \"occupation\": \"Clerk\",\n \"maritalStatus\": \"Married\",\n \"dependents\": [\n {\"name\": \"Child 1\", \"age\": 10},\n {\"name\": \"Child 2\", \"age\": 8}\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/api/analyze-asnaf",
"host": ["{{baseUrl}}"],
"path": ["api", "analyze-asnaf"]
},
"description": "Analyze Asnaf profile using AI/OpenAI integration to determine eligibility and assistance recommendations"
},
"response": []
}
]
},
{
"name": "API Platform",
"description": "API platform and proxy endpoints",
"item": [
{
"name": "Send HTTP Request",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"url\": \"https://api.example.com/users\",\n \"method\": \"GET\",\n \"headers\": [\n {\"key\": \"Content-Type\", \"value\": \"application/json\", \"active\": true}\n ],\n \"params\": [\n {\"key\": \"page\", \"value\": \"1\", \"active\": true}\n ],\n \"auth\": {\n \"type\": \"bearer\",\n \"bearer\": \"your-token-here\"\n },\n \"requestBody\": {\n \"type\": \"none\"\n },\n \"timeout\": 30000\n}"
},
"url": {
"raw": "{{baseUrl}}/api/api-platform/send-request",
"host": ["{{baseUrl}}"],
"path": ["api", "api-platform", "send-request"]
},
"description": "Proxy HTTP requests through the platform with authentication and request/response handling"
},
"response": []
},
{
"name": "OAuth2 - Client Credentials",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"client_id\": \"your-client-id\",\n \"client_secret\": \"your-client-secret\",\n \"grant_type\": \"client_credentials\",\n \"scope\": \"read write\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/api-platform/oauth2/client-credentials",
"host": ["{{baseUrl}}"],
"path": ["api", "api-platform", "oauth2", "client-credentials"]
},
"description": "Obtain OAuth2 access token using client credentials flow"
},
"response": []
},
{
"name": "OAuth2 - Exchange Code",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"code\": \"authorization-code\",\n \"client_id\": \"your-client-id\",\n \"client_secret\": \"your-client-secret\",\n \"redirect_uri\": \"https://your-app.com/callback\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/api-platform/oauth2/exchange-code",
"host": ["{{baseUrl}}"],
"path": ["api", "api-platform", "oauth2", "exchange-code"]
},
"description": "Exchange authorization code for access token in OAuth2 flow"
},
"response": []
}
]
},
{
"name": "Metabase Integration",
"description": "Analytics and reporting integration",
"item": [
{
"name": "Get Metabase Token",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/metabase/token",
"host": ["{{baseUrl}}"],
"path": ["api", "metabase", "token"]
},
"description": "Get authentication token for Metabase integration"
},
"response": []
}
]
},
{
"name": "Development Tools",
"description": "Development and administrative tools",
"item": [
{
"name": "User Management",
"description": "User CRUD operations for development",
"item": [
{
"name": "List Users",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/user/list",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "user", "list"]
},
"description": "Get list of all users (excluding deleted)"
},
"response": []
},
{
"name": "Add User",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"userUsername\": \"newuser\",\n \"userFullName\": \"New User\",\n \"userEmail\": \"newuser@example.com\",\n \"userPhone\": \"+1234567890\",\n \"userPassword\": \"password123\",\n \"roles\": [\"user\"]\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/user/add",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "user", "add"]
},
"description": "Create a new user"
},
"response": []
},
{
"name": "Edit User",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"userID\": \"user-id-here\",\n \"userFullName\": \"Updated User Name\",\n \"userEmail\": \"updated@example.com\",\n \"userPhone\": \"+1234567891\",\n \"roles\": [\"user\", \"admin\"]\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/user/edit",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "user", "edit"]
},
"description": "Update existing user"
},
"response": []
},
{
"name": "Delete User",
"request": {
"method": "DELETE",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"userID\": \"user-id-here\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/user/delete",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "user", "delete"]
},
"description": "Soft delete user (mark as deleted)"
},
"response": []
}
]
},
{
"name": "Role Management",
"description": "Role CRUD operations for development",
"item": [
{
"name": "List Roles",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/role/list",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "role", "list"]
},
"description": "Get list of all roles"
},
"response": []
},
{
"name": "Add Role",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"roleName\": \"new-role\",\n \"roleDescription\": \"Description of the new role\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/role/add",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "role", "add"]
},
"description": "Create a new role"
},
"response": []
},
{
"name": "Edit Role",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"roleID\": \"role-id-here\",\n \"roleName\": \"updated-role\",\n \"roleDescription\": \"Updated description\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/role/edit",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "role", "edit"]
},
"description": "Update existing role"
},
"response": []
},
{
"name": "Delete Role",
"request": {
"method": "DELETE",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"roleID\": \"role-id-here\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/role/delete",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "role", "delete"]
},
"description": "Delete role"
},
"response": []
}
]
},
{
"name": "Menu Management",
"description": "Navigation menu management for development",
"item": [
{
"name": "Get User Menu List",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/menu/user-list",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "menu", "user-list"]
},
"description": "Get menu items for users"
},
"response": []
},
{
"name": "Get Role Menu List",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/menu/role-list",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "menu", "role-list"]
},
"description": "Get menu items for roles"
},
"response": []
},
{
"name": "Add Menu Item",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"title\": \"New Menu Item\",\n \"path\": \"/new-path\",\n \"icon\": \"icon-name\",\n \"parent\": null,\n \"order\": 1\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/menu/add",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "menu", "add"]
},
"description": "Add new menu item"
},
"response": []
},
{
"name": "Edit Menu Item",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"id\": \"menu-id\",\n \"title\": \"Updated Menu Item\",\n \"path\": \"/updated-path\",\n \"icon\": \"updated-icon\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/menu/edit",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "menu", "edit"]
},
"description": "Edit existing menu item"
},
"response": []
},
{
"name": "Delete Menu Item",
"request": {
"method": "DELETE",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"id\": \"menu-id\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/menu/delete",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "menu", "delete"]
},
"description": "Delete menu item"
},
"response": []
},
{
"name": "Overwrite Navigation",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"navigation\": [\n {\n \"title\": \"Dashboard\",\n \"path\": \"/dashboard\",\n \"icon\": \"dashboard\"\n }\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/menu/overwrite-navigation",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "menu", "overwrite-navigation"]
},
"description": "Overwrite entire navigation structure"
},
"response": []
},
{
"name": "New Add Menu",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/menu/new-add",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "menu", "new-add"]
},
"description": "New add menu functionality"
},
"response": []
}
]
},
{
"name": "ORM & Database",
"description": "Database and ORM management tools",
"item": [
{
"name": "Get Database Schema",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/orm/schema",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "orm", "schema"]
},
"description": "Get database schema information"
},
"response": []
},
{
"name": "Access ORM Studio",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/orm/studio",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "orm", "studio"]
},
"description": "Access ORM studio interface"
},
"response": []
},
{
"name": "Get Table Data",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/orm/data/get?table=users&limit=10",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "orm", "data", "get"],
"query": [
{
"key": "table",
"value": "users"
},
{
"key": "limit",
"value": "10"
}
]
},
"description": "Get data from specific table"
},
"response": []
},
{
"name": "Get Table Configuration",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/orm/table/config",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "orm", "table", "config"]
},
"description": "Get table configuration settings"
},
"response": []
},
{
"name": "Create Table",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"tableName\": \"new_table\",\n \"columns\": [\n {\n \"name\": \"id\",\n \"type\": \"INTEGER\",\n \"primaryKey\": true,\n \"autoIncrement\": true\n },\n {\n \"name\": \"name\",\n \"type\": \"VARCHAR\",\n \"length\": 255,\n \"nullable\": false\n }\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/orm/table/create",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "orm", "table", "create"]
},
"description": "Create new database table"
},
"response": []
},
{
"name": "Get Table Modification Info",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/orm/table/modify/get?table=users",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "orm", "table", "modify", "get"],
"query": [
{
"key": "table",
"value": "users"
}
]
},
"description": "Get table structure for modification"
},
"response": []
},
{
"name": "Modify Table",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"tableName\": \"users\",\n \"modifications\": {\n \"addColumns\": [\n {\n \"name\": \"new_field\",\n \"type\": \"VARCHAR\",\n \"length\": 100\n }\n ],\n \"dropColumns\": [\"old_field\"],\n \"modifyColumns\": [\n {\n \"name\": \"existing_field\",\n \"type\": \"TEXT\"\n }\n ]\n }\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/orm/table/modify",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "orm", "table", "modify"]
},
"description": "Modify existing table structure"
},
"response": []
},
{
"name": "Delete Table",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/orm/table/delete/table_name",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "orm", "table", "delete", "table_name"]
},
"description": "Delete table by name (dynamic route)"
},
"response": []
}
]
},
{
"name": "Configuration Management",
"description": "Application configuration and settings",
"item": [
{
"name": "Site Settings",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/config/site-settings",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "config", "site-settings"]
},
"description": "Get/manage site settings"
},
"response": []
},
{
"name": "Environment Variables",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/config/env",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "config", "env"]
},
"description": "Get environment configuration"
},
"response": []
},
{
"name": "Upload File",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": []
},
{
"key": "destination",
"value": "uploads/",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/api/devtool/config/upload-file",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "config", "upload-file"]
},
"description": "Upload file to server"
},
"response": []
},
{
"name": "Loading Logo",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/config/loading-logo",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "config", "loading-logo"]
},
"description": "Get/set loading logo configuration"
},
"response": []
},
{
"name": "Add Custom Theme",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"themeName\": \"custom-theme\",\n \"colors\": {\n \"primary\": \"#007bff\",\n \"secondary\": \"#6c757d\",\n \"success\": \"#28a745\",\n \"danger\": \"#dc3545\"\n },\n \"fonts\": {\n \"primary\": \"Arial, sans-serif\",\n \"heading\": \"Georgia, serif\"\n }\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/config/add-custom-theme",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "config", "add-custom-theme"]
},
"description": "Add custom theme configuration"
},
"response": []
}
]
},
{
"name": "API Management Tools",
"description": "API development and testing tools",
"item": [
{
"name": "List APIs",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/api/list",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "api", "list"]
},
"description": "List all available APIs"
},
"response": []
},
{
"name": "Save API",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"apiName\": \"new-api\",\n \"endpoint\": \"/api/new-endpoint\",\n \"method\": \"GET\",\n \"description\": \"New API endpoint\",\n \"parameters\": [],\n \"responses\": {}\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/api/save",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "api", "save"]
},
"description": "Save API configuration"
},
"response": []
},
{
"name": "API Linter",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"code\": \"const example = 'API code to lint';\",\n \"language\": \"javascript\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/api/linter",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "api", "linter"]
},
"description": "Lint API code for errors and best practices"
},
"response": []
},
{
"name": "Format Code (Prettier)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"code\": \"const unformatted={a:1,b:2};\",\n \"language\": \"javascript\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/api/prettier-format",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "api", "prettier-format"]
},
"description": "Format code using Prettier"
},
"response": []
},
{
"name": "Get File Code",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/api/file-code?file=server/api/example.js",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "api", "file-code"],
"query": [
{
"key": "file",
"value": "server/api/example.js"
}
]
},
"description": "Get source code of API file"
},
"response": []
}
]
},
{
"name": "Content Management",
"description": "Content and template management tools",
"item": [
{
"name": "Template Management",
"description": "Template operations",
"item": [
{
"name": "Get Template List",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/content/template/get-list",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "content", "template", "get-list"]
},
"description": "Get list of available templates"
},
"response": []
},
{
"name": "List Templates",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/content/template/list",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "content", "template", "list"]
},
"description": "List all templates"
},
"response": []
},
{
"name": "Import Template",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"templateName\": \"imported-template\",\n \"templateContent\": \"<template>...</template>\",\n \"templateType\": \"vue\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/content/template/import",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "content", "template", "import"]
},
"description": "Import template"
},
"response": []
},
{
"name": "Template Tags",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/content/template/tag",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "content", "template", "tag"]
},
"description": "Get template tags"
},
"response": []
}
]
},
{
"name": "Code Management",
"description": "Code editing and management",
"item": [
{
"name": "Get File Code",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/content/code/file-code?file=components/example.vue",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "content", "code", "file-code"],
"query": [
{
"key": "file",
"value": "components/example.vue"
}
]
},
"description": "Get source code of file"
},
"response": []
},
{
"name": "Save Code",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"file\": \"components/example.vue\",\n \"content\": \"<template>...</template>\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/content/code/save",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "content", "code", "save"]
},
"description": "Save code to file"
},
"response": []
},
{
"name": "Code Linter",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"code\": \"<template><div>Hello World</div></template>\",\n \"language\": \"vue\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/content/code/linter",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "content", "code", "linter"]
},
"description": "Lint code for errors"
},
"response": []
},
{
"name": "Format Code (Prettier)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"code\": \"<template><div>Unformatted</div></template>\",\n \"language\": \"vue\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/devtool/content/code/prettier-format",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "content", "code", "prettier-format"]
},
"description": "Format code using Prettier"
},
"response": []
}
]
},
{
"name": "Canvas Management",
"description": "Visual canvas tools",
"item": [
{
"name": "Canvas File Code",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/content/canvas/file-code?canvas=main-canvas",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "content", "canvas", "file-code"],
"query": [
{
"key": "canvas",
"value": "main-canvas"
}
]
},
"description": "Get canvas file code"
},
"response": []
}
]
}
]
},
{
"name": "Lookup Data",
"description": "Lookup and reference data",
"item": [
{
"name": "List Lookup Data",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/devtool/lookup/list",
"host": ["{{baseUrl}}"],
"path": ["api", "devtool", "lookup", "list"]
},
"description": "Get lookup data list"
},
"response": []
}
]
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
"// Auto-set authorization header if token exists",
"if (pm.collectionVariables.get('accessToken')) {",
" pm.request.headers.add({",
" key: 'Authorization',",
" value: 'Bearer ' + pm.collectionVariables.get('accessToken')",
" });",
"}"
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"// Auto-save access token from login response",
"if (pm.info.requestName === 'Login' && pm.response.code === 200) {",
" const response = pm.response.json();",
" if (response.data && response.data.accessToken) {",
" pm.collectionVariables.set('accessToken', response.data.accessToken);",
" }",
"}",
"",
"// Log response time",
"console.log('Response time: ' + pm.response.responseTime + 'ms');"
]
}
}
]
}