# API文档

SmartPing所有的数据均可以通过各点的程序通过HTTP方式获取（SmartPing Dashbord数据的展示同样调用以上接口获取），SmartPing的API接口均以打开Access-Control-Allow-Origin:\*支持跨域。

| **名称**                                                | **METHOD** | **URI**            | **介绍**                  |
| ----------------------------------------------------- | ---------- | ------------------ | ----------------------- |
| [当前节点配置信息](https://docs.smartping.org/api/config)     | GET        | /api/config.json   | 获取当前节点的配置信息             |
| [PING目标机器数据](https://docs.smartping.org/api/ping)     | GET        | /api/ping.json     | 获取当前节点对外的PING数据         |
| [PING目标机器状态](https://docs.smartping.org/api/topology) | GET        | /api/topology.json | 获取当前节点PING外部的状态数据（用于拓扑） |
| [PING目标机器报警数据](https://docs.smartping.org/api/alert)  | GET        | /api/alert.json    | 获取当前的报警数据               |
| [PING全国延迟](https://docs.smartping.org/api/mapping)    | GET        | /api/mapping.json  | 获取当前机器全国延迟数据            |
| [PING工具](https://docs.smartping.org/api/tools)        | GET        | /api/tools.json    | 测试目标机器获取数据              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.smartping.org/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
