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 origin
  • type ('url' | 'html') - Type of content parameter
  • content (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 appear
  • waitForDocumentEvent (string) - Wait for this event to be dispatched
  • webComponents (boolean) - Enable to Shady DOM and Shady CSS
  • statusCode (Array<map>)
    • selectorMactches (string) - required - When elements that matches this CSS selector exists, returned status property as HTTP status code
    • status (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)

results matching ""

    No results matching ""