GET infographics/:id
Retrieves infographic or the information of it the in the given format. In place of the :id
you should put the the ID of an infographic.
Resource URL
https://infogr.am/service/v1/infographics/:id
Parameters
Name | Required | Description |
---|---|---|
format | no | String, default json . Format in which the requested infographic should be retrieved. Choose from json , pdf , png , or html . |
Return value
In case of JSON request format, returns the JSON string with the following field structure:
Field name | Type | Field description |
---|---|---|
id | String | Infographic ID |
title | String | Infographic title |
theme_id | Integer | Theme identifier of the infographic |
published | Boolean | Indicates whether infographic is published or not |
thumbnail_url | String | URL to the infographic thumbnail image |
date_modified | Date | Latest modification date of the infographic |
url | String | If published is equal to true , URL to the infographic that can be viewed in a web browser |
embed_responsive | String | If published is equal to true , HTML markup for embedding the infographic - “responsive” |
When JSON format is requested, response contains header Content-Type: application/json
.
In case of PDF and PNG formats, returns byte stream and the response contains header Content-Type: application/pdf
or Content-Type: image/png
accordingly.
Example request
curl -XGET -D- "http://infogr.am/service/v1/infographics/e04ceaf9-5a3f-4c5b-9d24-455e89d97e89?api_key=nMECGhmHe9&api_sig=KcWNcfbp%2BPKk%3D&embedType=&format=json"