Files
cf-ip-geo/api-docs/geoip-api.json
2026-06-24 22:10:25 +08:00

88 lines
2.6 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"info": {
"name": "geoip-api",
"_postman_id": "c4f8a1e2-9b7d-4e3c-a1f0-2d8e6b4c9a10",
"description": "Postman Collection v2.1 — Cloudflare Workers 访客公网 IP 与 `request.cf` 地理/网络信息。\n\n导入Postman「Import」或 Apifox「导入」→ Postman 格式。\n仅使用集合变量 `baseUrl`(默认生产),不附带环境文件,避免与环境变量叠用冲突。\n`GET /api`、`/ipv4`、`/ipv6` 可查 `pretty=1` 美化 JSON。",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{
"key": "baseUrl",
"value": "https://geoip.api.smyhub.com",
"type": "string"
}
],
"item": [
{
"name": "page",
"item": [
{
"name": "GET /",
"request": {
"method": "GET",
"header": [],
"url": "{{baseUrl}}/",
"description": "首页 HTML含 `/api?pretty=1` 示例脚本)。"
},
"response": []
}
]
},
{
"name": "api",
"item": [
{
"name": "GET /api",
"request": {
"method": "GET",
"header": [],
"url": "{{baseUrl}}/api",
"description": "JSON`ip`、`ipVersion`、`userAgent`、`geo`、`network`、`ts`。"
},
"response": []
},
{
"name": "GET /api?pretty=1",
"request": {
"method": "GET",
"header": [],
"url": "{{baseUrl}}/api?pretty=1",
"description": "同上,缩进格式化输出。"
},
"response": []
},
{
"name": "GET /ipv4",
"request": {
"method": "GET",
"header": [],
"url": "{{baseUrl}}/ipv4",
"description": "仅当连接经 IPv4 到达边缘时 `ok: true`,否则 400。可 `?pretty=1`。"
},
"response": []
},
{
"name": "GET /ipv6",
"request": {
"method": "GET",
"header": [],
"url": "{{baseUrl}}/ipv6",
"description": "仅当连接经 IPv6 到达边缘时 `ok: true`,否则 400。可 `?pretty=1`。"
},
"response": []
},
{
"name": "OPTIONS /api",
"request": {
"method": "OPTIONS",
"header": [],
"url": "{{baseUrl}}/api",
"description": "CORS 预检;响应 204 + `Access-Control-*`。"
},
"response": []
}
]
}
]
}