Infographics


GET /pages/generateJSON

Retrieves the infographic’s object or information that has tag in json format. In place of the id you should put the canvas ID.

Resource URL

https://www.easel.ly/pages/generateJSON?id=https%3A%2F%2Fs3.amazonaws.com%2Feasel.ly%2Fall_easels%2F310246%2F1544516577

Parameters

Name Required Description
id yes String; ID of the canvas

Return value

Returns JSON request in the following format.

Field name Type Field description
id String Canvas ID
tag String Object’s tag to identify which information to be modify
type String Indicates object’s data type
text String Indicates object’s label or text detail
fill String Indicates object’s color in hexadecimal format (eg: white #FFFFFF)
src String URL to the object’s image

Example request

curl -X GET "https://www.easel.ly/pages/generateJSON?id=https%3A%2F%2Fs3.amazonaws.com%2Feasel.ly%2Fall_easels%2F310246%2F1544516577" -H "accept: application/json"  
-H "apiKey: 034h9e0y7sdj1msha6hvvwxrm3c0x5aa"

Example response

Response headers

access-control-allow-origin: * 
connection: keep-alive          
content-type: application/json                
date: Mon, 25 Mar 2019 09:36:00 GMT          
server: nginx/1.10.1           
transfer-encoding: chunked          
x-powered-by: PHP/7.0.27

Response body

{
    "id": "https://s3.amazonaws.com/easel.ly/all_easels/310246/1544516577",
    "objects": [
        {
        "tag": "header",
        "type": "textbox",
        "text": "VENN DIAGRAMS SHOW DYNAMIC INFORMATION",
        "fill": "#000000"
        },
        {
        "tag": "header_detail",
        "type": "textbox",
        "text": "AND ARE GREAT TO LOOK AT",
        "fill": "#333333"
        },      
        {
        "tag": "line",
        "type": "path",
        "text": "null",
        "fill": "#000000"
        },           
        {   
        "tag": "imagetag",
        "type": "image",
        "src": "https://www.easel.ly/assets/uploader/files/475861021542391147.jpg"
        }
    ] 
}

POST /pages/generatePDF

Generates infographic in PDF format with the modified content in tag, fill or src by the given canvas id.

Resource URL

https://www.easel.ly/pages/generatePDF

Parameters

Name Type Required Description
content String yes Contents of the infographic to be generated. See content JSON format
id String yes Canvas ID
tag String no Object’s tag to identify which information to be modify
type String no Indicates object’s data type
text String no Indicates object’s label or text detail
fill String no Indicates object’s color in hexadecimal format (eg: white #FFFFFF)
src String no URL to the object’s image. Src will be available for PNG or JPG images.

Example request

curl -X POST "https://www.easel.ly/pages/generatePDF" -H "accept: application/json" -H "apiKey: 034h9e0y7sdj1msha6hvvwxrm3c0x5aa" -H "Content-Type: application/json" -d "{
\"id\": \"https://s3.amazonaws.com/easel.ly/all_easels/310246/1544516577\", \"objects\": [ { \"tag\": \"circle_left2\", \"type\": \"path\", \"text\": null, \"fill\": \"#000000\" } ]}"

Example response

Response headers

access-control-allow-origin: * 
connection: keep-alive     
content-disposition: attachment; filename="882951.pdf"       
content-type: application/pdf                
date: Mon, 25 Mar 2019 09:36:00 GMT          
server: nginx/1.10.1           
transfer-encoding: chunked          
x-powered-by: PHP/7.0.27

Response body

Download file

POST /pages/generateImage

Generates infographic in PNG format with the modified content in tag, fill or src by the given canvas id.

Resource URL

https://www.easel.ly/pages/generateImage

Parameters

Name Type Required Description
content String yes Contents of the infographic to be generated. See content JSON format
id String yes Canvas ID
tag String no Object’s tag to identify which information to be modify
type String no Indicates object’s data type
text String no Indicates object’s label or text detail
fill String no Indicates object’s color in hexadecimal format (eg: white #FFFFFF)
src String no URL to the object’s image. Src will be available for PNG or JPG images.

Example request

curl -X POST "https://www.easel.ly/pages/generateImage " -H "accept: application/json" -H "apiKey: 034h9e0y7sdj1msha6hvvwxrm3c0x5aa" -H "Content-Type: application/json" -d "{ 
\"id\": \"https://s3.amazonaws.com/easel.ly/all_easels/310246/1544516577\", \"objects\": [ { \"tag\": \"circle_left2\", \"type\": \"path\", \"text\": null, \"fill\": \"#000000\" } ]}"

Example response

Response headers

access-control-allow-origin: * 
connection: keep-alive     
content-type: application/json                 
date: Mon, 25 Mar 2019 09:36:00 GMT          
server: nginx/1.10.1           
transfer-encoding: chunked          
x-powered-by: PHP/7.0.27

Response body

Download file

POST /pages/generateNewInfographic

Copies infographic by the given canvas id and generates a new one with the modified content in tag, fill or src.

Resource URL

https://www.easel.ly/pages/generateNewInfographic

Parameters

Name Type Required Description
content String yes Contents of the infographic to be generated. See content JSON format
id String yes Canvas ID
tag String no Object’s tag to identify which information to be modify
type String no Indicates object’s data type
text String no Indicates object’s label or text detail
fill String no Indicates object’s color in hexadecimal format (eg: white #FFFFFF)
src String no URL to the object’s image. Src will be available for PNG or JPG images.

Example request

curl -X POST "https://www.easel.ly/pages/generateNewInfographic" -H "accept: application/json" -H "apiKey: 034h9e0y7sdj1msha6hvvwxrm3c0x5aa" -H "Content-Type: application/json" -d "{ \"id\": \"https://s3.amazonaws.com/easel.ly/all_easels/310246/1552896829\", \"objects\": [ {
\"tag\": \"tag2\", \"type\": \"textbox\", \"text\": \"VHEMES sample\", \"fill\": \"#06E506\" }, { \"tag\": \"tag3\", \"type\": \"textbox\", \"text\": \"vhemes = visual + themes\start by dragging a pre\designed vheme onto \the canvas\", \"fill\": \"#06E506\" }, {
\"tag\": \"b\", \"type\": \"textbox\", \"text\": \" drag and drop icons\", \"fill\": \"#06E506\" }, { \"tag\": \"tag1\", \"type\": \"path-group\", \"text\": null, \"fill\": \"#00ccff\" } ]}"

Example response

Response headers

access-control-allow-origin: * 
connection: keep-alive     
content-disposition: attachment; filename="882951.pdf"       
content-type: application/pdf                
date: Mon, 25 Mar 2019 09:36:00 GMT          
server: nginx/1.10.1           
transfer-encoding: chunked          
x-powered-by: PHP/7.0.27

Response body

{
    "httpCode": 200,     
    "User Link": "https://www.easel.ly/create?id=https://s3.amazonaws.com/easel.ly/all_easels/310246/1553632345&key=pri"                
}

PUT /pages/updateInfographic

Update infographic (tag, fill or src).

Resource URL

https://www.easel.ly/pages/updateInfographic

Parameters

Name Type Required Description
content String yes Contents of the infographic to be generated. See content JSON format
id String yes Canvas ID
tag String no Object’s tag to identify which information to be modify
type String no Indicates object’s data type
text String no Indicates object’s label or text detail
fill String no Indicates object’s color in hexadecimal format (eg: white #FFFFFF)
src String no URL to the object’s image. Src will be available for PNG or JPG images.

Example request

curl -X PUT "https://dev.easel.ly/pages/updateInfographic" -H "accept: application/json" -H "apiKey: 034h9e0y7sdj1msha6hvvwxrm3c0x5aa" -H "Content-Type: application/json" -d "{ \"id\": \"https://s3.amazonaws.com/easel.ly/all_easels/310246/1552896829\", \"objects\": [ {
\"tag\": \"tag2\", \"type\": \"textbox\", \"text\": \"VHEMES sample\", \"fill\": \"#06E506\" }, { \"tag\": \"tag3\", \"type\": \"textbox\", \"text\": \"vhemes = visual + themes\start by dragging a pre\designed vheme onto \the canvas\", \"fill\": \"#06E506\" }, {
\"tag\": \"b\", \"type\": \"textbox\", \"text\": \" drag and drop icons\", \"fill\": \"#06E506\" }, { \"tag\": \"tag1\", \"type\": \"path-group\", \"text\": null, \"fill\": \"#00ccff\" } ]}"

Example response

Response headers

access-control-allow-origin: * 
connection: keep-alive     
content-disposition: attachment; filename="882951.pdf"       
content-type: application/pdf                
date: Mon, 25 Mar 2019 09:36:00 GMT          
server: nginx/1.10.1           
transfer-encoding: chunked          
x-powered-by: PHP/7.0.27

Response body

{
    "httpCode": 200,     
    "User Link": "https://www.easel.ly/create?id=https://s3.amazonaws.com/easel.ly/all_easels/310246/1552896829&key=pri                
}

Easel.ly © Copyright 2018