本文档介绍了 WordPress 站点健康测试的架构和 REST API 端点,用于检索特定测试记录。它定义了测试记录中的字段,包括测试名称、状态、描述等,并提供了多个示例请求。
GET /wp-site-health/v1/tests/background-updates
$ curl https://example.com/wp-json/wp-site-health/v1/tests/background-updates The schema defines all the fields that exist within a wp site health test record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.
test
|
The name of the test being run.
JSON data type: string Read only Context: |
label
|
A label describing the test.
JSON data type: string Read only Context: |
status
|
The status of the test.
JSON data type: string Read only Context: One of: |
badge
|
The category this test is grouped in.
JSON data type: object Read only Context: |
description
|
A more descriptive explanation of what the test looks for, and why it is important for the user.
JSON data type: string Read only Context: |
actions
|
HTML containing an action to direct the user to where they can resolve the issue.
JSON data type: string Read only Context: |
GET /wp-site-health/v1/tests/background-updates
Query this endpoint to retrieve a specific wp site health test record.
$ curl https://example.com/wp-json/wp-site-health/v1/tests/background-updates
GET /wp-site-health/v1/tests/loopback-requests
Query this endpoint to retrieve a specific wp site health test record.
$ curl https://example.com/wp-json/wp-site-health/v1/tests/loopback-requests
GET /wp-site-health/v1/tests/https-status
Query this endpoint to retrieve a specific wp site health test record.
$ curl https://example.com/wp-json/wp-site-health/v1/tests/https-status
GET /wp-site-health/v1/tests/dotorg-communication
Query this endpoint to retrieve a specific wp site health test record.
$ curl https://example.com/wp-json/wp-site-health/v1/tests/dotorg-communication
GET /wp-site-health/v1/tests/authorization-header
Query this endpoint to retrieve a specific wp site health test record.
$ curl https://example.com/wp-json/wp-site-health/v1/tests/authorization-header