---
title: Diagnostics
---

[Skip to content](#_top)

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

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Diagnostics

#### DiagnosticsTraceroutes

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

client.Diagnostics.Traceroutes.New(ctx, params) (\*SinglePage\[[Traceroute](<https://developers.cloudflare.com/api/go/resources/diagnostics#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)>)], error)

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

##### ModelsExpand Collapse

<details>

<summary>

type Traceroute struct{…}

</summary>

<details>

<summary>

Colos \[]TracerouteColoOptional

</summary>

<details>

<summary>

Colo TracerouteColosColoOptional

</summary>

City stringOptional

Source colo city.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20colo%20%3E%20(property)%20city">Link to this property</a>

Name stringOptional

Source colo name.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20colo%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20colo">Link to this property</a>

<details>

<summary>

Error TracerouteColosErrorOptional

Errors resulting from collecting traceroute from colo to target.

</summary>

One of the following:

const TracerouteColosErrorEmpty TracerouteColosError = ""

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error%20%3E%20(member)%200">Link to this property</a>

const TracerouteColosErrorCouldNotGatherTracerouteDataCode1 TracerouteColosError = "Could not gather traceroute data: Code 1"

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error%20%3E%20(member)%201">Link to this property</a>

const TracerouteColosErrorCouldNotGatherTracerouteDataCode2 TracerouteColosError = "Could not gather traceroute data: Code 2"

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error%20%3E%20(member)%202">Link to this property</a>

const TracerouteColosErrorCouldNotGatherTracerouteDataCode3 TracerouteColosError = "Could not gather traceroute data: Code 3"

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error%20%3E%20(member)%203">Link to this property</a>

const TracerouteColosErrorCouldNotGatherTracerouteDataCode4 TracerouteColosError = "Could not gather traceroute data: Code 4"

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20error">Link to this property</a>

<details>

<summary>

Hops \[]TracerouteColosHopOptional

</summary>

<details>

<summary>

Nodes \[]TracerouteColosHopsNodeOptional

An array of node objects.

</summary>

ASN stringOptional

AS number associated with the node object.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20asn">Link to this property</a>

IP stringOptional

IP address of the node.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20ip">Link to this property</a>

Labels \[]stringOptional

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.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20labels">Link to this property</a>

MaxRTTMs float64Optional

Maximum RTT in ms.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20max_rtt_ms">Link to this property</a>

MeanRTTMs float64Optional

Mean RTT in ms.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20mean_rtt_ms">Link to this property</a>

MinRTTMs float64Optional

Minimum RTT in ms.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20min_rtt_ms">Link to this property</a>

Name stringOptional

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

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

PacketCount int64Optional

Number of packets with a response from this node.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20packet_count">Link to this property</a>

StdDevRTTMs float64Optional

Standard deviation of the RTTs in ms.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes%20%3E%20(items)%20%3E%20(property)%20std_dev_rtt_ms">Link to this property</a>

</details>

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20nodes">Link to this property</a>

PacketsLost int64Optional

Number of packets where no response was received.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20packets_lost">Link to this property</a>

PacketsSent int64Optional

Number of packets sent with specified TTL.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20packets_sent">Link to this property</a>

PacketsTTL int64Optional

The time to live (TTL).

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops%20%3E%20(items)%20%3E%20(property)%20packets_ttl">Link to this property</a>

</details>

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20hops">Link to this property</a>

TargetSummary unknownOptional

Aggregated statistics from all hops about the target.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20target_summary">Link to this property</a>

TracerouteTimeMs int64Optional

Total time of traceroute in ms.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos%20%3E%20(items)%20%3E%20(property)%20traceroute_time_ms">Link to this property</a>

</details>

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20colos">Link to this property</a>

Target stringOptional

The target hostname, IPv6, or IPv6 address.

<a href="#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

</details>

[Link to this property](<#(resource)%20diagnostics.traceroutes%20%3E%20(model)%20traceroute%20%3E%20(schema)>)

#### DiagnosticsEndpoint Healthchecks

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

client.Diagnostics.EndpointHealthchecks.List(ctx, query) (\*[EndpointHealthcheckListResponse](<https://developers.cloudflare.com/api/go/resources/diagnostics#(resource)%20diagnostics.endpoint-healthchecks%20%3E%20(model)%20EndpointHealthcheckListResponse%20%3E%20(schema)>), error)

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

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

client.Diagnostics.EndpointHealthchecks.New(ctx, params) (\*[EndpointHealthcheckNewResponse](<https://developers.cloudflare.com/api/go/resources/diagnostics#(resource)%20diagnostics.endpoint-healthchecks%20%3E%20(model)%20EndpointHealthcheckNewResponse%20%3E%20(schema)>), error)

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

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

client.Diagnostics.EndpointHealthchecks.Get(ctx, id, query) (\*[EndpointHealthcheckGetResponse](<https://developers.cloudflare.com/api/go/resources/diagnostics#(resource)%20diagnostics.endpoint-healthchecks%20%3E%20(model)%20EndpointHealthcheckGetResponse%20%3E%20(schema)>), error)

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

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

client.Diagnostics.EndpointHealthchecks.Delete(ctx, id, body) (\*[EndpointHealthcheckDeleteResponse](<https://developers.cloudflare.com/api/go/resources/diagnostics#(resource)%20diagnostics.endpoint-healthchecks%20%3E%20(model)%20EndpointHealthcheckDeleteResponse%20%3E%20(schema)>), error)

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

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

client.Diagnostics.EndpointHealthchecks.Update(ctx, id, params) (\*[EndpointHealthcheckUpdateResponse](<https://developers.cloudflare.com/api/go/resources/diagnostics#(resource)%20diagnostics.endpoint-healthchecks%20%3E%20(model)%20EndpointHealthcheckUpdateResponse%20%3E%20(schema)>), error)

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

##### ModelsExpand Collapse

<details>

<summary>

type EndpointHealthcheck struct{…}

</summary>

CheckType EndpointHealthcheckCheckType

type of check to perform

<a href="#(resource)%20diagnostics.endpoint-healthchecks%20%3E%20(model)%20endpoint_healthcheck%20%3E%20(schema)%20%3E%20(property)%20check_type">Link to this property</a>

Endpoint string

the IP address of the host to perform checks against

<a href="#(resource)%20diagnostics.endpoint-healthchecks%20%3E%20(model)%20endpoint_healthcheck%20%3E%20(schema)%20%3E%20(property)%20endpoint">Link to this property</a>

Name stringOptional

Optional name associated with this check

<a href="#(resource)%20diagnostics.endpoint-healthchecks%20%3E%20(model)%20endpoint_healthcheck%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

</details>

[Link to this property](<#(resource)%20diagnostics.endpoint-healthchecks%20%3E%20(model)%20endpoint_healthcheck%20%3E%20(schema)>)