Scenic Routes
Scenic Routes · GPT 작업
COMPASS-GPT
POST /v1/routesCalculateScenicRouteThis endpoint calculates the most scenic route from one location to another.
원본 API 스키마
{
"openapi": "3.0.1",
"info": {
"title": "COMPASS-GPT",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.compassmaps.ai"
}
],
"paths": {
"/v1/routes": {
"post": {
"description": "This endpoint calculates the most scenic route from one location to another.",
"operationId": "CalculateScenicRoute",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"from": {
"$ref": "#/components/schemas/Route"
},
"to": {
"$ref": "#/components/schemas/Route"
}
},
"required": [
"from",
"to"
]
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RouteResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Route": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"format": "double",
"example": -123.35
},
"longitude": {
"type": "number",
"format": "double",
"example": 12.123
},
"city": {
"type": "string",
"example": "San Francisco"
}
},
"required": [
"latitude",
"longitude",
"city"
]
},
"RouteResponse": {
"type": "object",
"properties": {
"metadata": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"example": "86E534F4-3B3E-479D-8C0A-E06B02B173E7"
},
"is_pro_user": {
"type": "string",
"example": "false"
},
"timestamp": {
"type": "string",
"example": "1706272503765"
}
}
},
"from": {
"$ref": "#/components/schemas/Route"
},
"to": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"format": "double"
},
"longitude": {
"type": "number",
"format": "double"
},
"city": {
"type": "string"
},
"distance": {
"type": "number",
"format": "double",
"example": 1767866.22
}
},
"required": [
"latitude",
"longitude",
"city",
"distance"
]
},
"waypoints": {
"type": "array",
"items": {
"type": "object",
"properties": {
"score": {
"type": "integer",
"example": 100
},
"distance": {
"type": "number",
"format": "double"
},
"latitude": {
"type": "number",
"format": "double"
},
"longitude": {
"type": "number",
"format": "double"
},
"city": {
"type": "string"
},
"likelihood": {
"type": "integer",
"example": 3
}
}
}
},
"gmap_url": {
"type": "string",
"format": "uri",
"example": "http://maps.google.com/maps?saddr=36.9913715,-110.1938672&daddr=36.98908898571776,-110.12956339383143+to:36.119245,-115.1725682+to:34.010021,-118.49583+to:37.7433333,-119.5758333+to:37.8197220496192,-122.478610889752+to:40.2367529,-123.8234456+to:42.869794085022875,-122.16953359652126+to:47.97,-123.432899+to:48.6162807,-113.8594034+to:44.98,-110.7+to:43.7852978,-110.6966589+to:44.5869295,-104.7066808+to:43.875419,-103.4531437+to:38.6255000392716,-90.184999824976+to:38.6248848,-90.1858982&dirflg=dhf"
}
}
}
}
}
}