Endpoint
Unstable version
https://api.renderly.io/unstable/try
Stable version
https://api.renderly.io/stable/try
Features
Rendering API
Method | Path Parameter |
---|---|
POST |
/:something |
Path Parameter
Required |
---|
false |
When path parameter exists, it works to navigate the URL combined with source.origin
of the request body.
Request Body
Full parameters
{
"debug": true,
"source": {
"origin": "https://shop.polymer-project.org",
"type": "html",
"content": "<html><head></head><body></body></html"
},
"renderer": {
"waitForDocumentSelectorMatches": "shop-image",
"waitForDocumentEvent": "finish"
"webComponents": true,
"statusCode": [
{
"selectorMactches": "[data-is-404]",
"status": 404
}
]
},
"blockedURLs": [
"*.css",
"*.jpg",
"*.png"
],
"timeout": 3000
}
debug
Required | Type |
---|---|
false |
booelan |
When this is true
, JSON including performance measurement value and HTTP status code will be returned.
source
Required | Type |
---|---|
true |
object |
origin
(string) - required - URL of the document origintype
('url'
|'html'
) - Type ofcontent
parametercontent
(string) - Public URL or string of HTML to actually render
Example
{
"origin": "https://shop.polymer-project.org",
"type": "html",
"content": "<html><head></head><body></body></html"
}
renderer
Required | Type |
---|---|
false |
object |
waitForDocumentSelectorMatches
(string) - Wait for elements matching this CSS selector to appearwaitForDocumentEvent
(string) - Wait for this event to be dispatchedwebComponents
(boolean) - Enable to Shady DOM and Shady CSSstatusCode
(Array<map>)selectorMactches
(string) - required - When elements that matches this CSS selector exists, returnedstatus
property as HTTP status codestatus
(number)- required - HTTP status code
Example
{
"waitForDocumentSelectorMatches": "shop-image",
"waitForDocumentEvent": "finish"
"webComponents": true,
"statusCode": [
{
"selectorMactches": "[data-is-404]",
"status": 404
}
]
}
blockedURLs
Required | Type |
---|---|
false |
array |
Array<string> - Blocks URLs from loading
Example
[
"*.css",
"*.jpg",
"*.png"
]
timeout
Required | Type |
---|---|
false |
number |
Maximum waiting time for rendering. (default is 3000
ms)