OLD | NEW |
(Empty) | |
| 1 { |
| 2 "basePath": "/pagespeedonline/v2/", |
| 3 "baseUrl": "https://www.googleapis.com/pagespeedonline/v2/", |
| 4 "batchPath": "batch", |
| 5 "description": "Lets you analyze the performance of a web page and get tailo
red suggestions to make that page faster.", |
| 6 "discoveryVersion": "v1", |
| 7 "documentationLink": "https://developers.google.com/speed/docs/insights/v1/g
etting_started", |
| 8 "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/y8eCF6QessR8F9s9erx5q0lLF1U\"", |
| 9 "icons": { |
| 10 "x16": "https://www.google.com/images/icons/product/pagespeed-16.png", |
| 11 "x32": "https://www.google.com/images/icons/product/pagespeed-32.png" |
| 12 }, |
| 13 "id": "pagespeedonline:v2", |
| 14 "kind": "discovery#restDescription", |
| 15 "name": "pagespeedonline", |
| 16 "ownerDomain": "google.com", |
| 17 "ownerName": "Google", |
| 18 "parameters": { |
| 19 "alt": { |
| 20 "default": "json", |
| 21 "description": "Data format for the response.", |
| 22 "enum": [ |
| 23 "json" |
| 24 ], |
| 25 "enumDescriptions": [ |
| 26 "Responses with Content-Type of application/json" |
| 27 ], |
| 28 "location": "query", |
| 29 "type": "string" |
| 30 }, |
| 31 "fields": { |
| 32 "description": "Selector specifying which fields to include in a par
tial response.", |
| 33 "location": "query", |
| 34 "type": "string" |
| 35 }, |
| 36 "key": { |
| 37 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", |
| 38 "location": "query", |
| 39 "type": "string" |
| 40 }, |
| 41 "oauth_token": { |
| 42 "description": "OAuth 2.0 token for the current user.", |
| 43 "location": "query", |
| 44 "type": "string" |
| 45 }, |
| 46 "prettyPrint": { |
| 47 "default": "true", |
| 48 "description": "Returns response with indentations and line breaks."
, |
| 49 "location": "query", |
| 50 "type": "boolean" |
| 51 }, |
| 52 "quotaUser": { |
| 53 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters. Overrides userIp if both are provided.", |
| 54 "location": "query", |
| 55 "type": "string" |
| 56 }, |
| 57 "userIp": { |
| 58 "description": "IP address of the site where the request originates.
Use this if you want to enforce per-user limits.", |
| 59 "location": "query", |
| 60 "type": "string" |
| 61 } |
| 62 }, |
| 63 "protocol": "rest", |
| 64 "resources": { |
| 65 "pagespeedapi": { |
| 66 "methods": { |
| 67 "runpagespeed": { |
| 68 "description": "Runs PageSpeed analysis on the page at the s
pecified URL, and returns PageSpeed scores, a list of suggestions to make that p
age faster, and other information.", |
| 69 "httpMethod": "GET", |
| 70 "id": "pagespeedonline.pagespeedapi.runpagespeed", |
| 71 "parameterOrder": [ |
| 72 "url" |
| 73 ], |
| 74 "parameters": { |
| 75 "filter_third_party_resources": { |
| 76 "default": "false", |
| 77 "description": "Indicates if third party resources s
hould be filtered out before PageSpeed analysis.", |
| 78 "location": "query", |
| 79 "type": "boolean" |
| 80 }, |
| 81 "locale": { |
| 82 "description": "The locale used to localize formatte
d results", |
| 83 "location": "query", |
| 84 "pattern": "[a-zA-Z]+(_[a-zA-Z]+)?", |
| 85 "type": "string" |
| 86 }, |
| 87 "rule": { |
| 88 "description": "A PageSpeed rule to run; if none are
given, all rules are run", |
| 89 "location": "query", |
| 90 "pattern": "[a-zA-Z]+", |
| 91 "repeated": true, |
| 92 "type": "string" |
| 93 }, |
| 94 "screenshot": { |
| 95 "default": "false", |
| 96 "description": "Indicates if binary data containing
a screenshot should be included", |
| 97 "location": "query", |
| 98 "type": "boolean" |
| 99 }, |
| 100 "strategy": { |
| 101 "description": "The analysis strategy to use", |
| 102 "enum": [ |
| 103 "desktop", |
| 104 "mobile" |
| 105 ], |
| 106 "enumDescriptions": [ |
| 107 "Fetch and analyze the URL for desktop browsers"
, |
| 108 "Fetch and analyze the URL for mobile devices" |
| 109 ], |
| 110 "location": "query", |
| 111 "type": "string" |
| 112 }, |
| 113 "url": { |
| 114 "description": "The URL to fetch and analyze", |
| 115 "location": "query", |
| 116 "pattern": "http(s)?://.*", |
| 117 "required": true, |
| 118 "type": "string" |
| 119 } |
| 120 }, |
| 121 "path": "runPagespeed", |
| 122 "response": { |
| 123 "$ref": "Result" |
| 124 } |
| 125 } |
| 126 } |
| 127 } |
| 128 }, |
| 129 "revision": "20150108", |
| 130 "rootUrl": "https://www.googleapis.com/", |
| 131 "schemas": { |
| 132 "PagespeedApiFormatStringV2": { |
| 133 "id": "PagespeedApiFormatStringV2", |
| 134 "properties": { |
| 135 "args": { |
| 136 "description": "List of arguments for the format string.", |
| 137 "items": { |
| 138 "properties": { |
| 139 "key": { |
| 140 "description": "The placeholder key for this arg
, as a string.", |
| 141 "type": "string" |
| 142 }, |
| 143 "rects": { |
| 144 "description": "The screen rectangles being refe
rred to, with dimensions measured in CSS pixels. This is only ever used for SNAP
SHOT_RECT arguments. If this is absent for a SNAPSHOT_RECT argument, it means th
at that argument refers to the entire snapshot.", |
| 145 "items": { |
| 146 "properties": { |
| 147 "height": { |
| 148 "description": "The height of the re
ct.", |
| 149 "format": "int32", |
| 150 "type": "integer" |
| 151 }, |
| 152 "left": { |
| 153 "description": "The left coordinate
of the rect, in page coordinates.", |
| 154 "format": "int32", |
| 155 "type": "integer" |
| 156 }, |
| 157 "top": { |
| 158 "description": "The top coordinate o
f the rect, in page coordinates.", |
| 159 "format": "int32", |
| 160 "type": "integer" |
| 161 }, |
| 162 "width": { |
| 163 "description": "The width of the rec
t.", |
| 164 "format": "int32", |
| 165 "type": "integer" |
| 166 } |
| 167 }, |
| 168 "type": "object" |
| 169 }, |
| 170 "type": "array" |
| 171 }, |
| 172 "secondary_rects": { |
| 173 "description": "Secondary screen rectangles bein
g referred to, with dimensions measured in CSS pixels. This is only ever used fo
r SNAPSHOT_RECT arguments.", |
| 174 "items": { |
| 175 "properties": { |
| 176 "height": { |
| 177 "description": "The height of the re
ct.", |
| 178 "format": "int32", |
| 179 "type": "integer" |
| 180 }, |
| 181 "left": { |
| 182 "description": "The left coordinate
of the rect, in page coordinates.", |
| 183 "format": "int32", |
| 184 "type": "integer" |
| 185 }, |
| 186 "top": { |
| 187 "description": "The top coordinate o
f the rect, in page coordinates.", |
| 188 "format": "int32", |
| 189 "type": "integer" |
| 190 }, |
| 191 "width": { |
| 192 "description": "The width of the rec
t.", |
| 193 "format": "int32", |
| 194 "type": "integer" |
| 195 } |
| 196 }, |
| 197 "type": "object" |
| 198 }, |
| 199 "type": "array" |
| 200 }, |
| 201 "type": { |
| 202 "description": "Type of argument. One of URL, ST
RING_LITERAL, INT_LITERAL, BYTES, DURATION, VERBATIM_STRING, PERCENTAGE, HYPERLI
NK, or SNAPSHOT_RECT.", |
| 203 "type": "string" |
| 204 }, |
| 205 "value": { |
| 206 "description": "Argument value, as a localized s
tring.", |
| 207 "type": "string" |
| 208 } |
| 209 }, |
| 210 "type": "object" |
| 211 }, |
| 212 "type": "array" |
| 213 }, |
| 214 "format": { |
| 215 "description": "A localized format string with {{FOO}} place
holders, where 'FOO' is the key of the argument whose value should be substitute
d. For HYPERLINK arguments, the format string will instead contain {{BEGIN_FOO}}
and {{END_FOO}} for the argument with key 'FOO'.", |
| 216 "type": "string" |
| 217 } |
| 218 }, |
| 219 "type": "object" |
| 220 }, |
| 221 "PagespeedApiImageV2": { |
| 222 "id": "PagespeedApiImageV2", |
| 223 "properties": { |
| 224 "data": { |
| 225 "description": "Image data base64 encoded.", |
| 226 "format": "byte", |
| 227 "type": "string" |
| 228 }, |
| 229 "height": { |
| 230 "description": "Height of screenshot in pixels.", |
| 231 "format": "int32", |
| 232 "type": "integer" |
| 233 }, |
| 234 "key": { |
| 235 "description": "Unique string key, if any, identifying this
image.", |
| 236 "type": "string" |
| 237 }, |
| 238 "mime_type": { |
| 239 "description": "Mime type of image data (e.g. \"image/jpeg\"
).", |
| 240 "type": "string" |
| 241 }, |
| 242 "page_rect": { |
| 243 "description": "The region of the page that is captured by t
his image, with dimensions measured in CSS pixels.", |
| 244 "properties": { |
| 245 "height": { |
| 246 "description": "The height of the rect.", |
| 247 "format": "int32", |
| 248 "type": "integer" |
| 249 }, |
| 250 "left": { |
| 251 "description": "The left coordinate of the rect, in
page coordinates.", |
| 252 "format": "int32", |
| 253 "type": "integer" |
| 254 }, |
| 255 "top": { |
| 256 "description": "The top coordinate of the rect, in p
age coordinates.", |
| 257 "format": "int32", |
| 258 "type": "integer" |
| 259 }, |
| 260 "width": { |
| 261 "description": "The width of the rect.", |
| 262 "format": "int32", |
| 263 "type": "integer" |
| 264 } |
| 265 }, |
| 266 "type": "object" |
| 267 }, |
| 268 "width": { |
| 269 "description": "Width of screenshot in pixels.", |
| 270 "format": "int32", |
| 271 "type": "integer" |
| 272 } |
| 273 }, |
| 274 "type": "object" |
| 275 }, |
| 276 "Result": { |
| 277 "id": "Result", |
| 278 "properties": { |
| 279 "formattedResults": { |
| 280 "description": "Localized PageSpeed results. Contains a rule
Results entry for each PageSpeed rule instantiated and run by the server.", |
| 281 "properties": { |
| 282 "locale": { |
| 283 "description": "The locale of the formattedResults,
e.g. \"en_US\".", |
| 284 "type": "string" |
| 285 }, |
| 286 "ruleResults": { |
| 287 "additionalProperties": { |
| 288 "description": "The enum-like identifier for thi
s rule. For instance \"EnableKeepAlive\" or \"AvoidCssImport\". Not localized.", |
| 289 "properties": { |
| 290 "groups": { |
| 291 "description": "List of rule groups that
this rule belongs to. Each entry in the list is one of \"SPEED\" or \"USABILITY
\".", |
| 292 "items": { |
| 293 "type": "string" |
| 294 }, |
| 295 "type": "array" |
| 296 }, |
| 297 "localizedRuleName": { |
| 298 "description": "Localized name of the ru
le, intended for presentation to a user.", |
| 299 "type": "string" |
| 300 }, |
| 301 "ruleImpact": { |
| 302 "description": "The impact (unbounded fl
oating point value) that implementing the suggestions for this rule would have o
n making the page faster. Impact is comparable between rules to determine which
rule's suggestions would have a higher or lower impact on making a page faster.
For instance, if enabling compression would save 1MB, while optimizing images wo
uld save 500kB, the enable compression rule would have 2x the impact of the imag
e optimization rule, all other things being equal.", |
| 303 "format": "double", |
| 304 "type": "number" |
| 305 }, |
| 306 "summary": { |
| 307 "$ref": "PagespeedApiFormatStringV2", |
| 308 "description": "A brief summary descript
ion for the rule, indicating at a high level what should be done to follow the r
ule and what benefit can be gained by doing so." |
| 309 }, |
| 310 "urlBlocks": { |
| 311 "description": "List of blocks of URLs.
Each block may contain a heading and a list of URLs. Each URL may optionally inc
lude additional details.", |
| 312 "items": { |
| 313 "properties": { |
| 314 "header": { |
| 315 "$ref": "PagespeedApiFormatS
tringV2", |
| 316 "description": "Heading to b
e displayed with the list of URLs." |
| 317 }, |
| 318 "urls": { |
| 319 "description": "List of entr
ies that provide information about URLs in the url block. Optional.", |
| 320 "items": { |
| 321 "properties": { |
| 322 "details": { |
| 323 "description": "
List of entries that provide additional details about a single URL. Optional.", |
| 324 "items": { |
| 325 "$ref": "Pag
espeedApiFormatStringV2" |
| 326 }, |
| 327 "type": "array" |
| 328 }, |
| 329 "result": { |
| 330 "$ref": "Pagespe
edApiFormatStringV2", |
| 331 "description": "
A format string that gives information about the URL, and a list of arguments fo
r that format string." |
| 332 } |
| 333 }, |
| 334 "type": "object" |
| 335 }, |
| 336 "type": "array" |
| 337 } |
| 338 }, |
| 339 "type": "object" |
| 340 }, |
| 341 "type": "array" |
| 342 } |
| 343 }, |
| 344 "type": "object" |
| 345 }, |
| 346 "description": "Dictionary of formatted rule results
, with one entry for each PageSpeed rule instantiated and run by the server.", |
| 347 "type": "object" |
| 348 } |
| 349 }, |
| 350 "type": "object" |
| 351 }, |
| 352 "id": { |
| 353 "description": "Canonicalized and final URL for the document
, after following page redirects (if any).", |
| 354 "type": "string" |
| 355 }, |
| 356 "invalidRules": { |
| 357 "description": "List of rules that were specified in the req
uest, but which the server did not know how to instantiate.", |
| 358 "items": { |
| 359 "type": "string" |
| 360 }, |
| 361 "type": "array" |
| 362 }, |
| 363 "kind": { |
| 364 "default": "pagespeedonline#result", |
| 365 "description": "Kind of result.", |
| 366 "type": "string" |
| 367 }, |
| 368 "pageStats": { |
| 369 "description": "Summary statistics for the page, such as num
ber of JavaScript bytes, number of HTML bytes, etc.", |
| 370 "properties": { |
| 371 "cssResponseBytes": { |
| 372 "description": "Number of uncompressed response byte
s for CSS resources on the page.", |
| 373 "format": "int64", |
| 374 "type": "string" |
| 375 }, |
| 376 "flashResponseBytes": { |
| 377 "description": "Number of response bytes for flash r
esources on the page.", |
| 378 "format": "int64", |
| 379 "type": "string" |
| 380 }, |
| 381 "htmlResponseBytes": { |
| 382 "description": "Number of uncompressed response byte
s for the main HTML document and all iframes on the page.", |
| 383 "format": "int64", |
| 384 "type": "string" |
| 385 }, |
| 386 "imageResponseBytes": { |
| 387 "description": "Number of response bytes for image r
esources on the page.", |
| 388 "format": "int64", |
| 389 "type": "string" |
| 390 }, |
| 391 "javascriptResponseBytes": { |
| 392 "description": "Number of uncompressed response byte
s for JS resources on the page.", |
| 393 "format": "int64", |
| 394 "type": "string" |
| 395 }, |
| 396 "numberCssResources": { |
| 397 "description": "Number of CSS resources referenced b
y the page.", |
| 398 "format": "int32", |
| 399 "type": "integer" |
| 400 }, |
| 401 "numberHosts": { |
| 402 "description": "Number of unique hosts referenced by
the page.", |
| 403 "format": "int32", |
| 404 "type": "integer" |
| 405 }, |
| 406 "numberJsResources": { |
| 407 "description": "Number of JavaScript resources refer
enced by the page.", |
| 408 "format": "int32", |
| 409 "type": "integer" |
| 410 }, |
| 411 "numberResources": { |
| 412 "description": "Number of HTTP resources loaded by t
he page.", |
| 413 "format": "int32", |
| 414 "type": "integer" |
| 415 }, |
| 416 "numberStaticResources": { |
| 417 "description": "Number of static (i.e. cacheable) re
sources on the page.", |
| 418 "format": "int32", |
| 419 "type": "integer" |
| 420 }, |
| 421 "otherResponseBytes": { |
| 422 "description": "Number of response bytes for other r
esources on the page.", |
| 423 "format": "int64", |
| 424 "type": "string" |
| 425 }, |
| 426 "textResponseBytes": { |
| 427 "description": "Number of uncompressed response byte
s for text resources not covered by other statistics (i.e non-HTML, non-script,
non-CSS resources) on the page.", |
| 428 "format": "int64", |
| 429 "type": "string" |
| 430 }, |
| 431 "totalRequestBytes": { |
| 432 "description": "Total size of all request bytes sent
by the page.", |
| 433 "format": "int64", |
| 434 "type": "string" |
| 435 } |
| 436 }, |
| 437 "type": "object" |
| 438 }, |
| 439 "responseCode": { |
| 440 "description": "Response code for the document. 200 indicate
s a normal page load. 4xx/5xx indicates an error.", |
| 441 "format": "int32", |
| 442 "type": "integer" |
| 443 }, |
| 444 "ruleGroups": { |
| 445 "additionalProperties": { |
| 446 "description": "The name of this rule group: one of \"SP
EED\" or \"USABILITY\".", |
| 447 "properties": { |
| 448 "score": { |
| 449 "description": "The score (0-100) for this rule
group, which indicates how much better a page could be in that category (e.g. ho
w much faster, or how much more usable). A high score indicates little room for
improvement, while a lower score indicates more room for improvement.", |
| 450 "format": "int32", |
| 451 "type": "integer" |
| 452 } |
| 453 }, |
| 454 "type": "object" |
| 455 }, |
| 456 "description": "A map with one entry for each rule group in
these results.", |
| 457 "type": "object" |
| 458 }, |
| 459 "screenshot": { |
| 460 "$ref": "PagespeedApiImageV2", |
| 461 "description": "Base64-encoded screenshot of the page that w
as analyzed." |
| 462 }, |
| 463 "title": { |
| 464 "description": "Title of the page, as displayed in the brows
er's title bar.", |
| 465 "type": "string" |
| 466 }, |
| 467 "version": { |
| 468 "description": "The version of PageSpeed used to generate th
ese results.", |
| 469 "properties": { |
| 470 "major": { |
| 471 "description": "The major version number of PageSpee
d used to generate these results.", |
| 472 "format": "int32", |
| 473 "type": "integer" |
| 474 }, |
| 475 "minor": { |
| 476 "description": "The minor version number of PageSpee
d used to generate these results.", |
| 477 "format": "int32", |
| 478 "type": "integer" |
| 479 } |
| 480 }, |
| 481 "type": "object" |
| 482 } |
| 483 }, |
| 484 "type": "object" |
| 485 } |
| 486 }, |
| 487 "servicePath": "pagespeedonline/v2/", |
| 488 "title": "PageSpeed Insights API", |
| 489 "version": "v2" |
| 490 } |
OLD | NEW |