项目信息

列出可用接口

GET/api.json
公开访问

访问类别:匿名 API,可携带 Token 使用独立额度

响应

200 项目及接口目录

application/json

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "build": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "description": "基础版本加 Git 构建元数据,符合 SemVer"
        },
        "gitHash": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        },
        "buildTime": {
          "type": "string",
          "format": "date-time",
          "description": "构建开始时间,UTC ISO 8601"
        }
      },
      "required": [
        "version",
        "gitHash",
        "buildTime"
      ]
    },
    "openapi": {
      "type": "string"
    },
    "docs": {
      "type": "string"
    },
    "endpoints": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "access": {
            "type": "string",
            "enum": [
              "anonymous",
              "token",
              "admin"
            ]
          }
        },
        "required": [
          "method",
          "path",
          "description",
          "category",
          "access"
        ]
      }
    }
  },
  "required": [
    "name",
    "version",
    "build",
    "openapi",
    "docs",
    "endpoints"
  ]
}
400 参数或请求格式无效

application/json

{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "issues": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string",
                "enum": [
                  "body",
                  "query",
                  "path",
                  "header"
                ]
              },
              "field": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "location",
              "field",
              "code",
              "message"
            ]
          }
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
401 凭据无效、停用、过期或缺少所需 Token

application/json

{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "issues": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string",
                "enum": [
                  "body",
                  "query",
                  "path",
                  "header"
                ]
              },
              "field": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "location",
              "field",
              "code",
              "message"
            ]
          }
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
403 需要管理员 Token

application/json

{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "issues": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string",
                "enum": [
                  "body",
                  "query",
                  "path",
                  "header"
                ]
              },
              "field": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "location",
              "field",
              "code",
              "message"
            ]
          }
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
413 请求体过大

application/json

{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "issues": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string",
                "enum": [
                  "body",
                  "query",
                  "path",
                  "header"
                ]
              },
              "field": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "location",
              "field",
              "code",
              "message"
            ]
          }
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
415 请求内容类型无效

application/json

{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "issues": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string",
                "enum": [
                  "body",
                  "query",
                  "path",
                  "header"
                ]
              },
              "field": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "location",
              "field",
              "code",
              "message"
            ]
          }
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
429 请求过于频繁,Retry-After 为建议等待秒数;匿名额度及认证保护在各 Cloudflare 地点近似计数,Token 业务额度使用 D1 原子计数

application/json

{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "issues": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string",
                "enum": [
                  "body",
                  "query",
                  "path",
                  "header"
                ]
              },
              "field": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "location",
              "field",
              "code",
              "message"
            ]
          }
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
500 内部执行失败

application/json

{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "issues": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string",
                "enum": [
                  "body",
                  "query",
                  "path",
                  "header"
                ]
              },
              "field": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "location",
              "field",
              "code",
              "message"
            ]
          }
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}

响应示例

运行命令前,将环境变量 BASE_URL 设置为站点地址。

成功响应

curl --silent --show-error -H 'User-Agent: simpleWebUtils-example/2.2.0' -H 'Accept: application/json' "$BASE_URL"'/api.json'
HTTP 200
content-type: application/json
content-encoding: gzip
cache-control: no-store

{
  "name": "oh! IT",
  "version": "2.2.0+git.6f9093533f24",
  "build": {
    "version": "2.2.0+git.6f9093533f24",
    "gitHash": "6f9093533f2452a526746ff1fa9d8b4153f804f2",
    "buildTime": "2026-11-15T07:55:25.757Z"
  },
  "openapi": "/openapi.json",
  "docs": "/docs/",
  "endpoints": [
    {
      "method": "POST",
      "path": "/base64/encode",
      "description": "将 UTF-8 文本编码为标准 Base64",
      "category": "编码转换",
      "access": "anonymous"
    },
    {
      "method": "POST",
      "path": "/base64/decode",
      "description": "将规范 Base64 解码为 UTF-8 文本",
      "category": "编码转换",
      "access": "anonymous"
    },
    {
      "method": "POST",
      "path": "/url/encode",
      "description": "URL 组件编码,空格使用 %20",
      "category": "编码转换",
      "access": "anonymous"
    },
    {
      "method": "POST",
      "path": "/url/decode",
      "description": "URL 组件解码,保留字面加号",
      "category": "编码转换",
      "access": "anonymous"
    },
    {
      "method": "POST",
      "path": "/hash",
      "description": "计算八种小写十六进制摘要",
      "category": "摘要计算",
      "access": "anonymous"
    },
    {
      "method": "POST",
      "path": "/hmac",
      "description": "计算五种 HMAC,密钥通过 JSON 请求体传入",
      "category": "摘要计算",
      "access": "anonymous"
    },
    {
      "method": "POST",
      "path": "/pbkdf2",
      "description": "使用 PBKDF2 派生十六进制密钥",
      "category": "摘要计算",
      "access": "anonymous"
    },
    {
      "method": "POST",
      "path": "/jwt/decode",
      "description": "解码 JWT,verified 固定为 false",
      "category": "JWT 解析",
      "access": "anonymous"
    },
    {
      "method": "GET",
      "path": "/time",
      "description": "转换 Unix 秒或毫秒,默认使用当前时间",
      "category": "时间与计划",
      "access": "anonymous"
    },
    {
      "method": "GET",
      "path": "/time/convert",
      "description": "按 IANA 时区换算时间",
      "category": "时间与计划",
      "access": "anonymous"
    },
    {
      "method": "GET",
      "path": "/cron",
      "description": "计算五字段 Cron 在指定 IANA 时区的后续运行时间",
      "category": "时间与计划",
      "access": "anonymous"
    },
    {
      "method": "GET",
      "path": "/cron/explain",
      "description": "把 Cron 翻译成人话并列出后续运行时间",
      "category": "时间与计划",
      "access": "anonymous"
    },
    {
      "method": "GET",
      "path": "/uuid",
      "description": "生成密码学随机 UUID v4",
      "category": "随机数据",
      "access": "anonymous"
    },
    {
      "method": "GET",
      "path": "/uuid/v7",
      "description": "生成 UUID v7",
      "category": "随机数据",
      "access": "anonymous"
    },
    {
      "method": "GET",
      "path": "/ulid",
      "description": "生成 ULID",
      "category": "随机数据",
      "access": "anonymous"
    },
    {
      "method": "GET",
      "path": "/nanoid",
      "description": "生成 URL 安全的 NanoID",
      "category": "随机数据",
      "access": "anonymous"
    },
    {
      "method": "GET",
      "path": "/snowflake/decode",
      "description": "解码 Discord 或 X 的雪花 ID",
      "category": "随机数据",
      "access": "anonymous"
    },
    {
      "method": "GET",
      "path": "/random",
      "description": "使用拒绝采样生成随机字符串",
      "category": "随机数据",
      "access": "anonymous"
    },
    {
      "method": "POST",
      "path": "/ordered-digit-solver",
      "description": "按顺序使用全部数字,同步返回首个精确解",
      "category": "数学求解",
      "access": "anonymous"
    },
    {
      "method": "POST",
      "path": "/cidr",
      "description": "计算 IPv4 或 IPv6 CIDR 地址范围",
      "category": "网络查询",
      "access
… 已截断,完整响应 17348 字符

错误示例

curl --silent --show-error -X PATCH -H 'User-Agent: simpleWebUtils-example/1.1.0' -H 'Accept: application/json' "$BASE_URL"'/api.json'
HTTP 405
content-type: application/json
content-encoding: gzip
cache-control: no-store

{
  "error": {
    "code": "METHOD_NOT_ALLOWED",
    "message": "接口不支持该请求方法"
  }
}

在线调试

Ctrl / ⌘ + Enter
调用示例
curl -X GET 'https://oit.sh/api.json'

响应

等待请求

等待发送请求

配置上方请求参数后点击「发送请求」查看实时响应

快捷键:Ctrl / ⌘ + Enter