Traceroute

Run traceroutes from Cloudflare colos.

/accounts/{account_identifier}/diagnostics/traceroute

post

Diagnostics

diagnostics-traceroute

Debug "planAvailability"

{
  "business": false,
  "enterprise": true,
  "free": false,
  "pro": false
}

Debug "tokenPermissions"

null

Debug "parameters"

[
  {
    "in": "path",
    "name": "account_identifier",
    "required": true,
    "schema": {
      "description": "Identifier",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "readOnly": true,
      "type": "string"
    }
  }
]

Debug "requestBody"

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "colos": {
            "description": "If no source colo names specified, all colos will be used. China colos are unavailable for traceroutes.",
            "example": [
              "den",
              "sin"
            ],
            "items": {
              "description": "Source colo name.",
              "type": "string"
            },
            "type": "array"
          },
          "options": {
            "example": {
              "max_ttl": 15,
              "packet_type": "icmp"
            },
            "properties": {
              "max_ttl": {
                "default": 15,
                "description": "Max TTL.",
                "maximum": 64,
                "minimum": 0,
                "type": "integer"
              },
              "packet_type": {
                "default": "icmp",
                "description": "Type of packet sent.",
                "enum": [
                  "icmp",
                  "tcp",
                  "udp",
                  "gre",
                  "gre+icmp"
                ],
                "example": "icmp",
                "type": "string"
              },
              "packets_per_ttl": {
                "default": 3,
                "description": "Number of packets sent at each TTL.",
                "maximum": 10,
                "minimum": 0,
                "type": "integer"
              },
              "port": {
                "default": 0,
                "description": "For UDP and TCP, specifies the destination port. For ICMP, specifies the initial ICMP sequence value. Default value 0 will choose the best value to use for each protocol.",
                "maximum": 65535,
                "minimum": 0,
                "type": "integer"
              },
              "wait_time": {
                "default": 1,
                "description": "Set the time (in seconds) to wait for a response to a probe.",
                "maximum": 5,
                "minimum": 1,
                "type": "integer"
              }
            }
          },
          "targets": {
            "example": [
              "203.0.113.1",
              "cloudflare.com"
            ],
            "items": {
              "description": "Hosts as a hostname or IPv4/IPv6 address represented by strings.",
              "example": "203.0.113.1",
              "type": "string"
            },
            "maxLength": 10,
            "type": "array"
          }
        },
        "required": [
          "targets"
        ]
      }
    }
  },
  "required": true
}

Debug "responses"

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "allOf": [
                {
                  "properties": {
                    "errors": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "messages": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "result": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "items": {},
                          "type": "array"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "success": {
                      "description": "Whether the API call was successful",
                      "enum": [
                        true
                      ],
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "errors",
                    "messages",
                    "result"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "result": {
                      "items": {},
                      "nullable": true,
                      "type": "array"
                    },
                    "result_info": {
                      "properties": {
                        "count": {
                          "description": "Total number of results for the requested service",
                          "example": 1,
                          "type": "number"
                        },
                        "page": {
                          "description": "Current page within paginated list of results",
                          "example": 1,
                          "type": "number"
                        },
                        "per_page": {
                          "description": "Number of results per page of results",
                          "example": 20,
                          "type": "number"
                        },
                        "total_count": {
                          "description": "Total results available without any search parameters",
                          "example": 2000,
                          "type": "number"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              ],
              "type": "object"
            },
            {
              "properties": {
                "result": {
                  "items": {
                    "properties": {
                      "colos": {
                        "items": {
                          "properties": {
                            "colo": {
                              "properties": {
                                "city": {
                                  "description": "Source colo city.",
                                  "example": "Denver, CO, US",
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Source colo name.",
                                  "example": "den01",
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "error": {
                              "description": "Errors resulting from collecting traceroute from colo to target.",
                              "enum": [
                                "",
                                "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"
                              ],
                              "example": "",
                              "type": "string"
                            },
                            "hops": {
                              "items": {
                                "properties": {
                                  "nodes": {
                                    "description": "An array of node objects.",
                                    "items": {
                                      "example": {
                                        "asn": "AS13335",
                                        "ip": "1.1.1.1",
                                        "max_latency_ms": 0.034,
                                        "mean_latency_ms": 0.021,
                                        "min_latency_ms": 0.014,
                                        "name": "one.one.one.one",
                                        "packet_count": 3,
                                        "std_dev_latency_ms": 0.011269427669584647
                                      },
                                      "properties": {
                                        "asn": {
                                          "description": "AS number associated with the node object.",
                                          "type": "string"
                                        },
                                        "ip": {
                                          "description": "IP address of the node.",
                                          "type": "string"
                                        },
                                        "labels": {
                                          "description": "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.",
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "max_rtt_ms": {
                                          "description": "Maximum RTT in ms.",
                                          "type": "number"
                                        },
                                        "mean_rtt_ms": {
                                          "description": "Mean RTT in ms.",
                                          "type": "number"
                                        },
                                        "min_rtt_ms": {
                                          "description": "Minimum RTT in ms.",
                                          "type": "number"
                                        },
                                        "name": {
                                          "description": "Host name of the address, this may be the same as the IP address.",
                                          "type": "string"
                                        },
                                        "packet_count": {
                                          "description": "Number of packets with a response from this node.",
                                          "type": "integer"
                                        },
                                        "std_dev_rtt_ms": {
                                          "description": "Standard deviation of the RTTs in ms.",
                                          "type": "number"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "packets_lost": {
                                    "description": "Number of packets where no response was received.",
                                    "type": "integer"
                                  },
                                  "packets_sent": {
                                    "description": "Number of packets sent with specified TTL.",
                                    "type": "integer"
                                  },
                                  "packets_ttl": {
                                    "description": "The time to live (TTL).",
                                    "type": "integer"
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "target_summary": {
                              "description": "Aggregated statistics from all hops about the target.",
                              "example": {
                                "asn": "",
                                "ip": "1.1.1.1",
                                "max_latency_ms": 0.034,
                                "mean_latency_ms": 0.021,
                                "min_latency_ms": 0.014,
                                "name": "1.1.1.1",
                                "packet_count": 3,
                                "std_dev_latency_ms": 0.011269427669584647
                              },
                              "type": "object"
                            },
                            "traceroute_time_ms": {
                              "description": "Total time of traceroute in ms.",
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "target": {
                        "description": "The target hostname, IPv6, or IPv6 address.",
                        "example": "1.1.1.1",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            }
          ]
        }
      }
    },
    "description": "Traceroute response"
  },
  "4XX": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "allOf": [
                {
                  "allOf": [
                    {
                      "properties": {
                        "errors": {
                          "example": [],
                          "items": {
                            "properties": {
                              "code": {
                                "minimum": 1000,
                                "type": "integer"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "message"
                            ],
                            "type": "object",
                            "uniqueItems": true
                          },
                          "type": "array"
                        },
                        "messages": {
                          "example": [],
                          "items": {
                            "properties": {
                              "code": {
                                "minimum": 1000,
                                "type": "integer"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "message"
                            ],
                            "type": "object",
                            "uniqueItems": true
                          },
                          "type": "array"
                        },
                        "result": {
                          "anyOf": [
                            {
                              "type": "object"
                            },
                            {
                              "items": {},
                              "type": "array"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        },
                        "success": {
                          "description": "Whether the API call was successful",
                          "enum": [
                            true
                          ],
                          "example": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "success",
                        "errors",
                        "messages",
                        "result"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "result": {
                          "items": {},
                          "nullable": true,
                          "type": "array"
                        },
                        "result_info": {
                          "properties": {
                            "count": {
                              "description": "Total number of results for the requested service",
                              "example": 1,
                              "type": "number"
                            },
                            "page": {
                              "description": "Current page within paginated list of results",
                              "example": 1,
                              "type": "number"
                            },
                            "per_page": {
                              "description": "Number of results per page of results",
                              "example": 20,
                              "type": "number"
                            },
                            "total_count": {
                              "description": "Total results available without any search parameters",
                              "example": 2000,
                              "type": "number"
                            }
                          },
                          "type": "object"
                        }
                      }
                    }
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "result": {
                      "items": {
                        "properties": {
                          "colos": {
                            "items": {
                              "properties": {
                                "colo": {
                                  "properties": {
                                    "city": {
                                      "description": "Source colo city.",
                                      "example": "Denver, CO, US",
                                      "type": "string"
                                    },
                                    "name": {
                                      "description": "Source colo name.",
                                      "example": "den01",
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                },
                                "error": {
                                  "description": "Errors resulting from collecting traceroute from colo to target.",
                                  "enum": [
                                    "",
                                    "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"
                                  ],
                                  "example": "",
                                  "type": "string"
                                },
                                "hops": {
                                  "items": {
                                    "properties": {
                                      "nodes": {
                                        "description": "An array of node objects.",
                                        "items": {
                                          "example": {
                                            "asn": "AS13335",
                                            "ip": "1.1.1.1",
                                            "max_latency_ms": 0.034,
                                            "mean_latency_ms": 0.021,
                                            "min_latency_ms": 0.014,
                                            "name": "one.one.one.one",
                                            "packet_count": 3,
                                            "std_dev_latency_ms": 0.011269427669584647
                                          },
                                          "properties": {
                                            "asn": {
                                              "description": "AS number associated with the node object.",
                                              "type": "string"
                                            },
                                            "ip": {
                                              "description": "IP address of the node.",
                                              "type": "string"
                                            },
                                            "labels": {
                                              "description": "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.",
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "max_rtt_ms": {
                                              "description": "Maximum RTT in ms.",
                                              "type": "number"
                                            },
                                            "mean_rtt_ms": {
                                              "description": "Mean RTT in ms.",
                                              "type": "number"
                                            },
                                            "min_rtt_ms": {
                                              "description": "Minimum RTT in ms.",
                                              "type": "number"
                                            },
                                            "name": {
                                              "description": "Host name of the address, this may be the same as the IP address.",
                                              "type": "string"
                                            },
                                            "packet_count": {
                                              "description": "Number of packets with a response from this node.",
                                              "type": "integer"
                                            },
                                            "std_dev_rtt_ms": {
                                              "description": "Standard deviation of the RTTs in ms.",
                                              "type": "number"
                                            }
                                          },
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "packets_lost": {
                                        "description": "Number of packets where no response was received.",
                                        "type": "integer"
                                      },
                                      "packets_sent": {
                                        "description": "Number of packets sent with specified TTL.",
                                        "type": "integer"
                                      },
                                      "packets_ttl": {
                                        "description": "The time to live (TTL).",
                                        "type": "integer"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "target_summary": {
                                  "description": "Aggregated statistics from all hops about the target.",
                                  "example": {
                                    "asn": "",
                                    "ip": "1.1.1.1",
                                    "max_latency_ms": 0.034,
                                    "mean_latency_ms": 0.021,
                                    "min_latency_ms": 0.014,
                                    "name": "1.1.1.1",
                                    "packet_count": 3,
                                    "std_dev_latency_ms": 0.011269427669584647
                                  },
                                  "type": "object"
                                },
                                "traceroute_time_ms": {
                                  "description": "Total time of traceroute in ms.",
                                  "type": "integer"
                                }
                              },
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "target": {
                            "description": "The target hostname, IPv6, or IPv6 address.",
                            "example": "1.1.1.1",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  }
                }
              ]
            },
            {
              "properties": {
                "errors": {
                  "allOf": [
                    {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    }
                  ],
                  "example": [
                    {
                      "code": 7003,
                      "message": "No route for the URI"
                    }
                  ],
                  "minLength": 1
                },
                "messages": {
                  "allOf": [
                    {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    }
                  ],
                  "example": []
                },
                "result": {
                  "enum": [
                    null
                  ],
                  "nullable": true,
                  "type": "object"
                },
                "success": {
                  "description": "Whether the API call was successful",
                  "enum": [
                    false
                  ],
                  "example": false,
                  "type": "boolean"
                }
              },
              "required": [
                "success",
                "errors",
                "messages",
                "result"
              ],
              "type": "object"
            }
          ]
        }
      }
    },
    "description": "Traceroute response failure"
  }
}

Debug "security"

[
  {
    "api_email": [],
    "api_key": []
  }
]