Get URL scan's HAR

Get a URL scan's HAR file. See HAR spec at http://www.softwareishard.com/blog/har-12-spec/.

/accounts/{accountId}/urlscanner/scan/{scanId}/har

get

URL Scanner

urlscanner-get-scan-har

Debug "planAvailability"

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

Debug "tokenPermissions"

{
  "enum": [
    "com.cloudflare.api.account.url-scanner.read"
  ]
}

Debug "parameters"

[
  {
    "in": "path",
    "name": "scanId",
    "required": true,
    "schema": {
      "description": "Scan uuid",
      "format": "uuid",
      "type": "string"
    }
  },
  {
    "in": "path",
    "name": "accountId",
    "required": true,
    "schema": {
      "description": "Account Id",
      "type": "string"
    }
  }
]

Debug "requestBody"

null

Debug "responses"

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "errors": {
              "items": {
                "properties": {
                  "message": {
                    "example": "Error",
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "messages": {
              "items": {
                "properties": {
                  "message": {
                    "example": "OK",
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "result": {
              "properties": {
                "har": {
                  "properties": {
                    "log": {
                      "properties": {
                        "creator": {
                          "properties": {
                            "comment": {
                              "example": "https://github.com/sitespeedio/chrome-har",
                              "type": "string"
                            },
                            "name": {
                              "example": "chrome-har",
                              "type": "string"
                            },
                            "version": {
                              "example": "0.13.1",
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "version",
                            "comment"
                          ],
                          "type": "object"
                        },
                        "entries": {
                          "items": {
                            "properties": {
                              "_initialPriority": {
                                "example": "VeryHigh",
                                "type": "string"
                              },
                              "_initiator_type": {
                                "example": "other",
                                "type": "string"
                              },
                              "_priority": {
                                "example": "VeryHigh",
                                "type": "string"
                              },
                              "_requestId": {
                                "example": "DDC779F0CB3746BAF283EC1A51B0F2F8",
                                "type": "string"
                              },
                              "_requestTime": {
                                "example": 114135.331081,
                                "type": "number"
                              },
                              "_resourceType": {
                                "example": "document",
                                "type": "string"
                              },
                              "cache": {
                                "type": "object"
                              },
                              "connection": {
                                "example": "33",
                                "type": "string"
                              },
                              "pageref": {
                                "example": "page_1",
                                "type": "string"
                              },
                              "request": {
                                "properties": {
                                  "bodySize": {
                                    "type": "number"
                                  },
                                  "headers": {
                                    "items": {
                                      "properties": {
                                        "name": {
                                          "example": "Upgrade-Insecure-Requests",
                                          "type": "string"
                                        },
                                        "value": {
                                          "example": "1",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "value"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "headersSize": {
                                    "example": 197,
                                    "type": "number"
                                  },
                                  "httpVersion": {
                                    "example": "http/1.1",
                                    "type": "string"
                                  },
                                  "method": {
                                    "example": "GET",
                                    "type": "string"
                                  },
                                  "url": {
                                    "example": "http://example.com/",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "method",
                                  "url",
                                  "headersSize",
                                  "bodySize",
                                  "headers",
                                  "httpVersion"
                                ],
                                "type": "object"
                              },
                              "response": {
                                "properties": {
                                  "_transferSize": {
                                    "example": 1071,
                                    "type": "number"
                                  },
                                  "bodySize": {
                                    "example": 648,
                                    "type": "number"
                                  },
                                  "content": {
                                    "properties": {
                                      "compression": {
                                        "example": 608,
                                        "type": "integer"
                                      },
                                      "mimeType": {
                                        "example": "text/html",
                                        "type": "string"
                                      },
                                      "size": {
                                        "example": 1256,
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "mimeType",
                                      "size"
                                    ],
                                    "type": "object"
                                  },
                                  "headers": {
                                    "items": {
                                      "properties": {
                                        "name": {
                                          "example": "Content-Encoding",
                                          "type": "string"
                                        },
                                        "value": {
                                          "example": "gzip",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "value"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "headersSize": {
                                    "example": 423,
                                    "type": "number"
                                  },
                                  "httpVersion": {
                                    "example": "http/1.1",
                                    "type": "string"
                                  },
                                  "redirectURL": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "example": 200,
                                    "type": "number"
                                  },
                                  "statusText": {
                                    "example": "OK",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "httpVersion",
                                  "redirectURL",
                                  "status",
                                  "statusText",
                                  "content",
                                  "headersSize",
                                  "bodySize",
                                  "headers",
                                  "_transferSize"
                                ],
                                "type": "object"
                              },
                              "serverIPAddress": {
                                "example": "2606:2800:220:1:248:1893:25c8:1946",
                                "type": "string"
                              },
                              "startedDateTime": {
                                "example": "2023-05-03T17:05:13.196Z",
                                "type": "string"
                              },
                              "time": {
                                "example": 268.64,
                                "type": "number"
                              }
                            },
                            "required": [
                              "cache",
                              "startedDateTime",
                              "_requestId",
                              "_initialPriority",
                              "_priority",
                              "pageref",
                              "request",
                              "time",
                              "_initiator_type",
                              "_resourceType",
                              "response",
                              "connection",
                              "serverIPAddress",
                              "_requestTime"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "pages": {
                          "items": {
                            "properties": {
                              "id": {
                                "example": "page_1",
                                "type": "string"
                              },
                              "pageTimings": {
                                "properties": {
                                  "onContentLoad": {
                                    "example": 305.408,
                                    "type": "number"
                                  },
                                  "onLoad": {
                                    "example": 305.169,
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "onLoad",
                                  "onContentLoad"
                                ],
                                "type": "object"
                              },
                              "startedDateTime": {
                                "example": "2023-05-03T17:05:13.195Z",
                                "type": "string"
                              },
                              "title": {
                                "example": "http://example.com/",
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "startedDateTime",
                              "title",
                              "pageTimings"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "version": {
                          "example": "1.2",
                          "type": "string"
                        }
                      },
                      "required": [
                        "version",
                        "creator",
                        "pages",
                        "entries"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "log"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "har"
              ],
              "type": "object"
            },
            "success": {
              "description": "Whether search request was successful or not",
              "type": "boolean"
            }
          },
          "required": [
            "messages",
            "errors",
            "success",
            "result"
          ],
          "type": "object"
        }
      }
    },
    "description": "Returns the scan's har."
  },
  "202": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "errors": {
              "items": {
                "properties": {
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "messages": {
              "items": {
                "properties": {
                  "message": {
                    "example": "In Progress",
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "result": {
              "properties": {
                "scan": {
                  "properties": {
                    "task": {
                      "properties": {
                        "effectiveUrl": {
                          "example": "http://example.com/",
                          "type": "string"
                        },
                        "errors": {
                          "items": {
                            "properties": {
                              "message": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "message"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "location": {
                          "example": "PT",
                          "type": "string"
                        },
                        "region": {
                          "example": "enam",
                          "type": "string"
                        },
                        "status": {
                          "example": "InProgress",
                          "type": "string"
                        },
                        "success": {
                          "example": true,
                          "type": "boolean"
                        },
                        "time": {
                          "example": "2023-05-03T17:05:04.843Z",
                          "type": "string"
                        },
                        "url": {
                          "example": "http://example.com",
                          "type": "string"
                        },
                        "uuid": {
                          "example": "2ee568d0-bf70-4827-b922-b7088c0f056f",
                          "type": "string"
                        },
                        "visibility": {
                          "example": "Public",
                          "type": "string"
                        }
                      },
                      "required": [
                        "uuid",
                        "url",
                        "status",
                        "success",
                        "errors",
                        "time",
                        "visibility",
                        "location",
                        "region",
                        "effectiveUrl"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "task"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "scan"
              ],
              "type": "object"
            },
            "success": {
              "description": "Whether request was successful or not",
              "type": "boolean"
            }
          },
          "required": [
            "messages",
            "errors",
            "success",
            "result"
          ],
          "type": "object"
        }
      }
    },
    "description": "Scan is in progress. Check current status in `result.scan.task.status`. Possible statuses: `Queued`,`InProgress`,`InPostProcessing`,`Finished`."
  },
  "400": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "errors": {
              "items": {
                "properties": {
                  "message": {
                    "example": "Scan ID is not a valid uuid.",
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "messages": {
              "items": {
                "properties": {
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "success": {
              "description": "Whether request was successful or not",
              "type": "boolean"
            }
          },
          "required": [
            "messages",
            "errors",
            "success"
          ],
          "type": "object"
        }
      }
    },
    "description": "Invalid params."
  },
  "404": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "errors": {
              "items": {
                "properties": {
                  "message": {
                    "example": "Scan not found.",
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "messages": {
              "items": {
                "properties": {
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "success": {
              "description": "Whether request was successful or not",
              "type": "boolean"
            }
          },
          "required": [
            "messages",
            "errors",
            "success"
          ],
          "type": "object"
        }
      }
    },
    "description": "Scan not found."
  }
}

Debug "security"

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