forked from APIs-guru/openapi-directory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
1358 lines (1356 loc) · 42 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
swagger: "2.0"
schemes:
- https
host: api.browshot.com
basePath: /api/v1
info:
contact:
email: [email protected]
name: API Support
url: https://browshot.com/contact
description: Take screenshots of any website in real time
termsOfService: https://browshot.com/terms
title: Browshot API
version: 1.17.0
x-apisguru-categories:
- tools
x-logo:
url: https://cdn.browshot.com/static/images/logo.png
x-origin:
- format: swagger
url: https://raw.githubusercontent.com/juliensobrier/browshot-api-spec/master/browshot.yaml
version: "2.0"
x-providerName: browshot.com
produces:
- application/json
securityDefinitions:
apiKeyQuery:
in: query
name: key
type: apiKey
security:
- apiKeyQuery: []
paths:
/account/info:
get:
description: Get information about your account.
operationId: GetAccountInfo
parameters:
- default: 1
description: level of information returned
in: query
maximum: 3
minimum: 1
name: details
type: integer
responses:
"200":
description: Account information
schema:
$ref: "#/definitions/Account"
default:
description: Account not found
schema:
$ref: "#/definitions/AccountError"
summary: Get information about your account
tags:
- Account
x-ms-trigger: single
/batch/ceate:
post:
consumes:
- multipart/form-data
description: |
Get hundreds or thousands of screenshots from a text file. You can use this API call or the dashboard. Unlike the other API calls, you must issue a POST request with the Content-Type "multipart/form-data" in order to upload the text file. The text file must contain the list of URLs to request, 1 URL per line. Failed screenshots will be tried up to 3 times before giving up.
operationId: CreateBatch
parameters:
- description: instance ID to use
in: formData
name: instance_id
required: true
type: integer
- description: text file to use
in: formData
name: file
type: file
- default: screen
description: screenshots size - "screen" (default) or "page"
enum:
- screen
- page
in: formData
name: size
type: string
- description: name of the batch
in: formData
name: name
type: string
- default: 1024
description: thumbnail width.
in: formData
maximum: 2000
minimum: 1
name: width
type: integer
- description: thumbnail height
in: formData
maximum: 15000
minimum: 1
name: height
type: integer
- default: 5
description: number of seconds to wait after the page has loaded. This is used to let JavaScript run longer before taking the screenshot. Use delay=0 to take screenshots faster.
in: formData
maximum: 60
minimum: 0
name: delay
type: integer
- default: 10
description: number of seconds to wait after the page has loaded if Flash elements are present. Use flash_delay=0 to take screenshots faster.
in: formData
maximum: 30
minimum: 0
name: flash_delay
type: integer
- default: 1024
description: width of the browser window. For desktop browsers only.
in: formData
maximum: 2000
minimum: 1
name: screen_width
type: integer
- default: 768
description: "height of the browser window. For desktop browsers only. (Note: full-page screenshots can have a height of up to 15,000px)"
in: formData
maximum: 2000
minimum: 1
name: screen_height
type: integer
- description: assign priority to the screenshot (for private instances only)
in: formData
maximum: 3
minimum: 1
name: priority
type: integer
- description: use a custom referrer header - paid screenshots only
in: formData
name: referer
type: string
- description: send a POST requests with post_data, useful for filling out forms - paid screenshots only
in: formData
name: post_data
type: string
- description: set a cookie for the URL requested (see Custom POST Data, Referer and Cookie) Cookies should be separated by a ; - paid screenshots only
in: formData
name: cookie
type: string
- description: URL of javascript file to execute after the page load event
in: formData
name: script
type: string
- default: 2
description: level of information available with screenshot/info
in: formData
maximum: 3
minimum: 1
name: details
type: integer
- default: 0
description: saves the HTML of the rendered page which can be retrieved by the API call screenshot/html. This feature costs *1 credit* per screenshot.
in: formData
maximum: 1
minimum: 0
name: html
type: integer
- default: 0
description: "maximum number of seconds to wait before triggering the PageLoad event. Note that delay will still be used. (default: 0 = disabled)"
in: formData
maximum: 60
minimum: 0
name: max_wait
type: integer
- description: any custom HTTP headers. (Not supported with Internet Explorer)
in: formData
name: headers
type: string
- default: png
description: image as PNG or JPEG
enum:
- png
- jpeg
in: formData
name: format
type: string
- description: hosting option - s3 or browshot
enum:
- s3
in: query
name: hosting
type: string
- description: maximum height of the thumbnail to host
in: query
maximum: 15000
minimum: 1
name: hosting_height
type: integer
- description: maximum height of the thumbnail to host
in: query
maximum: 2000
minimum: 1
name: hosting_width
type: integer
- default: 1
description: scale of the thumbnail to host
format: float
in: query
name: hosting_scale
type: number
- description: S3 bucket to upload the screenshot or thumbnail (required for S3)
in: query
name: hosting_bucket
type: string
- description: file name to use (for S3 only)
in: query
name: hosting_file
type: string
- description: list of headers to add to the S3 object (for S3 only)
in: query
name: hosting_headers
type: string
responses:
"200":
description: batch information
schema:
items:
$ref: "#/definitions/Batch"
type: array
default:
description: Batch not created
schema:
$ref: "#/definitions/BatchError"
summary: Requests thousands of screenshtos at once
tags:
- Batch
x-ms-trigger: none
/batch/info:
get:
description: |
Get the status of a batch requested through the API or through the dashboard.
operationId: GetBatchInfo
parameters:
- description: batch ID
in: query
name: id
required: true
type: integer
responses:
"200":
description: batch information
schema:
$ref: "#/definitions/Batch"
default:
description: Batch not found
schema:
$ref: "#/definitions/BatchError"
summary: Get the batch status
tags:
- Batch
/browser/info:
get:
description: Get information about a browser.
operationId: GetBrowserInfo
parameters:
- description: browser ID
in: query
name: id
required: true
type: integer
responses:
"200":
description: Browser information
schema:
$ref: "#/definitions/Browser"
default:
description: Browser not found
schema:
$ref: "#/definitions/BrowserError"
summary: Get information about a browser
tags:
- Browser
x-ms-visibility: none
/browser/list:
get:
description: Get all browsers.
operationId: GetBrowsersInfo
responses:
"200":
description: Instance information
schema:
$ref: "#/definitions/BrowserList"
default:
description: Account not found
schema:
$ref: "#/definitions/BrowserError"
summary: Get all browsers
tags:
- Browser
x-ms-visibility: none
/instance/info:
get:
description: Get information about an instance.
operationId: GetInstanceInfo
parameters:
- description: instance ID
in: query
name: id
required: true
type: integer
responses:
"200":
description: Instance information
schema:
$ref: "#/definitions/Instance"
default:
description: Account not found
schema:
$ref: "#/definitions/InstanceError"
summary: Get information about an instance
tags:
- Instance
x-ms-visibility: none
/instance/list:
get:
description: Get all instances.
operationId: GetInstancesInfo
responses:
"200":
description: Instance information
schema:
$ref: "#/definitions/InstanceList"
default:
description: Account not found
schema:
$ref: "#/definitions/InstanceError"
summary: Get all instances
tags:
- Instance
x-ms-visibility: none
/screenshot/create:
get:
description: |
Screenshots requests to private and shared instances require a positive balance.
*IMPORTANT*: Remember that you can only do 100 free screenshots per month. To used a premium instance, use instance_id=65 for example.
operationId: CreateScreenshot
parameters:
- description: URL of the page to get a screenshot for
in: query
name: url
required: true
type: string
- description: instance ID to use
in: query
name: instance_id
required: true
type: integer
- default: screen
description: screenshot size - "screen" (default) or "page"
enum:
- screen
- page
in: query
name: size
type: string
- default: 86400
description: use a previous screenshot (same URL, same instance) if it was done within <cache_value> seconds. The default value is 24hours. Specify cache=0 if you want a new screenshot.
in: query
name: cache
type: integer
- default: 5
description: number of seconds to wait after the page has loaded. This is used to let JavaScript run longer before taking the screenshot. Use delay=0 to take screenshots faster.
in: query
maximum: 60
minimum: 0
name: delay
type: integer
- default: 10
description: number of seconds to wait after the page has loaded if Flash elements are present. Use flash_delay=0 to take screenshots faster.
in: query
maximum: 30
minimum: 0
name: flash_delay
type: integer
- default: 1024
description: width of the browser window. For desktop browsers only.
in: query
maximum: 2000
minimum: 1
name: screen_width
type: integer
- default: 768
description: "height of the browser window. For desktop browsers only. (Note: full-page screenshots can have a height of up to 15,000px)"
in: query
maximum: 2000
minimum: 1
name: screen_height
type: integer
- description: assign priority to the screenshot (for private instances only)
in: query
maximum: 3
minimum: 1
name: priority
type: integer
- description: use a custom referrer header - paid screenshots only
in: query
name: referer
type: string
- description: send a POST requests with post_data, useful for filling out forms - paid screenshots only
in: query
name: post_data
type: string
- description: set a cookie for the URL requested (see Custom POST Data, Referer and Cookie) Cookies should be separated by a ; - paid screenshots only
in: query
name: cookie
type: string
- description: URL of javascript file to execute after the page load event
in: query
name: script
type: string
- default: 2
description: level of information available with screenshot/info
in: query
maximum: 3
minimum: 1
name: details
type: integer
- default: 0
description: saves the HTML of the rendered page which can be retrieved by the API call screenshot/html. This feature costs *1 credit* per screenshot.
in: query
maximum: 1
minimum: 0
name: html
type: integer
- default: 0
description: "maximum number of seconds to wait before triggering the PageLoad event. Note that delay will still be used. (default: 0 = disabled)"
in: query
maximum: 60
minimum: 0
name: max_wait
type: integer
- description: any custom HTTP headers. (Not supported with Internet Explorer)
in: query
name: headers
type: string
- default: 1
description: take multiple screenshots of the same page. This costs 1 additional credit for every 2 additional screenshots.
in: query
maximum: 10
minimum: 1
name: shots
type: integer
- default: 5
description: number of seconds between 2 screenshots
in: query
maximum: 10
minimum: 1
name: shot_interval
type: integer
- description: hosting option - s3 or browshot
enum:
- s3
- browshot
in: query
name: hosting
type: string
- description: maximum height of the thumbnail to host
in: query
maximum: 15000
minimum: 1
name: hosting_height
type: integer
- description: maximum height of the thumbnail to host
in: query
maximum: 2000
minimum: 1
name: hosting_width
type: integer
- default: 1
description: scale of the thumbnail to host
format: float
in: query
name: hosting_scale
type: number
- description: S3 bucket to upload the screenshot or thumbnail (required for S3)
in: query
name: hosting_bucket
type: string
- description: file name to use (for S3 only)
in: query
name: hosting_file
type: string
- description: list of headers to add to the S3 object (for S3 only)
in: query
name: hosting_headers
type: string
responses:
"200":
description: Request accepted
schema:
$ref: "#/definitions/Screenshot"
"403":
description: Error
schema:
$ref: "#/definitions/ScreenshotError"
summary: Request a screenshot
tags:
- Screenshot
x-ms-trigger: none
/screenshot/delete:
get:
description: |
You can delete details of your screenshots to remove any confidential information.
operationId: DeleteScreenshot
parameters:
- description: screenshot ID
in: query
name: id
required: true
type: integer
- default: image
description: |
data to remove. You can specify multiple of them (separated by a ,): *image* (image files), *url* (url requested), *metadata* (time added, time finished, post data, cookie and referer used for the screenshot), *all* (all data and files)
in: query
name: data
type: string
responses:
"200":
description: list of screenshot information
schema:
items:
$ref: "#/definitions/ScreenshotShort"
type: array
default:
description: Screenshot not found
schema:
$ref: "#/definitions/ScreenshotError"
summary: Delete screenshot data
tags:
- Screenshot
x-ms-trigger: none
/screenshot/host:
get:
description: You can host screenshots and thumbnails on your own S3 account or on Browshot.
operationId: HostScreenshot
parameters:
- description: screenshot ID
in: query
name: id
required: true
type: integer
- description: "hosting option: s3 or browshot"
enum:
- s3
- browshot
in: query
name: hosting
required: true
type: string
- description: width of the thumbnail
in: query
maximum: 2000
minimum: 1
name: width
type: integer
- description: height of the thumbnail
in: query
maximum: 15000
minimum: 1
name: height
type: integer
- default: 1
description: scale of the thumbnail
format: double
in: query
name: scale
type: number
- description: S3 bucket to upload the screenshot or thumbnail - required with hosting=s3
in: query
name: bucket
type: string
- description: file name to use - optional, used with hosting=s3
in: query
name: file
type: string
- description: HTTP headers to add to your S3 object - optional, used with hosting=s3
in: query
name: headers
type: string
responses:
"200":
description: list of screenshot information
schema:
items:
$ref: "#/definitions/ScreenshotHost"
type: array
default:
description: Screenshot not found
schema:
$ref: "#/definitions/ScreenshotInfoError"
summary: Host thumbnails on your own S3 account or on Browshot.
tags:
- Screenshot
x-ms-trigger: none
/screenshot/html:
get:
description: |
Retrieve the HTML code of the rendered page. This API call should be used when html=1 was specified in the screenshot request.
operationId: GetHTML
parameters:
- description: screenshot ID
in: query
name: id
required: true
type: integer
produces:
- text/html
responses:
default:
description: HTML code
summary: Get the HTML code
tags:
- Screenshot
/screenshot/info:
get:
description: Once a screenshot has been requested, its status must be checked until it is either "error" or "finished".
operationId: GetScreenshotInfo
parameters:
- description: screenshot ID received from /api/v1/screenshot/create
in: query
name: id
required: true
type: integer
- default: 2
description: level of details about the screenshot and the page
in: query
maximum: 3
minimum: 0
name: details
type: integer
responses:
"200":
description: Screenshot found
schema:
items:
$ref: "#/definitions/Screenshot"
type: array
default:
description: Screenshot not found
schema:
$ref: "#/definitions/ScreenshotInfoError"
summary: Query screenshot status
tags:
- Screenshot
/screenshot/list:
get:
description: Get information about the last 100 screenshots requested.
operationId: GetMultipleScreenshotsInfo
parameters:
- default: 100
description: maximum number of screenshots' information to return
in: query
maximum: 100
minimum: 1
name: limit
type: integer
- description: get list of screenshot in a given status (error, finished, in_process)
enum:
- error
- finished
- in_process
in: query
name: status
type: string
responses:
"200":
description: list of screenshot information
schema:
items:
$ref: "#/definitions/ScreenshotList"
type: array
default:
description: Screenshot not found
schema:
$ref: "#/definitions/ScreenshotError"
summary: Get information about screenshots
tags:
- Screenshot
x-ms-visibility: none
/screenshot/multiple:
get:
description: |
Request multiple screenshots in one API call. The API call accepts all the parameters supported by screenshot/create.
You can specify up to 10 URLs and 10 instances for a total of 100 screenshots in one API call.
operationId: CreateMultipleScreenshots
parameters:
- description: URL of the page to get a screenshot for. You can specify multiple url parameters (up to 10).
in: query
name: url
required: true
type: string
- description: instance ID to use. You can specify multiple instance_id parameters (up to 10).
in: query
name: instance_id
required: true
type: integer
- default: screen
description: screenshot size - "screen" (default) or "page"
enum:
- screen
- page
in: query
name: size
type: string
- default: 86400
description: use a previous screenshot (same URL, same instance) if it was done within <cache_value> seconds. The default value is 24hours. Specify cache=0 if you want a new screenshot.
in: query
name: cache
type: integer
- default: 5
description: number of seconds to wait after the page has loaded. This is used to let JavaScript run longer before taking the screenshot. Use delay=0 to take screenshots faster.
in: query
maximum: 60
minimum: 0
name: delay
type: integer
- default: 10
description: number of seconds to wait after the page has loaded if Flash elements are present. Use flash_delay=0 to take screenshots faster.
in: query
maximum: 30
minimum: 0
name: flash_delay
type: integer
- default: 1024
description: width of the browser window. For desktop browsers only.
in: query
maximum: 2000
minimum: 1
name: screen_width
type: integer
- default: 768
description: "height of the browser window. For desktop browsers only. (Note: full-page screenshots can have a height of up to 15,000px)"
in: query
maximum: 2000
minimum: 1
name: screen_height
type: integer
- description: assign priority to the screenshot (for private instances only)
in: query
maximum: 3
minimum: 1
name: priority
type: integer
- description: use a custom referrer header - paid screenshots only
in: query
name: referer
type: string
- description: send a POST requests with post_data, useful for filling out forms - paid screenshots only
in: query
name: post_data
type: string
- description: set a cookie for the URL requested (see Custom POST Data, Referer and Cookie) Cookies should be separated by a ; - paid screenshots only
in: query
name: cookie
type: string
- description: URL of javascript file to execute after the page load event
in: query
name: script
type: string
- default: 2
description: level of information available with screenshot/info
in: query
maximum: 3
minimum: 1
name: details
type: integer
- default: 0
description: saves the HTML of the rendered page which can be retrieved by the API call screenshot/html. This feature costs *1 credit* per screenshot.
in: query
maximum: 1
minimum: 0
name: html
type: integer
- default: 0
description: "maximum number of seconds to wait before triggering the PageLoad event. Note that delay will still be used. (default: 0 = disabled)"
in: query
maximum: 60
minimum: 0
name: max_wait
type: integer
- description: any custom HTTP headers. (Not supported with Internet Explorer)
in: query
name: headers
type: string
- description: hosting option - s3 or browshot
enum:
- s3
- browshot
in: query
name: hosting
type: string
- description: maximum height of the thumbnail to host
in: query
maximum: 15000
minimum: 1
name: hosting_height
type: integer
- description: maximum height of the thumbnail to host
in: query
maximum: 2000
minimum: 1
name: hosting_width
type: integer
- default: 1
description: scale of the thumbnail to host
format: float
in: query
name: hosting_scale
type: number
- description: S3 bucket to upload the screenshot or thumbnail (required for S3)
in: query
name: hosting_bucket
type: string
- description: file name to use (for S3 only)
in: query
name: hosting_file
type: string
- description: list of headers to add to the S3 object (for S3 only)
in: query
name: hosting_headers
type: string
responses:
"200":
description: Request accepted
schema:
$ref: "#/definitions/ScreenshotList"
"403":
description: Error
schema:
$ref: "#/definitions/ScreenshotError"
summary: Request multiple screenshots
tags:
- Screenshot
x-ms-trigger: none
/screenshot/search:
get:
description: Search for screenshots of a specific URL.
operationId: SearchScreenshot
parameters:
- description: look for a string matching the URL requested
in: query
name: url
required: true
type: string
- default: 50
description: maximum number of screenshots' information to return
in: query
maximum: 100
minimum: 1
name: limit
type: integer
- description: get list of screenshot in a given status (error, finished, in_process)
enum:
- error
- finished
- in_process
in: query
name: status
type: string
responses:
"200":
description: list of screenshot information
schema:
items:
$ref: "#/definitions/ScreenshotList"
type: array
default:
description: Screenshot not found
schema:
$ref: "#/definitions/ScreenshotError"
summary: Search for screenshots
tags:
- Screenshot
x-ms-visibility: none
/screenshot/share:
get:
description: |
You can make your screenshots public, add notes, and share it with your friends and colleagues. Only screenshots which are successfully completed can be shared.n the thumbnail. You can take a 1024x768 screenshot, crop it to 768x768, and get it scaled down to 300x300.
operationId: ShareScreenshot
parameters:
- description: screenshot ID
in: query
name: id
required: true
type: integer
- description: note to add on the sharing page
in: query
name: note
type: string
responses:
"200":
description: list of screenshot information
schema:
items:
$ref: "#/definitions/ScreenshotHost"
type: array
default:
description: Screenshot not found
schema:
$ref: "#/definitions/ScreenshotInfoError"
summary: Share a screenshot
tags:
- Screenshot
x-ms-trigger: none
/screenshot/thumbnail:
get:
description: |
Unlike the other API calls, this API sends back the thumbnail as a PNG file, not JSON. The HTTP response code indicates whether the screenshot was successful (200), or incomplete (404) or failed (404). If the screenshot failed or is not finished, a default image "Not found" is sent.
You can crop your screenshots. The crop is done first, then the thumbnail. You can take a 1024x768 screenshot, crop it to 768x768, and get it scaled down to 300x300.
operationId: GetThumbnail
parameters:
- description: screenshot ID
in: query
name: id
required: true
type: integer
- description: width of the thumbnail
in: query
maximum: 2000
minimum: 1
name: width
type: integer
- description: height of the thumbnail
in: query
maximum: 15000
minimum: 1
name: height
type: integer
- default: 1
description: scale of the thumbnail
format: double
in: query
name: scale
type: number
- default: 100
description: zoom 1 to 100 percent
in: query
maximum: 100
minimum: 1
name: zoom
type: integer
- default: fit
description: "Use fit to keep the original page ration, and fill to get a thumbnail for the exact width and height. specified. If you provide both width and height, you need to specify the ratio: fit to keep the original width/height ratio (the thumbnail might be smaller than the specified width and height), or fill to crop the image if necessary."
enum:
- fit
- fill
in: query
name: ratio
type: string
- default: 0
description: left edge of the area to be cropped
in: query
minimum: 0
name: left
type: integer
- default: 0
description: right edge of the area to be cropped
in: query
minimum: 0
name: right
type: integer
- default: 0
description: top edge of the area to be cropped
in: query
minimum: 0
name: top
type: integer
- description: bottom edge of the area to be cropped
in: query
name: bottom
type: integer
- default: png
description: image as PNG or JPEG
enum:
- png
- jpeg
in: query
name: format
type: string
- default: 1
description: get the second or third screenshot if multiple screenshots were requested
in: query
maximum: 10
minimum: 1
name: shot
type: integer
- default: 100
description: JPEG quality factor (for JPEG thumbnails only)
in: query
maximum: 100
minimum: 1