---
title: Diagnostics
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Diagnostics

#### DiagnosticsTraceroutes

##### [Traceroute](https://developers.cloudflare.com/api/typescript/resources/diagnostics/subresources/traceroutes/methods/create)

client.diagnostics.traceroutes.create(TracerouteCreateParams { account\_id, targets, colos, options } params, RequestOptionsoptions?): SinglePage<[Traceroute](https://developers.cloudflare.com/api/typescript/resources/diagnostics#%28resource%29%20diagnostics.traceroutes%20%3E%20%28model%29%20traceroute%20%3E%20%28schema%29) { colos, target } \>

POST/accounts/{account\_id}/diagnostics/traceroute

##### ModelsExpand Collapse 

Traceroute { colos, target } 

colos?: Array<Colo\>

colo?: Colo { city, name } 

city?: string

Source colo city.

name?: string

Source colo name.

error?: "" | "Could not gather traceroute data: Code 1" | "Could not gather traceroute data: Code 2" | 2 more

Errors resulting from collecting traceroute from colo to target.

One of the following:

""

"Could not gather traceroute data: Code 1"

"Could not gather traceroute data: Code 2"

"Could not gather traceroute data: Code 3"

"Could not gather traceroute data: Code 4"

hops?: Array<Hop\>

nodes?: Array<Node\>

An array of node objects.

asn?: string

AS number associated with the node object.

ip?: string

IP address of the node.

labels?: Array<string\>

Field appears if there is an additional annotation printed when the probe returns. Field also appears when running a GRE+ICMP traceroute to denote which traceroute a node comes from.

max\_rtt\_ms?: number

Maximum RTT in ms.

mean\_rtt\_ms?: number

Mean RTT in ms.

min\_rtt\_ms?: number

Minimum RTT in ms.

name?: string

Host name of the address, this may be the same as the IP address.

packet\_count?: number

Number of packets with a response from this node.

std\_dev\_rtt\_ms?: number

Standard deviation of the RTTs in ms.

packets\_lost?: number

Number of packets where no response was received.

packets\_sent?: number

Number of packets sent with specified TTL.

packets\_ttl?: number

The time to live (TTL).

target\_summary?: unknown

Aggregated statistics from all hops about the target.

traceroute\_time\_ms?: number

Total time of traceroute in ms.

target?: string

The target hostname, IPv6, or IPv6 address.

#### DiagnosticsEndpoint Healthchecks

##### [List Endpoint Health Checks](https://developers.cloudflare.com/api/typescript/resources/diagnostics/subresources/endpoint-healthchecks/methods/list)

client.diagnostics.endpointHealthchecks.list(EndpointHealthcheckListParams { account\_id } params, RequestOptionsoptions?): [EndpointHealthcheckListResponse](https://developers.cloudflare.com/api/typescript/resources/diagnostics#%28resource%29%20diagnostics.endpoint-healthchecks%20%3E%20%28model%29%20endpoint%5Fhealthcheck%5Flist%5Fresponse%20%3E%20%28schema%29) { check\_type, endpoint, id, name } 

GET/accounts/{account\_id}/diagnostics/endpoint-healthchecks

##### [Endpoint Health Check](https://developers.cloudflare.com/api/typescript/resources/diagnostics/subresources/endpoint-healthchecks/methods/create)

client.diagnostics.endpointHealthchecks.create(EndpointHealthcheckCreateParams { account\_id, check\_type, endpoint, name } params, RequestOptionsoptions?): [EndpointHealthcheckCreateResponse](https://developers.cloudflare.com/api/typescript/resources/diagnostics#%28resource%29%20diagnostics.endpoint-healthchecks%20%3E%20%28model%29%20endpoint%5Fhealthcheck%5Fcreate%5Fresponse%20%3E%20%28schema%29) { check\_type, endpoint, id, name } 

POST/accounts/{account\_id}/diagnostics/endpoint-healthchecks

##### [Get Endpoint Health Check](https://developers.cloudflare.com/api/typescript/resources/diagnostics/subresources/endpoint-healthchecks/methods/get)

client.diagnostics.endpointHealthchecks.get(stringid, EndpointHealthcheckGetParams { account\_id } params, RequestOptionsoptions?): [EndpointHealthcheckGetResponse](https://developers.cloudflare.com/api/typescript/resources/diagnostics#%28resource%29%20diagnostics.endpoint-healthchecks%20%3E%20%28model%29%20endpoint%5Fhealthcheck%5Fget%5Fresponse%20%3E%20%28schema%29) { check\_type, endpoint, id, name } 

GET/accounts/{account\_id}/diagnostics/endpoint-healthchecks/{id}

##### [Delete Endpoint Health Check](https://developers.cloudflare.com/api/typescript/resources/diagnostics/subresources/endpoint-healthchecks/methods/delete)

client.diagnostics.endpointHealthchecks.delete(stringid, EndpointHealthcheckDeleteParams { account\_id } params, RequestOptionsoptions?): [EndpointHealthcheckDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/diagnostics#%28resource%29%20diagnostics.endpoint-healthchecks%20%3E%20%28model%29%20endpoint%5Fhealthcheck%5Fdelete%5Fresponse%20%3E%20%28schema%29) { errors, messages, success } 

DELETE/accounts/{account\_id}/diagnostics/endpoint-healthchecks/{id}

##### [Update Endpoint Health Check](https://developers.cloudflare.com/api/typescript/resources/diagnostics/subresources/endpoint-healthchecks/methods/update)

client.diagnostics.endpointHealthchecks.update(stringid, EndpointHealthcheckUpdateParams { account\_id, check\_type, endpoint, name } params, RequestOptionsoptions?): [EndpointHealthcheckUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/diagnostics#%28resource%29%20diagnostics.endpoint-healthchecks%20%3E%20%28model%29%20endpoint%5Fhealthcheck%5Fupdate%5Fresponse%20%3E%20%28schema%29) { check\_type, endpoint, id, name } 

PUT/accounts/{account\_id}/diagnostics/endpoint-healthchecks/{id}

##### ModelsExpand Collapse 

EndpointHealthcheck { check\_type, endpoint, name } 

check\_type: "icmp"

type of check to perform

endpoint: string

the IP address of the host to perform checks against

name?: string

Optional name associated with this check

EndpointHealthcheckListResponse { check\_type, endpoint, id, name } 

check\_type: "icmp"

type of check to perform

endpoint: string

the IP address of the host to perform checks against

id?: string

UUID.

maxLength36

name?: string

Optional name associated with this check

EndpointHealthcheckCreateResponse { check\_type, endpoint, id, name } 

check\_type: "icmp"

type of check to perform

endpoint: string

the IP address of the host to perform checks against

id?: string

UUID.

maxLength36

name?: string

Optional name associated with this check

EndpointHealthcheckGetResponse { check\_type, endpoint, id, name } 

check\_type: "icmp"

type of check to perform

endpoint: string

the IP address of the host to perform checks against

id?: string

UUID.

maxLength36

name?: string

Optional name associated with this check

EndpointHealthcheckDeleteResponse { errors, messages, success } 

errors: Array<Error\>

code: number

minimum1000

message: string

documentation\_url?: string

source?: Source { pointer } 

pointer?: string

messages: Array<Message\>

code: number

minimum1000

message: string

documentation\_url?: string

source?: Source { pointer } 

pointer?: string

success: true

Whether the API call was successful.

EndpointHealthcheckUpdateResponse { check\_type, endpoint, id, name } 

check\_type: "icmp"

type of check to perform

endpoint: string

the IP address of the host to perform checks against

id?: string

UUID.

maxLength36

name?: string

Optional name associated with this check