ZOOMABLE API (BETA)

No registration required.
Like our service? Buy us a beer!
Question? Email us at zoomable1@gmail.com

POST Image Upload

https://srv2.zoomable.ca/api/image

Upload a new image.

Key Required Description
image required A binary file. (up to 30MB, JPG or TIF)

Example Request

<?php

$filename = 'filename.jpg';
$filetype = 'image/jpeg';

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://srv2.zoomable.ca/api/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('image' => curl_file_create($filename, $filetype, $filename)),
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: multipart/form-data;",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

Example Response

{
"success": 1,
"id": "{{imageHash}}",
"viewer_url": "https:\/\/srv2.zoomable.ca\/viewer_api.php?i={{imageHash}}"
}

GET Image

https://srv2.zoomable.ca/api/image/{{imageHash}}

Get information about an image.

Example Request

<?php

$id = '{{imageHash}}';

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://srv2.zoomable.ca/api/image/" . $id,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

Example Response

{
"is_processed": 1,
"id": "V00",
"viewer_url": "https:\/\/srv2.zoomable.ca\/viewer_api.php?i={{imageHash}}"
}