1106 lines
34 KiB
JSON
1106 lines
34 KiB
JSON
{
|
|
"info": {
|
|
"name": "Dubai DLD Analytics API - Complete Collection",
|
|
"description": "Comprehensive Postman collection for testing all endpoints of the Dubai DLD Analytics API. Includes natural language queries, predefined endpoints, and various test scenarios.",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
|
|
"version": "2.0.0"
|
|
},
|
|
"variable": [
|
|
{
|
|
"key": "baseUrl",
|
|
"value": "http://localhost:3000",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "sessionId",
|
|
"value": "test-session-{{$randomInt}}",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"item": [
|
|
{
|
|
"name": "🏥 Health & System",
|
|
"item": [
|
|
{
|
|
"name": "Health Check",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/health",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["health"]
|
|
},
|
|
"description": "Check if the API is running and healthy"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Database Info",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/database/info",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "database", "info"]
|
|
},
|
|
"description": "Get information about database tables and record counts"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Available Queries",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/available",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "available"]
|
|
},
|
|
"description": "Get list of available predefined queries and examples"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "🔍 Natural Language Queries",
|
|
"item": [
|
|
{
|
|
"name": "Basic Rental Trend",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Give me the last 6 months rental price trend for Business Bay\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Basic rental price trend query for Business Bay"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Rental Trend - Different Area",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Give me the last 9 months rental price trend for Dubai Marina\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Rental price trend for Dubai Marina with different time period"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Top Areas for Rental Transactions",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Which area is having more rental transactions?\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Find areas with most rental transactions"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Project Summary",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Brief about the Project\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Get general project summary"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Project Summary - Specific Project",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Brief about the Project 99 park place\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Get summary for a specific project"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Fast Moving Projects",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"List of fast moving projects in last 6 months\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Find fast moving projects"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Off-Plan Uptick Areas",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Which area is seeing uptick in off-plan projects in last 6 months\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Find areas with off-plan project growth"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Commercial Leasing - Top 5",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top 5 areas for Commercial leasing and why?\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Top 5 areas for commercial leasing"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Commercial Leasing - Top 3",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top 3 areas for Commercial leasing and why?\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Top 3 areas for commercial leasing (testing dynamic number extraction)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Commercial Leasing - Top Six",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top six areas for Commercial leasing and why?\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Top six areas for commercial leasing (testing word number extraction)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Residential Leasing - Top 4",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top 4 areas for Residential leasing and why?\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Top 4 areas for residential leasing"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Residential Leasing - Top Ten",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top ten areas for Residential leasing and why?\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Top ten areas for residential leasing (testing word number extraction)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "3BHK Apartment Price Analysis",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Avg price of 3BHK apartment by area in last 6 months, group it by month. Show top 5 areas only.\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Complex query for 3BHK apartment price analysis with multi-area visualization"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "🔄 Context-Aware Follow-up Queries",
|
|
"item": [
|
|
{
|
|
"name": "Initial Query - Business Bay Trend",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Give me the last 6 months rental price trend for Business Bay\",\n \"sessionId\": \"context-session-1\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Initial query to establish context"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Follow-up - Summarise by Week",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Summarise by week\",\n \"sessionId\": \"context-session-1\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Follow-up query to change grouping to weekly"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Follow-up - Group by Month",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Group by month\",\n \"sessionId\": \"context-session-1\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Follow-up query to change grouping back to monthly"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Follow-up - Apartments Only",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Apartments only\",\n \"sessionId\": \"context-session-1\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Follow-up query to filter by apartments only"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Follow-up - Villas Only",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Villas only\",\n \"sessionId\": \"context-session-1\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Follow-up query to filter by villas only"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "📊 Predefined Query Endpoints",
|
|
"item": [
|
|
{
|
|
"name": "Rental Trend - Business Bay",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/rental-trend/business-bay",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "rental-trend", "business-bay"]
|
|
},
|
|
"description": "Get rental trend for Business Bay using predefined endpoint"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Rental Trend - Dubai Marina",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/rental-trend/dubai-marina",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "rental-trend", "dubai-marina"]
|
|
},
|
|
"description": "Get rental trend for Dubai Marina using predefined endpoint"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Rental Trend - Default Area",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/rental-trend",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "rental-trend"]
|
|
},
|
|
"description": "Get rental trend for default area (Business Bay)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Top Areas for Rentals",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/top-areas",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "top-areas"]
|
|
},
|
|
"description": "Get top areas with most rental transactions"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Project Summary",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/project-summary",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "project-summary"]
|
|
},
|
|
"description": "Get general project summary"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Commercial Leasing",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/commercial-leasing",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "commercial-leasing"]
|
|
},
|
|
"description": "Get top areas for commercial leasing"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Residential Leasing",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/residential-leasing",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "residential-leasing"]
|
|
},
|
|
"description": "Get top areas for residential leasing"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Fast Moving Projects",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/fast-moving-projects",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "fast-moving-projects"]
|
|
},
|
|
"description": "Get fast moving projects"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Off-Plan Uptick",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/offplan-uptick",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "offplan-uptick"]
|
|
},
|
|
"description": "Get areas with off-plan project growth"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Project Summary Detail",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/queries/project-summary-detail",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "queries", "project-summary-detail"]
|
|
},
|
|
"description": "Get detailed project summary"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "🧪 Advanced Test Scenarios",
|
|
"item": [
|
|
{
|
|
"name": "Complex Multi-Parameter Query",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Give me the last 12 months rental price trend for Downtown Dubai with apartments only\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Complex query with multiple parameters: area, time period, and property type"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Edge Case - Invalid Area",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Give me the last 6 months rental price trend for NonExistentArea\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test with non-existent area to see error handling"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Edge Case - Very Long Time Period",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Give me the last 24 months rental price trend for Business Bay\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test with very long time period"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Edge Case - Large Number Request",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top 20 areas for Commercial leasing and why?\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test with large number request"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Edge Case - Invalid Number Format",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top s10 areas for Commercial leasing and why?\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test with invalid number format (should fallback to default)"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Edge Case - No Number Specified",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top areas for Commercial leasing and why?\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test with no number specified (should use default 5)"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "❌ Error Handling Tests",
|
|
"item": [
|
|
{
|
|
"name": "Missing Query Parameter",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test error handling when query parameter is missing"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Empty Query",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test error handling with empty query"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Invalid JSON",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Give me the last 6 months rental price trend for Business Bay\",\n \"sessionId\": \"{{sessionId}}\"\n"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test error handling with invalid JSON"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Non-existent Endpoint",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/non-existent-endpoint",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "non-existent-endpoint"]
|
|
},
|
|
"description": "Test 404 error handling"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Wrong HTTP Method",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test error handling with wrong HTTP method"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "🚀 Performance Tests",
|
|
"item": [
|
|
{
|
|
"name": "Concurrent Requests - Same Session",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Give me the last 6 months rental price trend for Business Bay\",\n \"sessionId\": \"performance-test-session\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test concurrent requests with same session ID"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Concurrent Requests - Different Sessions",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Give me the last 6 months rental price trend for Dubai Marina\",\n \"sessionId\": \"performance-test-session-{{$randomInt}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test concurrent requests with different session IDs"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Large Response Query",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top 15 areas for Commercial leasing and why?\",\n \"sessionId\": \"{{sessionId}}\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Test with query that returns large response"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "📋 Sample Data Validation",
|
|
"item": [
|
|
{
|
|
"name": "Validate Business Bay Data",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Give me the last 6 months rental price trend for Business Bay\",\n \"sessionId\": \"validation-session\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Validate that Business Bay has data"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Validate Commercial Leasing Data",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top 5 areas for Commercial leasing and why?\",\n \"sessionId\": \"validation-session\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Validate commercial leasing data availability"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Validate Residential Leasing Data",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Top 5 areas for Residential leasing and why?\",\n \"sessionId\": \"validation-session\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Validate residential leasing data availability"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Validate Project Data",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"query\": \"Brief about the Project\",\n \"sessionId\": \"validation-session\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{baseUrl}}/api/query",
|
|
"host": ["{{baseUrl}}"],
|
|
"path": ["api", "query"]
|
|
},
|
|
"description": "Validate project data availability"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"event": [
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"// Set random session ID if not already set",
|
|
"if (!pm.collectionVariables.get('sessionId')) {",
|
|
" pm.collectionVariables.set('sessionId', 'test-session-' + Math.floor(Math.random() * 10000));",
|
|
"}"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"// Common test script for all requests",
|
|
"pm.test('Response time is less than 5000ms', function () {",
|
|
" pm.expect(pm.response.responseTime).to.be.below(5000);",
|
|
"});",
|
|
"",
|
|
"pm.test('Response has valid JSON', function () {",
|
|
" pm.response.to.be.json;",
|
|
"});",
|
|
"",
|
|
"// Test for successful responses",
|
|
"if (pm.response.code === 200) {",
|
|
" pm.test('Response is successful', function () {",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData.success).to.be.true;",
|
|
" });",
|
|
" ",
|
|
" pm.test('Response has data structure', function () {",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData).to.have.property('data');",
|
|
" });",
|
|
"}",
|
|
"",
|
|
"// Test for error responses",
|
|
"if (pm.response.code >= 400) {",
|
|
" pm.test('Error response has message', function () {",
|
|
" const jsonData = pm.response.json();",
|
|
" pm.expect(jsonData).to.have.property('message');",
|
|
" });",
|
|
"}"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|