Skip to main content

REST API

Read-only taosX HTTP entry points include health, version, plugins, and metric descriptions. Use the current service's /api-doc/openapi.json as the API definition. HTTP 200 means only that a request succeeded. Before state-changing operations, confirm their public scope and side effects.

Where to operate: /api-doc/openapi.json on the taosX HTTP service; an HTTP client on a controlled management host.

info

The taosX API provides auxiliary operations for data tasks. It is not the taosAdapter SQL REST API. For database management, prefer SQL Management; for daily operations, prefer taosExplorer and public taosx commands.

1. Obtain the Current Service's API Definition​

The Linux management host requires curl and Python 3. The following Bash command reads the definition and displays, in order, the OpenAPI format version, API package information, path list, and GET definition for /profile:

set -o pipefail
curl --fail --silent --show-error --connect-timeout 5 --max-time 10 \
'http://taosx-host:6050/api-doc/openapi.json' |
python3 -c 'import json, sys
api = json.load(sys.stdin)
print("OpenAPI:", api["openapi"])
print(json.dumps(api["info"], ensure_ascii=False, indent=2))
print("\n".join(sorted(api["paths"])))
print(json.dumps(api["paths"].get("/profile", {}).get("get"), ensure_ascii=False, indent=2))'

Replace the address according to the actual listener and TLS settings. This GET only reads definitions; it does not execute the operations they describe. The default package can provide JSON. Interactive Swagger UI depends on package build conditions; opening Swagger is not a prerequisite for service availability. With multiple instances, containers, or WSL forwarding on the same host, localhost alone does not identify the instance being accessed. First check version and platform with /profile in the next section, and use an explicit instance address if necessary.

Inspect request methods, path parameters, query parameters, request bodies, and responses under paths. The definition's info.version may be a component package version rather than the TDengine release version. Also check taosx --version or /profile; do not substitute component package versions such as 2.0.0 for the actual TDengine release version.

Find the required interface in the path list before checking its method. The last item in the example only displays the GET definition for /profile; it does not make that business request. Some definitions list only success statuses and descriptions without complete response fields. Do not infer request bodies, response structures, or authentication methods from that absence. If a path is missing, do not construct internal routes yourself; use this manual's explicit entry points or contact support for confirmation.

2. Common Read-Only Operational Entry Points​

Method and pathPurposeInterpretation
GET /profileCurrent taosX version and build identifiersCompare with the actual service version; not a substitute for task verification. Assess build information before sharing
GET /pluginsList unavailable plugin drivers detected by the current taosX instance and their reasonsNot a support list for all connectors; does not prove proxy-host dependencies or source permissions are satisfied
GET /metrics/descriptionMetric name descriptions, English by default, Chinese with ?lang=zhCompare with Metric Dictionary and Alert Recommendations; an existing description does not mean a current task has samples
GET /metricsCurrent process metrics in Prometheus text formatCompare by instance, task, and time; query historical data from the monitoring database
GET /healthService health responseProves only that the interface is available, not that source data reached the target

For the basis for using /metrics and /health, see Logs and Performance and Health Checks and Missing Data. They are not required to all appear in OpenAPI paths.

3. Check the Version and Plugin Issues​

Run on a management host that can access the target taosX HTTP service, replacing taosx-host. These checks target that service instance, not another taosx executable on the management host or a taosX-Agent instance. Neither request starts a collection task. Plugin checking may briefly call an OPC plugin's version command; do not use it as a high-frequency monitoring probe.

Run in Bash; requires curl and Python 3:

set -o pipefail
base='http://taosx-host:6050'
curl --fail --silent --show-error --connect-timeout 5 --max-time 10 \
"$base/profile" |
python3 -c 'import json, sys
profile = json.load(sys.stdin)
for key in ("version", "core", "commit", "build_target", "build_os"):
print(key + ":", profile.get(key))'
curl --fail --silent --show-error --connect-timeout 5 --max-time 20 \
"$base/plugins" |
python3 -c 'import json, sys
rows = json.load(sys.stdin)["unavailable"]
print("不可用驱动条目数:", len(rows))
for row in rows:
print(json.dumps(row, ensure_ascii=False))'

After HTTP 200, still check in this order:

  1. Compare version with the planned TDengine release. core is the component package version, commit is the build commit identifier, and build_target and build_os identify the platform. If versions differ, first check whether the wrong instance was accessed, then check deployment as described in Licensing and Versions.
  2. Inspect unavailable. Each item's driver is the affected driver, package is the corresponding plugin package, and reason is the reason this check failed. A plugin may affect multiple drivers; do not treat the entry count as the number of missing packages.
  3. installable=true means installing the corresponding plugin package can address the issue, not that installation has succeeded. With false, check platform restrictions first; repeated installation cannot solve them. Before installing, still confirm the package version, platform, maintenance window, and authorization.
  4. An empty list or an omitted driver means only that this check did not classify it as unavailable. It does not guarantee Java, SDKs, source permissions, or the proxy environment meet requirements, or that an actual read succeeded. Continue with the prerequisites for the connector in the Connector Selection Matrix, then verify source and target data.

/profile may also return grpc_tls_enabled. This flag does not replace TLS handshake, server identity, or complete certificate-chain verification. Plugin reasons may contain service-host paths; redact them before external submission as described in Diagnostic Packages and Support Tickets.

4. Query a Metric's Chinese Description​

To confirm the meaning of the cumulative write count, query the current service's description dictionary directly. These requests read descriptions only, not historical samples or target data:

set -o pipefail
curl --fail --silent --show-error --connect-timeout 5 --max-time 10 \
'http://taosx-host:6050/metrics/description?lang=zh' |
python3 -c 'import json, sys; print(json.load(sys.stdin)["total_written_rows"])'

lang accepts zh or en and defaults to English. Invalid values such as cn return HTTP 400. If the metric description is missing, check the status code, query parameters, and actual service version first. The Chinese and English dictionaries may not contain identical entries. If the Chinese entry is absent, use lang=en to check; a missing description does not mean a metric value of zero. For counting windows, duplicate writes, and missing-sample handling, see Metric Dictionary and Alert Recommendations. To view actual samples in the monitoring database, Grafana, or the current process, follow Logs and Performance.

5. Check Side Effects Before Other Operations​

warning

OpenAPI may include definitions for backup point queries, point browsing or file assistance, identity migration, and other operations. Some access source systems, create files, change identity privileges, or move consumption positions. Do not judge risk solely by GET/POST. In particular, “skip to end” is not for ordinary failure recovery; it affects the range of unconsumed data processed.

Descriptions of internal helpers such as file cleanup in API definitions do not mean those interfaces are stable public contracts. Before automating, confirm the interface's public scope, version, authentication, and side effects. Do not infer a public API from arbitrary browser-captured requests. This page does not invent request bodies for interfaces not formally defined.

6. Security and Troubleshooting​

Allow API access only from necessary management sources, and enable TLS and access controls according to deployment. The absence of a security field in OpenAPI does not mean unauthenticated public Internet exposure is safe. Request bodies and responses may contain DSNs, identity information, or point data; redact logs and files.

For connection failures, check listeners, DNS, TLS, and firewalls first. For HTTP errors, record the status code and response body. After HTTP 200, still inspect the business response and operation result. A request timeout does not prove the server did not execute the operation. Do not retry writes indefinitely with unknown status; first query the corresponding task or object. For support, collect a Diagnostic Package and Support Ticket, without real tokens or private keys.