接口参考
本页由 OpenAPI 规范自动生成,请勿手工修改。规范文件: openapi.yaml
OpenAPI 3.1.0 · Cloud.me Test API 1.0.0
GET /api/v1/account
The signed-in user's profile
响应
200OKdefaultError
PATCH /api/v1/account
Change language, time zone, display name or theme
请求体:UpdateAccountRequest
响应
200OKdefaultError
GET /api/v1/account/api-keys
List the API keys
响应
200OKdefaultError
POST /api/v1/account/api-keys
Create an API key (shown once)
请求体:CreateAPIKeyRequest
响应
201CreateddefaultError
DELETE /api/v1/account/api-keys/{id}
Revoke an API key
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
响应
204No ContentdefaultError
GET /api/v1/account/appeals
The caller's appeals
响应
200OKdefaultError
POST /api/v1/account/appeals
Appeal against withheld or clawed-back credits
请求体:AppealRequest
响应
201CreateddefaultError
GET /api/v1/account/community/profile
Thanks page settings
响应
200OKdefaultError
PUT /api/v1/account/community/profile
Change thanks page settings
请求体:CommunityProfile
响应
200OKdefaultError
GET /api/v1/account/credits
Test credit balance and ledger, newest first
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
limit | query | 否 | |
cursor | query | 否 | next_cursor of the previous page |
kind | query | 否 | |
status | query | 否 |
响应
200OKdefaultError
GET /api/v1/account/credits/export
Export the whole test credit ledger as CSV (UTF-8 with BOM)
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
kind | query | 否 | |
status | query | 否 |
响应
200CSV filedefaultError
POST /api/v1/account/delete
Delete the account (personal data is removed, tests become anonymous)
请求体:ConfirmRequest
响应
204No ContentdefaultError
POST /api/v1/account/email/change
Ask to change the email address; a confirmation link goes to the new one
请求体:ChangeEmailRequest
响应
202AccepteddefaultError
POST /api/v1/account/email/confirm
Confirm the new email address with the emailed token
请求体:TokenRequest
响应
204No ContentdefaultError
GET /api/v1/account/identities
Sign-in methods: password, linked Google account
响应
200OKdefaultError
DELETE /api/v1/account/identities/google
Unlink the Google account (only with a password set)
请求体:ConfirmRequest
响应
204No ContentdefaultError
POST /api/v1/account/identities/google/link
Start linking a Google account
Returns Google's authorization URL; navigate the browser there. The round trip must end in this session.
请求体:GoogleLinkStartRequest
响应
200OKdefaultError
POST /api/v1/account/mfa/disable
Turn two-step verification off
响应
204No ContentdefaultError
POST /api/v1/account/mfa/enable
Turn two-step verification on and get the recovery codes
请求体:ConfirmRequest
响应
200OKdefaultError
POST /api/v1/account/node-tokens
Get the install token of a community node
请求体:NodeTokenRequest
响应
201CreateddefaultError
GET /api/v1/account/nodes
The caller's nodes: status, reliability, scarcity, credits (about three hours behind), limits
响应
200OKdefaultError
PATCH /api/v1/account/nodes/{id}
Pause or resume a node, or change its limits
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
请求体:UpdateNodeRequest
响应
200OKdefaultError
POST /api/v1/account/passkeys/register/begin
Start adding a passkey
请求体:ConfirmRequest
响应
200OKdefaultError
POST /api/v1/account/passkeys/register/finish
Finish adding a passkey
请求体:PasskeyFinishRequest
响应
201CreateddefaultError
PATCH /api/v1/account/passkeys/{id}
Rename a passkey
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
请求体:PasskeyRenameRequest
响应
200OKdefaultError
DELETE /api/v1/account/passkeys/{id}
Delete a passkey
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
请求体:ConfirmRequest
响应
204No ContentdefaultError
POST /api/v1/account/password
Change the password
请求体:ChangePasswordRequest
响应
204No ContentdefaultError
POST /api/v1/account/recovery-codes/regenerate
Replace the recovery codes
响应
200OKdefaultError
GET /api/v1/account/referral
Invitation link
响应
200OKdefaultError
POST /api/v1/account/referral/claim
Name the inviter of this new account (within claim_days of signing up, see get-referral)
请求体:ReferralClaim
响应
204No ContentdefaultError
GET /api/v1/account/security
Passkeys, two-step verification and recovery code status
响应
200OKdefaultError
GET /api/v1/account/sessions
Recent sign-ins
响应
200OKdefaultError
GET /api/v1/alerts
List the alerts of the caller's monitors, newest first
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
monitor_id | query | 否 | |
state | query | 否 | Only alerts in this state; absent: both |
cursor | query | 否 | |
limit | query | 否 | Page size; 0 or absent: 50, at most 200 |
响应
200OKdefaultError
GET /api/v1/announcements
Site notices in force
响应
200OKdefaultError
POST /api/v1/auth/login
Sign in with email and password
请求体:LoginRequest
响应
200OKdefaultError
POST /api/v1/auth/logout
Sign out
响应
204No ContentdefaultError
POST /api/v1/auth/mfa/begin
Start the passkey step of signing in
响应
200OKdefaultError
POST /api/v1/auth/mfa/finish
Finish the passkey step of signing in
请求体:MFAFinishRequest
响应
200OKdefaultError
POST /api/v1/auth/mfa/recovery
Finish signing in with a recovery code
请求体:RecoveryLoginRequest
响应
200OKdefaultError
GET /api/v1/auth/oauth/google/callback
Google sends the browser back here
Not for API clients. Always answers 302 to the page /account/oauth-result with the outcome in the fragment: result=signed_in|signed_up|mfa_pending|linked, or error=<code> and reason=<reason>; return_to when known.
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
code | query | 否 | Authorization code from Google |
state | query | 否 | |
error | query | 否 | Set by Google when the user cancelled |
响应
302FounddefaultError
POST /api/v1/auth/oauth/google/start
Start signing in (or up) with Google
Returns Google's authorization URL; navigate the browser there. Sets a cookie that binds the round trip (10 minutes) to this browser.
请求体:GoogleLoginStartRequest
响应
200OKdefaultError
POST /api/v1/auth/password/forgot
Email a password reset link
请求体:ForgotPasswordRequest
响应
202AccepteddefaultError
POST /api/v1/auth/password/reset
Set a new password with the emailed token
请求体:ResetPasswordRequest
响应
204No ContentdefaultError
POST /api/v1/auth/reauth/begin
Start a passkey re-verification for sensitive actions
响应
200OKdefaultError
POST /api/v1/auth/reauth/email/begin
Email a re-verification code (accounts without a password or two-step verification)
Answer to reauth_required with details.method = email. The 6-digit code works for 10 minutes, once, with at most 5 attempts, in this session only.
响应
200OKdefaultError
POST /api/v1/auth/reauth/email/finish
Finish the emailed re-verification (valid for 5 minutes)
请求体:ReauthCodeRequest
响应
200OKdefaultError
POST /api/v1/auth/reauth/finish
Finish the passkey re-verification (valid for 5 minutes)
请求体:MFAFinishRequest
响应
200OKdefaultError
POST /api/v1/auth/register
Create an account and send the verification email
请求体:RegisterRequest
响应
202AccepteddefaultError
POST /api/v1/auth/resend-verification
Send the verification email again
响应
202AccepteddefaultError
POST /api/v1/auth/verify-email
Confirm the email address with the emailed token
请求体:TokenRequest
响应
204No ContentdefaultError
POST /api/v1/ban-appeals
File a banned account's appeal (the token is used up; rate_limited during the cooldown after a rejection)
请求体:BanAppealRequest
响应
201CreateddefaultError
POST /api/v1/ban-appeals/link
Mail a banned account a new appeal link (always 204)
请求体:AppealLinkRequest
响应
204No ContentdefaultError
POST /api/v1/ban-appeals/status
State of a banned account's appeal (token of the emailed link; a used one still works until it expires)
请求体:BanAppealStatusRequest
响应
200OKdefaultError
GET /api/v1/channels
List notification channels
响应
200OKdefaultError
POST /api/v1/channels
Add a notification channel
请求体:ChannelRequest
响应
201CreateddefaultError
PATCH /api/v1/channels/{id}
Change a notification channel
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
请求体:ChannelUpdate
响应
200OKdefaultError
DELETE /api/v1/channels/{id}
Delete a notification channel
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
响应
204No ContentdefaultError
POST /api/v1/channels/{id}/test
Send a test notification
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
响应
200OKdefaultError
POST /api/v1/channels/{id}/verification
Email a new verification code to an email channel
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
响应
202AccepteddefaultError
POST /api/v1/channels/{id}/verify
Verify an email channel with its code
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
请求体:ChannelVerifyRequest
响应
200OKdefaultError
GET /api/v1/community/gaps
Gap heat map: scarcity coefficient of every location; top lists the ten scarcest
响应
200OKdefaultError
GET /api/v1/community/gaps/{key}/history
Hourly scarcity coefficient of one location over 30 days
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
key | path | 是 | Location key, URL-encoded (CN-GD%7Ctelecom) |
响应
200OKdefaultError
GET /api/v1/community/reports
Months with a community report
响应
200OKdefaultError
GET /api/v1/community/reports/{month}
Monthly community report
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
month | path | 是 |
响应
200OKdefaultError
GET /api/v1/community/thanks
Thanks page
响应
200OKdefaultError
GET /api/v1/monitors
List the caller's monitors and free allowance
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
cursor | query | 否 | |
limit | query | 否 |
响应
200OKdefaultError
POST /api/v1/monitors
Create a monitor
请求体:MonitorRequest
响应
201CreateddefaultError
GET /api/v1/monitors/{id}
Get a monitor
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
响应
200OKdefaultError
PUT /api/v1/monitors/{id}
Replace a monitor's definition (enabled absent keeps the current value; true also resumes a paused monitor)
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
请求体:MonitorRequest
响应
200OKdefaultError
DELETE /api/v1/monitors/{id}
Delete a monitor
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
响应
204No ContentdefaultError
POST /api/v1/monitors/{id}/maintenance-windows
Add a maintenance window (no alerts during it)
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
请求体:MaintenanceWindowRequest
响应
201CreateddefaultError
DELETE /api/v1/monitors/{id}/maintenance-windows/{window_id}
Delete a maintenance window
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 | |
window_id | path | 是 |
响应
204No ContentdefaultError
GET /api/v1/monitors/{id}/runs
List a monitor's runs, newest first (8 days)
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 | |
before | query | 否 | next_cursor of the previous page |
limit | query | 否 |
响应
200OKdefaultError
GET /api/v1/monitors/{id}/stats
Availability and latency chart of a monitor
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 | |
from | query | 否 | RFC 3339; default 24 hours before to |
to | query | 否 | RFC 3339; default now |
响应
200OKdefaultError
GET /api/v1/nodes
List public nodes (no IP addresses)
响应
200OKdefaultError
POST /api/v1/optout
Ask for a site not to be tested
请求体:OptOutRequest
响应
201CreateddefaultError
POST /api/v1/optout/verify
Check the ownership proof of an opt-out request
请求体:OptOutVerify
响应
200OKdefaultError
GET /api/v1/site
Public site settings for the web UI (default theme, Turnstile site key)
响应
200OKdefaultError
GET /api/v1/tests
List the caller's tests (history)
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
kind | query | 否 | |
target | query | 否 | Part of a target |
from | query | 否 | Created at or after (RFC 3339) |
to | query | 否 | Created before (RFC 3339) |
cursor | query | 否 | next_cursor of the previous page |
limit | query | 否 | 0 = 20 |
monitor_id | query | 否 | Only the runs of this monitor; without it monitor runs are not listed |
响应
200OKdefaultError
POST /api/v1/tests
Start a test
请求体:CreateTestRequest
响应
201CreateddefaultError
GET /api/v1/tests/{id}
Get a test and its results
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 | |
offset | query | 否 | Results to skip |
limit | query | 否 | Results per page; 0 = 1000 |
响应
200OKdefaultError
PATCH /api/v1/tests/{id}
Share or unshare a test
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
请求体:UpdateTestRequest
响应
200OKdefaultError
POST /api/v1/tests/{id}/cancel
Stop a running test
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 |
响应
204No ContentdefaultError
GET /api/v1/tests/{id}/events
Stream test events (SSE): replays persisted results, then live events
Server-sent events of one test (design 5.3). Anyone with the test ID may read it. Every connection, with or without Last-Event-ID, first replays all persisted results, one event per task_id (the same entries get-test shows), then forwards live events until the test is done. Event names: ack, progress, result, node_timeout, done, error. - result and node_timeout carry their task_id as the SSE event id; ack and progress are live only and never replayed. - Clients de-duplicate by task_id, and a later event for the same task_id wins: a result replaces an earlier node_timeout placeholder of that task_id (for example the center's outcome, replayed after a reconnect); a node_timeout never replaces a result. - done carries the test summary; the stream ends after it. - error carries an Error body and is sent once, before the stream closes, when it cannot start or continue. Branch on its code only: not_found, forbidden and unauthorized are final; any other code (rate_limited with details.retry_after_sec, not_implemented, internal) means reconnect with back-off. - A comment line (": keep-alive") is sent at least every 15 seconds. - Node addresses are removed from live frames as from stored results.
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 | |
Last-Event-ID | header | 否 | Accepted on reconnect; every connection replays all persisted results, de-duplicate them by task_id |
响应
200OKdefaultError
GET /api/v1/tests/{id}/export
Export a test's results (CSV for Excel, or JSON)
Anyone with the test ID may export it, like get-test. CSV (the default) is UTF-8 with a byte order mark, so Excel opens it directly; it is streamed, so a test of any size can be exported, one row per result, node names in lang. A text cell that a spreadsheet could take as a formula starts with a quote. JSON is the same document as get-test with every result in results; a test with more than 20000 results or 100000 route hops answers export_too_large (413), export it as CSV instead. Each caller may export 10 times a minute (rate_limited); a server that is already streaming several CSV exports also answers rate_limited (see retry_after_sec). A client must keep reading: a download that stalls for 10 seconds is cut off, and a CSV the server cannot finish after it has started is cut off too (the connection is closed without the end of the body), so check that the download completed. Never indexed (X-Robots-Tag: noindex).
参数
| 名称 | 位置 | 必填 | 说明 |
|---|---|---|---|
id | path | 是 | |
format | query | 否 | |
lang | query | 否 | Language of node names (CSV) |
响应
200CSV (UTF-8 with BOM, streamed) or JSON (the test detail with every result; at most 20000 results, else export_too_large)defaultError
GET /api/v1/usage
Quota usage of the caller: two windows and, for members, test credits
响应
200OKdefaultError