About

Version no : 0.9.5.2

Last Update 2018-11-26

Authentication

Details
Zoolz intelligent API uses the OAuth 2.0 protocol for simple, but effective authentication and authorization. OAuth 2.0 is much easier to use than previous schemes and developers can start using the intelligent API almost immediately.
Do you need to authenticate?
Zoolz intelligent API requires authentication - specifically requests made on behalf of a user. Authenticated requests require an access_token. These tokens are unique to a user and should be stored securely.
Receiving an access_token

In order to receive an access_token, you must do the following:

  1. Enabling API Access :
    • Open users/servers page.
    • In the users section click on public API button.
      this will navigate you to the public API settings page.
    • In toggle public API section click on enable public API.
    • A confirmation box will appear click "yes" To enable The API.
  2. You will find the current account Access_Token( clientID , clientSecret ) in the account Settings Page.
  3. You can access the client secret for each user in the current account by doing the following:
    • Open users/servers page.
    • Click on the right side dots on any given user and then click on "Show Public Api Tokens".
    • A box will appear containing the Access_token for the selected user.

List Devices

Details
Gets a list of used devices and there info.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "ListDevices" string

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Your device IP address is blocked Blocked IP Address

Response Body (json)

[
    {
        "GUID": string,
        "DeviceName":string,
        "HotCapacity": long,
        "ColdCapacity": long,
        "UsedSpace": long,
        "ColdUsedSpace":long,
        "Status": int,
        "CreateDate": long,
        "LastActivityDate": long,
        "NickName":string,
        "DeviceType": int,
        "DeviceSubType": int,
        "OCRLimit": int,
        "UsedOCR": int,
        "IsCustomDevice": bool
    }
]

Response Body (Description)

Parameter Name Description Type
GUID Shows the device GUID. bool
DeviceName Shows the Device name. int
HotCapacity Shows the device hot capacity in bytes. In case the value is -1 that means that there is no limit. long
ColdCapacity Shows the device cold capacity in bytes. In case the value is -1 that means that there is no limit. long
UsedSpace Shows the device hot storage used Space on bytes. long
ColdUsedSpace Shows the device cold storage used Space in bytes. long
Status Shows the status of the device ( Active = 0 , Suspend =1, Archive =2, PendingActivate =3) int
CreateDate Shows the file creation date. (FileTime UTC) long
LastActivityDate Shows the last activity date.(FileTime UTC) long
NickName Shows the nickname of the device (Base64). string
DeviceType Shows the device main type ( PC = 0 , Vault = 1 , Mobile = 2 ). int
DeviceSubType Shows the device sub type ( Desktop = 0 , Laptop = 1, Vault = 2, Android = 4, IPhone = 5 ) int
OCRLimit Shows the Device OCR limit. In case the value is -1 that means that there is no limit. int
UsedOCR Shows the number of used OCR. int
IsCustomDevice Show if the Device is created by the public APIs or not. bool

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "ListDevices");

    WebResponse response = request.GetResponse();

   
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        string responseBody = string.Empty;
        //Read the response body
        using (var reader = new System.IO.StreamReader(response.GetResponseStream()))
        {
            responseBody = reader.ReadToEnd();
        }
        Response.ContentType = "application/json";
        Response.Write(responseBody);
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: ListDevices');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //the request is successful.

            // do whatever you want with the body
            
            echo $body;        
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}

Request();
?>

Create Device

Details
Create new device.

Request Headers GET :

Parameter Name Description Type Values
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID Provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name"CreateDevice" string
DeviceNamerequired The Device Name (Base64). string
NickNameoptional The Device NickName (Base64). string
HotCapacityoptional Set the hot storage capacity in giga bytes. default is no limit. The value -1 is no limit. int
ColdCapacityoptional Set the cold storage capacity in giga bytes. default is no limit. The value -1 is no limit. int
OCRLimitoptional Set the device OCR limit. default is no limit. The value -1 is no limit. int
DeviceTyperequired Set the device Type. int
Value Description
0 PC
2 Mobile
DeviceSubTyperequired Set the device syb Type. int
Value Description
0 Desktop
1 Laptop
4 Android
5 IPhone

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3010 DeviceName is invalid base64 string.
2070 Invalid Access Token
2018 DataBase Failed to add device
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
3017 Invalid Variable Input
3019 Devices Limit Reached
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceName The "DeviceName" header is required but was not sent
Missing required header member: please send DeviceType The "DeviceType" header is required but was not sent
Missing required header member: please send DeviceSubType The "DeviceSubType" header is required but was not sent
DeviceName is invalid base64 string. The header "DeviceName" value is not base64 string
NickName is invalid base64 string. The header "DeviceName" value is not base64 string
DeviceType inserted is invalid. The DeviceType inserted is invalid.
DeviceSubType inserted is invalid. The DeviceSubType inserted is invalid.
DeviceType inserted does not exist. The DeviceType must be of type ( PC or Mobile ).
DeviceSubType inserted does not exist. The DeviceSubType must be of type (Desktop, Laptop , Android, IPhone).
DeviceSubType must be of type (Desktop, Laptop). The DeviceSubType must be of type (Desktop, Laptop) because DeviceType inserted is of type ( PC ).
DeviceSubType must be of type (Android, IPhone). The DeviceSubType must be of type (Android, IPhone) because DeviceType inserted is of type ( Mobile ).
This user has reached the maximum amount of mobiles under the account. users plan maximum number of devices has been reached.
This user has reached the maximum amount of computers under the account. users plan maximum number of devices has been reached.
Your device IP address is blocked Blocked IP Address

Response Body (json)

                                        
[
    {
        "GUID": string,
        "DeviceName":string,
        "HotCapacity": long,
        "ColdCapacity": long,
        "Status": int,
        "CreateDate": long,
        "NickName":string,
        "DeviceType": int,
        "DeviceSubType": int,
        "OCRLimit": int,
        "IsCustomDevice": bool
    }
]
                                        

Response Body (description)

Parameter Name Description Type
Guid Shows the device GUID. bool
DeviceName Shows the Device name. int
NickName Shows the nickname of the device (Base64). string
HotCapacity Shows the device hot capacity in bytes. In case the value is -1 that means that there is no limit. long
ColdCapacity Shows the device cold capacity in bytes. In case the value is -1 that means that there is no limit. long
Status Shows the status of the device ( Active = 0 , Suspend =1, Archive =2, PendingActivate =3) int
CreateDate Shows the file creation date. (FileTime UTC) long
DeviceType Shows the device main type ( PC = 0 , Vault = 1 , Mobile = 2 ). int
DeviceSubType Shows the device sub type ( Desktop = 0 , Laptop = 1, Vault = 2, Android = 4, IPhone = 5 ) int
OCRLimit Shows the Device OCR limit. In case the value is -1 that means that there is no limit. int
IsCustomDevice Show if the Device is created by the public APIs or not. bool

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "CreateDevice");
    //The Request DeviceName Header
    request.Headers.Add("DeviceName", "VGVzdERldmljZQ==");

    WebResponse response = request.GetResponse();
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 

        string body = string.Empty;
        using (StreamReader reader = new StreamReader(response.GetResponseStream()))
        {
            body = reader.ReadToEnd();
        }

    // Do whatever you want with the body
    Response.ContentType = "application/json";
    Response.Write(body);
  }
  else
  {
    // There is an error check the Error Code and Error Message
    Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " +  response.Headers["ErrorMessage"]);
  }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: CreateDevice',
                    //The Request DeviceName Header
                    'DeviceName: VGVzdERldmljZQ==');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //the request is successful.
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}

Request();
?>

Delete Device

Details
Delete custom device.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID Provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "DeleteDevice" string
DeviceGUIDrequired The required Device GUID to be deleted string

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3000 Missing required header member.
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3009 The device is not a custom device or a cloud drive device.
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
The device is not a custom device The device you are trying to delete is not custom device
Your device IP address is blocked Blocked IP Address

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "DeleteDevice");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "FC2F250F97B7478F8DA450114A214D3E");
    
    WebResponse response = request.GetResponse();
    
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
        //the device has been deleted.
    }
    else
    {
       // There is an error check the Error Code and Error Message
       Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch (Exception)
{
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: DeleteDevice',
                    //The Request DeviceGUID Header
                    'DeviceGUID: FC2F250F97B7478F8DA450114A214D3E');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //the request is successful.
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}

//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>
Details
Gets files metadata by the search options specified.

Request Headers POST :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientID required The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "SearchFiles" string
DeviceGUIDoptional The GUID of the required device to make search on, default is null and the search will be done on all the devices on the user account. string
PageIndexrequired The page index int
PageLimitrequired Files in each page limit (max number is 50) int

Request Body (json)

                            
{
    "SearchQuery":string,
    "SearchFields":int,
    "SizeFilter":int,
    "CustomSizeFrom":int,
    "CustomSizeTo":int,
    "DateModifyFilter":int,
    "CustomDateModifyFrom":int,
    "CustomDateModifyTo":int,
    "DocumentTypeFilter":int,
    "OCRTypeFilter":int,
    "OtherExtentionFilter":string,
    "OtherExcludeExtentions":[list of string,{string},{string},{...}],
    "AudioExtentionFilter":string,
    "AudioExcludeExtentions":[list of string,{string},{string},{...}],
    "AudioDurationFilter":int,
    "CustomAudioFrom":int,
    "CustomAudioTo":int,
    "VideoExtentionFilter":string,
    "VideoExcludeExtentions":[list of string,{string},{string},{...}],
    "VideoDurationFilter":int,
    "CustomVideoFrom":long,
    "VideoDimensionFilter":int,
    "CustomVideoTo":int,
    "CustomVideoWidth":int,
    "CustomVideoHeight":long,
    "PicExtentionFilter":string,
    "PicExcludeExtentions":[list of string,{string},{string},{...}],
    "PicDimensionFilter":int,
    "CustomPicWidth":int,
    "CustomPicHeight":int,
    "PicCameraType":string,
    "PicColorTypeFilter":int,
    "PicDateCreation":int,
    "CustomPicCreationDateFrom":int,
    "CustomPicCreationDateTo":int,
    "TypeFilter":int,
    "SortType":int,
    "SearchTags":bool,
    "NeedAggregates":int,
    "IsFromTagSuggested":bool,
    "FilterPath":int,
    "SearchMode":int,
    "TagType":int
}
                            

Request body (Description)

Parameter Name Description Type Values
SearchQuery optional search query of what the user wants. string To get all files send the value of the SearchQuery as empty.
SearchFields optional you can specify what the user want to search
Send the Value.
int
Value Description
0 All
1 Face Name
2 File Name
4 Tags
8 Social Tags
16 AI Tags
32 Camera Name
64 Camera Maker
128 Description
256 AI Description
512 Content
1024 OCRContent
TypeFilter optional filter the type of files to search in.
Send the Value.
int
Value Description
0 All Types
1 Documents
2 Photos
4 Videos
8 Audio
16 OCR
32 other
64 Folders
128 All types excluding Folders
SizeFilter optional This filter is used for if the user want to filter his result using Size. if the user sent the value as "Custom" then these filters must be sent : CustomSizeFrom , CustomSizeTo for sizeFilter
Send the Value.
int
Value Description
-1 None
0 Less Than MB
1 MB To Five MB
2 Five MB To Hundred MB
3 Hundred MB To GB
4 More Than GB
5 Custom
CustomSizeFrom optional This needs to be sent if user choose a custom size filter and it must be in bytes. long
CustomSizeTo optional This needs to be sent if SizeFilter is set to custom and it must be in bytes. long
DateModifyFilter optional This filter is used for if the user want to filter his result using Date Modify, in this filter if send it as Custom you must send the CustomDateModifyFrom and CustomDateModifyTo .. for DateModifyFilter
Send the Value.
int
Value Description
-1 None
0 Past 24 Hours
1 Past Week
2 Past 2 Weeks
3 Past Month
4 Past Year
5 Older Than Year
6 Custom
CustomDateModifyFrom optional This needs to be sent if DateModifyFilter is set to custom and it must be in long “FileTime” string
CustomDateModifyTo optional This needs to be sent if DateModifyFilter is set to custom and it must be in long “FileTime” string
DocumentTypeFilter optional This filter used when TypeFilter value is document . choose the document type ..
Send the Value
int
Value Description
0 Word And Text
1 Presentation
2 Spreadsheets
3 PDF
4 Ebook , for the extension ( epub )
5 Other
OCRTypeFilter optional This filter used when TypeFilter value is ocr.
then choose the ocr type ..
Send the Value
string
Value Description
0 JPG
1 PDF
2 TIFF
3 Other
OtherExtentionFilter optional This filter used if TypeFilter is set to other and the value will be string for the specific extension that the user choose. string
OtherExcludeExtentions optional This will be sent only TypeFilter is set to other. string
AudioExtentionFilter optional This filter used when TypeFilter value is audio. choose the Extension Filter and the value will be string for the specific extension that the user choose. if the value is “other” in the AudioExtentionFilter. string
AudioExcludeExtentions optional This will be sent only if TypeFilter value is “audio”. string
AudioDurationFilter optional This filter used when TypeFilter value is audio.
choose Duration Filter, in this filter If you send “Custom” then you will need to send CustomAudioFrom And CustomAudioTo. for AudioDurationFilter ..
send the Value
int
Value Description
-1 None
0 Less Than Min
1 Minute To Ten
2 Ten To Thirty
3 Thirty To Hour
4 Hour To Two
5 More Than Two
6 Custom
CustomAudioFrom optional This needs to be sent if AudioDurationFilter is set to custom long
CustomAudioTo optional This needs to be sent if AudioDurationFilter is set to custom. long
VideoExtentionFilter optional This filter used when TypeFilter is set to video.
choose the Extension Filter and the value will be string for the specific extension that the user choose. if “other” is the value of VideoExtentionFilter the you need to Send VideoExcludeExtentions filter values.
string
VideoExcludeExtentions optional This will be sent only if TypeFilter is set to video. the values will be the extensions that we return to you from the aggregations. string
VideoDurationFilter optional This filter used when TypeFilter is set to video.
In this filter if send "custom" then you will need to send CustomVideoFrom filter and CustomVideoTo. for VideoDurationFilter ..
Send the Value
int
Value Description
0 None
0 Less Than Min
1 Minute To Ten
2 Ten To Thirty
3 Thirty To Hour
4 Hour To Two
5 More Than Two
6 Custom
CustomVideoFromoptional This needs to be sent if VideoDurationFilter is set to custom. long
CustomVideoTo optional This needs to be sent if VideoDurationFilter is set to custom. long
VideoDimensionFilter optional This filter used when TypeFilter value is video.
If you send “Custom” then you will need to send CustomVideoWidth filter and CustomVideoTo filter. for VideoDimensionFilter ..
Send the Value
int
Value Description
-1 None
0 SD
1 HD
2 FHD
3 QHD
4 UHD
5 Custom
CustomVideoWidth optional This needs to be sent if VideoDimensionFilter is set to custom. long
CustomVideoHeight optional This needs to be sent if VideoDimensionFilter is set to custom. long
PicExtentionFilter optional This filter used when TypeFilter value is photo.
the value will be string for the specific extension that the user choose and if he choose “other” from the Extension Filter then you need to send the value “other” and you need to send PicExcludeExtentions filter.
string
PicExcludeExtentions optional This will be sent only if TypeFilter is set to other. string
PicDimensionFilter optional This filter used when TypeFilter is set to photo.
choose Dimension Filter which will return photos larger than the selected filter.
If you send “Custom” then you will need to send CustomPicWidth filter and CustomPicHeight filter. for PicDimensionFilter ..
Send the Value
int
Value Description
-1 None
0 Small
1 Medium
2 Large
3 Larger than 400_300
4 Larger than 640_480
5 Larger than 800 - 600
6 Larger than 1024 - 768
7 Larger than 1600 - 1200
8 Larger than 2272 - 1704
10 Custom
CustomPicWidth optional This needs to be sent if PicDimensionFilter is set to custom. long
CustomPicHeight optional This needs to be sent if PicDimensionFilter is set to custom long
PicCameraType optional This filter value must contatin the camera full name ,This filter used if TypeFilter is set to "photo" and SearchFields is set to "Camera Name" string
PicColorTypeFilter optional This filter used if TypeFilter is set to photo ..
Send the Value
int
Value Description
-1 None
0 Red
1 Cyan
2 White
3 Yellow
4 Blue
5 Brown
6 Gray
7 Green
8 Black
9 Orange
10 Pink
11 Purple
12 BlacknWhite
13 MultiColor
PicDateCreation optional This filter used TypeFilter is set to photo. If you send “Custom” then you will need to send CustomPicCreationDateFrom filter and CustomPicCreationDateTo filter. for PicDateCreation ..
Send the Value
int
Value Description
-1 None
0 Past24Hours
1 PastWeek
2 Past2Weeks
3 PastMonth
4 PastYear
5 OlderThanYear
6 Custom
CustomPicCreationDateTo optional This needs to be sent if PicDateCreation is set to custom long
CustomPicCreationDateFrom optional This needs to be sent if PicDateCreation is set to custom long
SortType optional filter the Sort type of the files to show.
Send the Value
int
Value Description
0 Score Descending
2 File Name Descending
3 File Name Ascending
4 Date Modified Descending
5 Date Modified Ascending
6 Size Descending
7 Size Ascending
10 Backup Date Descending
11 Backup Date Ascending
12 Version Number Ascending
14 Date Modified Descending Processed
15 Date Modified Ascending Processed
16 Processed Descending
SearchTags optional if sent as true, the search will get the files with specific tags bool
IsFromTagSuggested optional If sent true the result will be the files with the tag of "examlpe" And the files with the tags that contains the characters "examlpe" and you must send “SearchTags” Filter as true.
if send as false , the result will be the files with the tag of "example" only
bool
FilterPath optional Send the parent path to search in size specific folder. string
SearchMode optional This filter used to when you want to get files from Search/Browse/Favorites Files int
Value Description
0 Search
1 Favorites
3 Shares
4 Browse
TagType optional This filter used for AI Tags and you must send "SearchTags" Filter as true to read this filter ..
Send the Value
int
Value Description
1 User Tags
2 Smart Tags
4 Social Tags
8 All Tags

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3002 Required filter is missing
3015 Elastic failed
3017 Invalid Variable Input
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3004 json text is not in correct format
3007 Files Not Found
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Missing required header member: please send PageIndex The "PageIndex" header is required but was not sent
Missing required header member: please send PageLimit The "PageLimit" header is required but was not sent
PageIndex is not in correct format ( int ) The "PageIndex" header is not in correct format ( int )
PageLimit is not in correct format ( int ) The "PageLimit" header is not in correct format ( int )
Value of PageIndex must be greater than (-1). "PageIndex" Minimum value is zero
Value of PageLimit must be greater than (-1). "PageLimit" Minimum value is zero
CustomSizeTo filter is missing The size filter is sent as "custom". The "CustomSizeTo" filter is required but was not sent.
CustomSizeFrom filter is missing The SizeFilter is sent as "custom". The "CustomSizeFrom" filter is required but was not sent
CustomDateModifyTo filter is missing The DateModifyFilter is sent as "custom". The "CustomDateModifyTo" filter is required but was not sent
CustomDateModifyFrom filter is missing The DateModifyFilter is sent as "custom". The "CustomDateModifyFrom" filter is required but was not sent
CustomAudioTo filter is missing CustomAudioTo needs to be sent if user choose a custom audio duration filter.
CustomAudioFrom filter is missing CustomAudioFrom needs to be sent if user choose a custom audio duration filter
CustomVideoTo filter is missing The "CustomVideoTo" filter is required but was not sent
CustomVideoFrom filter is missing CustomVideoFrom needs to be sent if user choose a custom video duration filter
CustomPicHeight filter is missing CustomPicHeight needs to be sent if user choose a custom photo dimension filter
CustomPicWidth filter is missing CustomPicWidth needs to be sent if user choose a custom photo dimension filter.
TypeFilter is not of type photos The "TypeFilter" filter is required but was not sent
CustomPicCreationDateTo filter is missing CustomPicCreationDateTo needs to be sent if user choose a custom date filter
CustomPicCreationDateFrom filter is missing CustomPicCreationDateFrom needs to be sent if user choose a custom date filter
json text is not in correct format The json provided in the request body is either an incorrect format json or the body is empty.
Files Not Found. Check DeviceGUID then retry again. The file requested is not found.
Files Not Found In This Account. The file requested is not found.
Your device IP address is blocked Blocked IP Address

Response Body (json)

                            
{
    "IsThereMore": false,
    "NextPageIndex": 0,
    "Files": [
        {
            "FileGUID":string,
            "FileType": string,
            "FileName": string,
            "Extension": string,
            "FileSize": long,
            "ModificationDate": long,
            "IsFavoriteFile": bool,
            "FilePath": string,
            "TranscodedSdSize": long,
            "TranscodedHdSize": long,
            "WidthResolution": long,
            "HieghtResolution": long,
            "ParentPath": string,
            "IsFolder": bool,
            "DocumentLanguage": string,
            "PageCount": int,
            "SmallThumbURL": string,
            "MeduimThumbURL": string,
            "CroppedThumbURL": string,
            "LargeThumbURL": string,
            "TranscodedVideoSdURL": string,
            "TranscodedVideoHdURL": string,
            "TranscodedAudioURL": string,
            "IsColdFile":bool,
            "DeviceName" : string
        }
    ]
}
                            

Response Body (Description)

Parameter Name Description Type
IsThereMore Shows that is there more files on the next page or not bool
NextPageIndex Shows From which file index the next page will start int
FileName The File Name ( base64 ) string
FileGUID The file GUID string
FileType The Type of the file ( documents , video , audio , photos , ocr , folders , raw files ) string
FileName The name Of the file string
Extension The file extension string
FileSize The size of the file in bytes long
ModificationDate The file modification Date (FileTime UTC) long
IsFavoriteFile Shows Is the file favorite or not bool
FilePath The file full Path string
TranscodedSdSize Shows the sd size in bytes for the vedio file. long
TranscodedHdSize Shows the hd size in bytes for the vedio file. long
WidthResolution Shows the width resolution for the video file. int
HieghtResolution Shows the hieght resolution for the video file. int
ParentPath The Parent File Path (Base64). string
IsFolder indicats if the file is folder or not. bool
DocumentLanguage Show the Document Language. string
PageCount Shows the page count for the document file. int
SmallThumbURL Shows the small thumb URL for images and videos (if exists) string
MeduimThumbURL Shows the meduim thumb URL for images and videos (if exists) string
CroppedThumbURL Shows the cropped thumb URL for images only (if exists) string
LargeThumbURL Shows the Large thumb URL for images only (if exists) string
TranscodedVideoSdURL Shows the sd video URL for the file. string
TranscodedVideoHdURL Shows the hd video URL for videos that have HD video only (if exists) string
TranscodedAudioURL Shows the audio URL for audio files only. string
IsColdFile Shows if the file is a cold storage file or not. bool
DeviceName The device name that the file belongs to. (base64) string

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "POST";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header 
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "SearchFiles");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request PageIndex Header
    request.Headers.Add("PageIndex", "0");
    //The Request PageLimit Header
    request.Headers.Add("PageLimit", "50");

    //The Request Body
    string body = "{'SearchQuery':' '}";

    var encoding = ASCIIEncoding.ASCII;
    byte[] bytes = encoding.GetBytes(body);
    request.ContentLength = bytes.Length;
    using (Stream stream = request.GetRequestStream())
    {
        stream.Write(bytes, 0, bytes.Length);
    }

    WebResponse response = request.GetResponse();

    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
        string responseBody = string.Empty;
        //Read the response body
        using (StreamReader reader = new StreamReader(response.GetResponseStream()))
        {
            responseBody = reader.ReadToEnd();
        }
    
        // Do whatever you want with the body
        Response.ContentType = "application/json";
        Response.Write(responseBody);
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }

}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';
        //the request
        $body = "{'SearchQuery':' '}";

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: SearchFiles',
                    //The Request DeviceGUID Header
                    'DeviceGUID: FC2F250F97B7478F8DA450114A214D3E',
                    'PageIndex: 0',
                    'PageLimit:50');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "POST",
            //The request body
            CURLOPT_POSTFIELDS => ($body)
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //the request is successful.

            // do whatever you want with the body
            
            echo $body;        
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}

//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>
Details
Gets the required file metadata.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientID required The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "GetFileInfo" string
DeviceGUIDrequired The GUID of the required device. string
FileGUIDrequired The GUID of the required file. string

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3007 File Not Found
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Missing required header member: please send FileGUID The "FileGUID" header is required but was not sent
File Not Found. Check FileGUID and DeviceGUID then retry again. File requested was not found.
Your device IP address is blocked Blocked IP Address

Response Body (json)

                            
{
        {
            "FileGUID":string,
            "FileType": string,
            "FileName": string,
            "FileFullPath": string,
            "Extension": string,
            "FileSize": long,
            "ModificationDate": long,
            "IsFavoriteFile": bool,
            "TranscodedSdSize": long,
            "TranscodedHdSize": long,
            "WidthResolution": long,
            "HieghtResolution": long,
            "ParentPath": string,
            "IsFolder": bool,
            "DocumentLanguage": string,
            "PageCount": int,
            "SmallThumbURL": string,
            "MeduimThumbURL": string,
            "CroppedThumbURL": string,
            "LargeThumbURL": string,
            "TranscodedVideoSdURL": string,
            "TranscodedVideoHdURL": string,
            "TranscodedAudioURL": string,
            "FileDownloadURL": string,
            "Tags": string array,
            "IsColdFile": bool,
            "Camera" : string,
            "DeviceName": string,
            "CreationDate": long,
            "UploadDate": long
        }
}
                            

Response Body (Description)

Parameter Name Description Type
FileGUID The file GUID string
FileType The Type of the file ( documents , video , audio , photos , ocr , folders , raw files ) string
FileName The File Name ( base64 ) string
FileFullPath Shows the Full Path of the file ( base64 ). string
Extension The file extension string
FileSize The size of the file in bytes long
ModificationDate The file modification Date (FileTime UTC) long
IsFavoriteFile Shows Is the file favorite or not bool
TranscodedSdSize Shows the sd size in bytes for the vedio file. long
TranscodedHdSize Shows the hd size in bytes for the vedio file. long
WidthResolution Shows the width resolution for the video file. int
HieghtResolution Shows the hieght resolution for the video file. int
ParentPath The Parent File Path (Base64). string
IsFolder indicats if the file is folder or not. bool
DocumentLanguage Show the Document Language. string
PageCount Shows the page count for the document file. int
SmallThumbURL Shows the small thumb URL for images and videos (if exists) string
MeduimThumbURL Shows the meduim thumb URL for images and videos (if exists) string
CroppedThumbURL Shows the cropped thumb URL for images only (if exists) string
LargeThumbURL Shows the Large thumb URL for images only (if exists) string
TranscodedVideoSdURL Shows the sd video URL for the file. string
TranscodedVideoHdURL Shows the hd video URL for videos that have HD video only (if exists) string
TranscodedAudioURL Shows the audio URL for audio files only. string
FileDownloadURL Shows the original download URL for the file. string
Tags Shows the file tags. string array
IsColdFile Shows if the file is a cold storage file or not. bool
Camera Shows the Camera Type of the file. string
DeviceName Shows the device Name of the file. string
CreationDate Shows the create date of the file (FileTime UTC). long
UploadDate Shows the upload date of the file (FileTime UTC). long

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "GetFileInfo");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "6F7381473A094790B479D5CF7B3E3D60");

    WebResponse response = request.GetResponse();
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The request succeeded. 
        // Write Your code Here to retreave the Response Body ...
    
        string responseBody = string.Empty;
        //Read the response body
        using (StreamReader reader = new StreamReader(response.GetResponseStream()))
        {
            responseBody = reader.ReadToEnd();
        }
    
        // Do whatever you want with the body
        Response.ContentType = "application/json";
        Response.Write(responseBody);
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: GetFileInfo',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FileGUID Header
                    'FileGUID: 6F7381473A094790B479D5CF7B3E3D60');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //the request is successful.

            // do whatever you want with the body
            
            echo $body;        
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}

//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Add Tags By File GUID

Details
Add tags to the file by file GUID.

Request Headers POST :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "AddTagsByFileGUID" string
DeviceGUIDrequired The GUID of the required Device string
FileGUIDrequired The GUID of the required File. string
The AddTagsByFileGUID API takes about ( 1 Second ) to compleate the proccess , so you will not observe the change on the file in this time period ( 1 Second Period ).

Request body


[
     {"Tags": string}
]   
                             
To add multiple tags put a comma "," between each tag.

Response

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3002 Key does not exist
3005 Tag max length exceeded. max length is 50 characters.
3006 Tags max count exceeded. max count is 50 tags.
3015 Elastic failed
3004 json text is not in correct format
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3007 File Not Found
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Missing required header member: please send FileGUID The "FileGUID" header is required but was not sent
Tags Key does not exist The json key "Tags" does not exist
Tag max length exceeded. max length is 50 characters. Each tag max length is 50 characters . a tag with more than 50 characters where inserted.
Tags max count exceeded. max count is 50 tags. Each file is allowed to have 50 tags. the tags inserted is more than 50 tags
json text is not in correct format The json provided in the request body is either an incorrect format json or the body is empty.
File Not Found. Check FileGUID and DeviceGUID then retry again. The file requested is not on this Device.
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Your device IP address is blocked Blocked IP Address

Example

                            
try
{
    //The Request Method
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "POST";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "AddTagsByFileGUID");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "6F7381473A094790B479D5CF7B3E3D60");
    //The Request Body
    string body = "[{ 'Tags': 'tag1,tag2,tag3'}]";
    
    var encoding = ASCIIEncoding.ASCII;
    byte[] bytes = encoding.GetBytes(body);
    request.ContentLength = bytes.Length;
    Stream stream = request.GetRequestStream();
    stream.Write(bytes, 0, bytes.Length);
    WebResponse response = request.GetResponse();
    
    
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';
        //The request Body
        $body = "[{ 'Tags': 'tag1,tag2,tag3'}]";

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: AddTagsByFileGUID',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FileGUID Header
                    'FileGUID: 6F7381473A094790B479D5CF7B3E3D60');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "POST",
            //The request body
            CURLOPT_POSTFIELDS => ($body)
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);

        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //the request is successful.
            echo 'Tags Added successfully';
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Update Tags By File GUID

Details
Update tags of the file by file GUID.

Request Headers POST :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "UpdateTagsByFileGUID" string
DeviceGUIDrequired The GUID of the required Device string
FileGUIDrequired The GUID of the required File. string
The UpdateTagsByFileGUID API takes about ( 230 milliseconds ) to compleate the proccess , so you will not observe the change on the file in this time period ( 230 milliseconds Period ).

Request body


[
     {"Tags": string}
]   
                             
To update multiple tags put a comma "," between each tag.

Response

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3002 Tag Keys does not exist
3005 Tag max length exceeded. max length is 50 characters.
3006 Tags max count exceeded. max count is 50 tags.
3004 json text is not in correct format
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3007 File Not Found
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Missing required header member: please send FileGUID The "FileGUID" header is required but was not sent
Tags Key does not exist The json key "Tags" does not exist
Tag max length exceeded. max length is 50 characters. Each tag max length is 50 characters . a tag with more than 50 characters where inserted.
Tags max count exceeded. max count is 50 tags. Each file is allowed to have 50 tags. the tags inserted is more than 50 tags
json text is not in correct format The json provided in the request body is either an incorrect format json or the body is empty.
File Not Found. Check FileGUID and DeviceGUID then retry again. The file requested is not on this Device.
Your device IP address is blocked Blocked IP Address

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "POST";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "UpdateTagsByFileGUID");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "6F7381473A094790B479D5CF7B3E3D60");

    //The Request Body
    string body = "[{ 'Tags': 'tag1,tag2,tag3'}]";
    
    var encoding = ASCIIEncoding.ASCII;
    byte[] bytes = encoding.GetBytes(body);
    request.ContentLength = bytes.Length;
    Stream stream = request.GetRequestStream();
    stream.Write(bytes, 0, bytes.Length);
    WebResponse response = request.GetResponse();
     
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';
        //The request Body
        $body = "[{ 'Tags': 'tag1,tag2,tag3'}]";

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: UpdateTagsByFileGUID',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FileGUID Header
                    'FileGUID: 6F7381473A094790B479D5CF7B3E3D60');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "POST",
            //The request body
            CURLOPT_POSTFIELDS => ($body)
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Add Favorite File

Details
Add the file to the favorites.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "AddFavoriteFile" string
DeviceGUIDrequired The GUID of the required Device. string
FileGUIDrequired The GUID of the required File. string
The AddFavoriteFile API takes about ( 1 second ) to compleate the proccess of making the file a favorite file, so you cannot request any processing on the file in this time period ( 1 second Period ).

Response

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3007 File Not Found.
2013 Wrong Device GUID
3015 Elastic Failed
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2012 Device Suspended
2015 Device Deleted
3007 File Not Found
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID. The "ClientID" header is required but was not sent.
Missing required header member: please send ClientSecret. The "ClientSecret" header is required but was not sent.
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID. The "DeviceGUID" header is required but was not sent.
Missing required header member: please send FileGUID. The "FileGUID" header is required but was not sent.
File Not Found. Check FileGUID and DeviceGUID then retry again. The file requested is not found.
The file dosn't exist in this machine The file requested is not on this Device.
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
File is already a favoriate file. The file is already a favoriate file.
Your device IP address is blocked Blocked IP Address

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "AddFavoriteFile");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "6F7381473A094790B479D5CF7B3E3D60");

    WebResponse response = request.GetResponse();
   
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: AddFavoriteFile',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566'
                    //The Request FileGUID Header
                    'FileGUID: 6F7381473A094790B479D5CF7B3E3D60');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Remove Favorite File

Details
Remove the file from the favorites.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "RemoveFavoriteFile" string
DeviceGUIDrequired The GUID of the required Device. string
FileGUIDrequired The GUID of the required File. string
The RemoveFavoriteFile API takes about ( 1 second ) to compleate the proccess of making the file a not favorite file, so you cannot request any processing on the file in this time period ( 1 second Period ).

Response

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3007 File Not Found.
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3007 File Not Found
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID. The "ClientID" header is required but was not sent.
Missing required header member: please send ClientSecret. The "ClientSecret" header is required but was not sent.
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID. The "DeviceGUID" header is required but was not sent.
Missing required header member: please send FileGUID. The "FileGUID" header is required but was not sent.
File Not Found. Check FileGUID and DeviceGUID then retry again. The file requested is not found.
The file dosn't exist in this machine The file requested is not on this Device.
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
File is not a favoriate file. The file is already not a favoriate file.
Your device IP address is blocked Blocked IP Address

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "RemoveFavoriteFile");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "6F7381473A094790B479D5CF7B3E3D60");

    WebResponse response = request.GetResponse();
   
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: RemoveFavoriteFile',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FileGUID Header
                    'FileGUID: 6F7381473A094790B479D5CF7B3E3D60');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

OCR File By File GUID

Details
OCR chosen file by file GUID

Request Headers GET :

Header Name Description Type Values
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name"OCRFileByFileGUID" string
DeviceGUIDrequired The GUID of the required Device. string
FileGUIDrequired The GUID of the required File. string
OCRLanguagerequired The language Of the written Text in the file. Send the Value of the language as specified. int
Value Description
0 Unknown
1 Arabic
2 Brazilian
3 Danish
4 German
5 English
6 Spanish
7 Finnish
8 French
9 Hebrew
10 Hindi
11 Italian
12 Japanese
13 Korean
14 Dutch
15 Norwegian
16 Portuguese
17 Russian
18 Swedish
19 Turkish
20 Chinese

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3007 File Not Found.
2045 Account OCR Quota Exceeded
3011 Chosen file is already an OCR file
3013 File extension must be one of these extensions ( pdf , jpg , tiff , tif )
2070 Invalid Access Token
2018 DataBase Failed
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3009 The device is not a custom device or a cloud drive device.
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Missing required header member: please send FileGUID The "FileGUID" header is required but was not sent
Missing required header member: please send OCRLanguage The "OCRLanguage" header is required but was not sent
File Not Found. Check FileGUID and DeviceGUID then retry again. File requested was not found.
Account OCR Quota Exceeded Account max OCR limit has been reached
Chosen file is already an OCR file. The file chosen is already converted to OCR file.
File extension must be one of these extensions ( pdf , jpg , tiff , tif ) The file Extenstion you chose is not one of those extenstions (pdf , jpg , tiff , tif)
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
The device is not a custom device or a cloud drive device. The device is not a custom device or a cloud drive device.
Your device IP address is blocked Blocked IP Address

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "OCRFileByFileGUID");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "6F7381473A094790B479D5CF7B3E3D60");
    //The Request OCRLanguage Header
    request.Headers.Add("OCRLanguage", "4");

    WebResponse response = request.GetResponse();
   
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: OCRFileByFileGUID',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FileGUID Header
                    'FileGUID: 6F7381473A094790B479D5CF7B3E3D60',
                    //The Request OCRLanguage Header
                    'OCRLanguage: 4',);
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Delete By File GUID

Details
Delete the file By the file GUID.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "DeleteByFileGUID" string
DeviceGUIDrequired The GUID of the required Device string
FileGUIDrequired The GUID of the required File string
IsVersionoptional The file is version or not. bool

Response

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3007 File Not Found.
3009 The device is not a custom device or a cloud drive device.
2070 Invalid Access Token
2018 DataBase Failed.
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3017 Invalid Variable Input
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Missing required header member: please send FileGUID The "FileGUID" header is required but was not sent
File Not Found. Check FileGUID and DeviceGUID then retry again. File requested was not found.
The device is not a custom device or a cloud drive device. The device is not a custom device or a cloud drive device.
IsVersion is not in correct format ( bool ) The IsVersion Header Must be a bool type
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Your device IP address is blocked Blocked IP Address

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "DeleteByFileGUID");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "6F7381473A094790B479D5CF7B3E3D60");

    WebResponse response = request.GetResponse();
   
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: DeleteByFileGUID',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FileGUID Header
                    'FileGUID: 6F7381473A094790B479D5CF7B3E3D60');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Delete By File Path

Details
Delete the file By the file full path.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "DeleteByFilePath" string
DeviceGUIDrequired The GUID of the required Device. string
FilePathrequired The Path of the required File. (Base64) string

Response

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
2013 Wrong Device GUID
3007 File Not Found.
3010 string is invalid base64 string.
3009 The device is not a custom device or a cloud drive device.
2070 Invalid Access Token
2018 DataBase Failed.
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Missing required header member: please send FilePath The "FilePath" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
FilePath is invalid base64 string. The header "FilePath" value is not base64 string
File Not Found. Check FilePath and DeviceGUID then retry again. File requested was not found.
The device is not a custom device or a cloud drive device. The device is not a custom device or a cloud drive device.
Your device IP address is blocked Blocked IP Address

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "DeleteByFilePath");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FilePath Header
    request.Headers.Add("FilePath", Convert.ToBase64String(Encoding.ASCII.GetBytes("Testfolder/test.jpg"))); //base64string

    WebResponse response = request.GetResponse();
   
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            

<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: DeleteByFilePath',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FilePath Header
                    'FilePath:'.base64_encode('test/test.jpg');
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

List Files By Parent GUID

Details
Gets files metadata by parent directory GUID.

Request Headers GET

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name"ListFilesByParentGUID" string
DeviceGUIDrequired The GUID of the required Device string
FileGUID optional The parent File GUID. string
PageIndexrequired Page index number int
PageLimitrequired number of files To Show in each page (max number is 1000) int
To get the root files don't send the FileGUID.

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3007 Files Not Found
3017 Invalid Variable Input
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Missing required header member: please send PageIndex The "PageIndex" header is required but was not sent
Missing required header member: please send PageLimit The "PageLimit" header is required but was not sent
PageIndex is not in correct format ( int ) The "PageIndex" header is not in correct format ( int )
PageLimit is not in correct format ( int ) The "PageLimit" header is not in correct format ( int )
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Files Not Found. Check FileGUID and DeviceGUID then retry again. Files requested are Not Found.
Value of PageIndex must be greater than (-1). "PageIndex" Minimum value is zero
Value of PageLimit must be greater than (-1). "PageLimit" Minimum value is zero
Your device IP address is blocked Blocked IP Address

Response Body (json)

                            
{
   "IsThereMore": false,
    "NextPageIndex": null,
    "Files": [
            {
                "FileFullPath":string,
                "FileName": string,
                "FileSize": long,
                "FileGUID": string,
                "IsFolder": bool,
                "DeviceType": int,
                "DeviceSubType": int,
                "CreateDate": long,
                "ModificationDate" : long,
                "UploadDate" : long
            }
            ]
}
                            

Response Body (Description)

Parameter Name Description Type
FullName The File Name ( base64 ) string
FileFullPath Shows the Full Path of the file ( base64 ). string
FileSize Shows the size of the file by bytes. long
FileGUID Shows the file GUID. string
IsFolder indicats if the device is of type folder or not. bool
DeviceType Shows the device main type ( PC = 0 , Vault = 1 , Mobile = 2 ). int
DeviceSubType Shows the device sub type ( Desktop = 0 , Laptop = 1, Vault = 2, Android = 4, IPhone = 5 ) int
UploadDate Shows the file upload date (FileTime UTC). long
ModificationDate Shows the file modification date (FileTime UTC). If the file is of type folder then the value will be null. long
CreateDate Shows the file create date (FileTime UTC). If the file is of type folder then the value will be null. long

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "ListFilesByParentGUID");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "6F7381473A094790B479D5CF7B3E3D60");
    //The Request PageIndex Header
    request.Headers.Add("PageIndex", "0");
    //The Request PageLimit Header
    request.Headers.Add("PageLimit", "1000");

    WebResponse response = request.GetResponse();

    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 

        string body = string.Empty;
        //Read the response body
        using (StreamReader reader = new StreamReader(response.GetResponseStream()))
        {
            body = reader.ReadToEnd();
        }

        // Do whatever you want with the body 
        Response.ContentType = "application/json";
        Response.Write(body);
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: ListFilesByParentGUID',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FileGUID Header
                    'FilePGUID: 6F7381473A094790B479D5CF7B3E3D60',
                    //The Request PageIndex Header
                    'PageIndex: 0,
                    //The Request PageLimit Header
                    'PageLimit: 2');
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
            
            // do whatever you want with the body
            
            echo $body;   
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

List All Files By Parent GUID

Details
Gets all files metadata and all subFiles in that directory by parent directory GUID.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "ListAllFilesByParentGUID" string
DeviceGUIDrequired The GUID of the required Device string
FileGUID optional The parent File GUID. string
PageIndexrequired Page index number int
PageLimitrequired Number of files To Show in each page (max number is 1000) int
To get the root files don't send the FileGUID.

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3007 Files Not Found
3017 Invalid Variable Input
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Missing required header member: please send PageIndex The "PageIndex" header is required but was not sent
Missing required header member: please send PageLimit The "PageLimit" header is required but was not sent
PageIndex is not in correct format ( int ) The "PageIndex" header is not in correct format ( int )
PageLimit is not in correct format ( int ) The "PageLimit" header is not in correct format ( int )
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Files Not Found. Check FileGUID and DeviceGUID then retry again. Files requested are Not Found.
Value of PageIndex must be greater than (-1). "PageIndex" Minimum value is zero
Value of PageLimit must be greater than (-1). "PageLimit" Minimum value is zero
Your device IP address is blocked Blocked IP Address

Response Body (json)

                            
{
    "IsThereMore": bool,
    "NextPageIndex": int,
    "Files": [
        {
            "FileFullPath":string,
            "FileName": string,
            "FileSize": long,
            "UploadDate":long,
            "FileGUID": string,
            "IsFolder": bool,
            "DeviceType": int,
            "DeviceSubType": int,
            "CreateDate": long,
            "ModificationDate" : long,
            "UploadDate" : long
        }
            ]
}
                            

Response Body (Description)

Parameter Name Description Type
FullName The File Name ( base64 ) string
FileFullPath Shows the Full Path of the file ( base64 ). string
FileSize Shows the size of the file by bytes. int
FileGUID Shows the file GUID. string
IsFolder Indicats if the device is of type folder or not. string
DeviceType Shows the device main type ( PC = 0 , Vault = 1 , Mobile = 2 ). int
DeviceSubType Shows the device sub type ( Desktop = 0 , Laptop = 1, Vault = 2, Android = 4, IPhone = 5 ) int
UploadDate Shows the file upload date (FileTime UTC). long
ModificationDate Shows the file modification date (FileTime UTC). If the file is of type folder then the value will be null. long
CreateDate Shows the file create date (FileTime UTC). If the file is of type folder then the value will be null. long

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "ListAllFilesByParentGUID");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "6F7381473A094790B479D5CF7B3E3D60");
    //The Request PageIndex Header
    request.Headers.Add("PageIndex", "0");
    //The Request PageLimit Header
    request.Headers.Add("PageLimit", "1000");

    WebResponse response = request.GetResponse();

    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 

        string body = string.Empty;
        //Read the response body
        using (StreamReader reader = new StreamReader(response.GetResponseStream()))
        {
            body = reader.ReadToEnd();
        }

        // Do whatever you want with the body 
        Response.ContentType = "application/json";
        Response.Write(body);
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: ListAllFilesByParentGUID',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FileGUID Header
                    'FileGUID: 6F7381473A094790B479D5CF7B3E3D60',
                    //The Request PageIndex Header
                    'PageIndex: 0,
                    //The Request PageLimit Header
                    'PageLimit: 2');
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
            
            // do whatever you want with the body
            
            echo $body;   
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Response:

List Files By Parent Path

Details
Gets files metadata by the parent path.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientID required The client ID provided. string
ClientSecretrequired The client secret provided. string
Action required The action name "ListFilesByParentPath" string
DeviceGUIDrequired The GUID of the required Device string
ParentPathoptional The Parent File Path (Base64). In case this header is not sent this API will return all the files in the selected device. string
PageIndexrequired Page index number int
PageLimitrequired Number of files To Show in each page (max number is 1000) int
To get the root files don't send the ParentPath.

Response

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3007 Files Not Found.
3010 string is invalid base64 string.
3017 Invalid Variable Input
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Missing required header member: please send PageIndex The "PageIndex" header is required but was not sent
Missing required header member: please send PageLimit The "PageLimit" header is required but was not sent
PageIndex is not in correct format ( int ) The "PageIndex" header is not in correct format ( int )
PageLimit is not in correct format ( int ) The "PageLimit" header is not in correct format ( int )
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Files Not Found. Check ParentPath and DeviceGUID then retry again. Files requested are not found.
ParentPath is invalid base64 string. The header "ParentPath" value is not base64 string
Value of PageIndex must be greater than (-1). "PageIndex" Minimum value is zero
Value of PageLimit must be greater than (-1). "PageLimit" Minimum value is zero
Your device IP address is blocked Blocked IP Address

Response Body (json)

                            
{
   "IsThereMore": bool,
    "NextPageIndex": int,
    "Files": [
        {
            "FileFullPath":string,
            "FileName": string,
            "FileSize": long,
            "FileGUID": string,
            "IsFolder": bool,
            "DeviceType": int,
            "DeviceSubType": int,
            "CreateDate": long,
            "ModificationDate" : long,
            "UploadDate" : long
        }
            ]
}
                            

Response Body (Description)

Parameter Name Description Type
FullName The File Name ( base64 ) string
FileFullPath Shows the Full Path of the file ( base64 ). string
FileSize Shows the size of the file by bytes. int
FileGUID Shows the file GUID. string
IsFolder indicats if the device is of type folder or not. string
DeviceType Shows the device main type ( PC = 0 , Vault = 1 , Mobile = 2 ). int
DeviceSubType Shows the device sub type ( Desktop = 0 , Laptop = 1, Vault = 2, Android = 4, IPhone = 5 ) int
UploadDate Shows the file upload date (FileTime UTC). long
ModificationDate Shows the file modification date (FileTime UTC). If the file is of type folder then the value will be null. long
CreateDate Shows the file create date (FileTime UTC). If the file is of type folder then the value will be null. long

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "ListFilesByParentPath");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("ParentPath", Convert.ToBase64String(Encoding.ASCII.GetBytes("test/")));
    //The Request PageIndex Header
    request.Headers.Add("PageIndex", "0");
    //The Request PageLimit Header
    request.Headers.Add("PageLimit", "1000");

    WebResponse response = request.GetResponse();

    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 

        string body = string.Empty;
        //Read the response body
        using (StreamReader reader = new StreamReader(response.GetResponseStream()))
        {
            body = reader.ReadToEnd();
        }

        // Do whatever you want with the body 
        Response.ContentType = "application/json";
        Response.Write(body);
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: ListFilesByParentPath',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request ParentPath Header
                    'ParentPath:'.base64_encode('test/'),
                    //The Request PageIndex Header
                    'PageIndex: 0,
                    //The Request PageLimit Header
                    'PageLimit: 2');
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();

        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers);
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
            
            // do whatever you want with the body
            
            echo $body;   
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

List All Files By Parent Path

Details
Gets all files metadata and all subFiles in that directory by parent directory path.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "ListAllFilesByParentPath" string
DeviceGUIDrequired The GUID of the required Device. string
ParentPathoptional The Parent File Path (Base64). In case this header is not sent this API will return all the files in the selected device string
PageIndexrequired Page index number. int
PageLimitrequired Number of files To Show in each page (max number is 1000) int
To get the root files don't send the ParentPath.

Response

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3007 Files Not Found.
3010 FilePath is invalid base64 string.
3017 Invalid Variable Input
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action. The "Action" header is required but was not sent.
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID. The "ClientID" header is required but was not sent.
Missing required header member: please send ClientSecret. The "ClientSecret" header is required but was not sent.
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID. The "DeviceGUID" header is required but was not sent.
Missing required header member: please send PageIndex The "PageIndex" header is required but was not sent.
Missing required header member: please send PageLimit. The "PageLimit" header is required but was not sent.
PageIndex is not in correct format ( int ) The "PageIndex" header is not in correct format ( int )
PageLimit is not in correct format ( int ) The "PageLimit" header is not in correct format ( int )
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Files Not Found. Check ParentPath and DeviceGUID then retry again. Files requested are not found.
ParentPath is invalid base64 string. The header "ParentPath" value is not base64 string.
Value of PageIndex must be greater than (-1). "PageIndex" Minimum value is zero
Value of PageLimit must be greater than (-1). "PageLimit" Minimum value is zero
Your device IP address is blocked Blocked IP Address

Response Body (json)

                            
{
   "IsThereMore": bool,
    "NextPageIndex": int,
    "Files": [
        {
            "FileFullPath":string,
            "FileName": string,
            "FileSize": long,
            "FileGUID": string,
            "IsFolder": bool,
            "DeviceType": int,
            "DeviceSubType": 10,
            "CreateDate": long,
            "ModificationDate" : long,
            "UploadDate" : long
        }
            ]
}
                            

Response Body (Description)

Parameter Name Description Type
FullName The File Name ( base64 ) string
FileFullPath Shows the Full Path of the file ( base64 ). string
FileSize Shows the size of the file by bytes. int
FileGUID Shows the file GUID. string
IsFolder indicats if the device is of type folder or not. string
DeviceType Shows the device main type ( PC = 0 , Vault = 1 , Mobile = 2 ). int
DeviceSubType Shows the device sub type ( Desktop = 0 , Laptop = 1, Vault = 2, Android = 4, IPhone = 5 ) int
UploadDate Shows the file upload date (FileTime UTC). long
ModificationDate Shows the file modification date (FileTime UTC). If the file is of type folder then the value will be null. long
CreateDate Shows the file create date (FileTime UTC). If the file is of type folder then the value will be null. long

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "ListAllFilesByParentPath");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("ParentPath", Convert.ToBase64String(Encoding.ASCII.GetBytes("testFolder/")));
    //The Request PageIndex Header
    request.Headers.Add("PageIndex", "0");
    //The Request PageLimit Header
    request.Headers.Add("PageLimit", "1000");

    WebResponse response = request.GetResponse();

    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 

        string body = string.Empty;
        //Read the response body
        using (StreamReader reader = new StreamReader(response.GetResponseStream()))
        {
            body = reader.ReadToEnd();
        }

        // Do whatever you want with the body 
        Response.ContentType = "application/json";
        Response.Write(body);
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}

<\?php
function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: ListAllFilesByParentPath',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request ParentPath Header
                    'ParentPath:'.base64_encode('test/'),
                    //The Request PageIndex Header
                    'PageIndex: 0',
                    //The Request PageLimit Header
                    'PageLimit: 100');
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();

        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers);
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
            
            // do whatever you want with the body
            
            echo $body;   
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

List File Versions

Details
Gets file versions metadata by the file GUID.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "ListFileVersions" string
DeviceGUIDrequired The GUID of the required Device string
FileGUIDrequired The GUID of the required File string
PageIndexrequired Page index number int
PageLimitrequired number of files To Show in each page (max number is 1000) int

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3007 File Not Found.
3017 Invalid Variable Input
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Missing required header member: please send PageIndex The "PageIndex" header is required but was not sent
Missing required header member: please send PageLimit The "PageLimit" header is required but was not sent
PageIndex is not in correct format ( int ) The "PageIndex" header is not in correct format ( int )
PageLimit is not in correct format ( int ) The "PageLimit" header is not in correct format ( int )
Missing required header member: please send FileGUID The "FileGUID" header is required but was not sent
File Not Found. Check FileGUID and DeviceGUID then retry again. File requested was not Found.
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Value of PageIndex must be greater than (-1). "PageIndex" Minimum value is zero
Value of PageLimit must be greater than (-1). "PageLimit" Minimum value is zero
Your device IP address is blocked Blocked IP Address

Response Body (json)

                            
{
   "IsThereMore": bool,
    "NextPageIndex":int,
    "Files": [
        {
            "FileFullPath":string,
            "FileName": string,
            "FileSize": long,
            "VersionNumber": int,
            "FileGUID": string,
            "IsFolder": bool,
            "DeviceType": int,
            "DeviceSubType": int,
            "CreateDate": long,
            "ModificationDate" : long,
            "UploadDate" : long
        }
            ]
}
                            

Response Body (Description)

Parameter Name Description Type
FileName The File Name ( base64 ) string
FileFullPath Shows the Full Path of the file ( base64 ). string
FileSize Shows the size of the file by bytes. long
VersionNumber Shows the file Version Number. int
FileGUID Shows the file GUID. string
IsFolder indicats if the device is of type folder or not. string
DeviceType Shows the device main type ( PC = 0 , Vault = 1 , Mobile = 2 ). int
DeviceSubType Shows the device sub type ( Desktop = 0 , Laptop = 1, Vault = 2, Android = 4, IPhone = 5 ) int
IsThereMore Shows that is there more files on the next page or not bool
NextPageIndex Shows From which file index the next page will start int
UploadDate Shows the file upload date (FileTime UTC). long
ModificationDate Shows the file modification date (FileTime UTC). If the file is of type folder then the value will be null. long
CreateDate Shows the file create date (FileTime UTC). If the file is of type folder then the value will be null. long

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "ListFileVersions");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "6F7381473A094790B479D5CF7B3E3D60");
    //The Request FileGUID Header
    request.Headers.Add("PageIndex", "0");
    //The Request FileGUID Header
    request.Headers.Add("PageLimit", "5");
    WebResponse response = request.GetResponse();

    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 

        string body = string.Empty;
        //Read the response body
        using (StreamReader reader = new StreamReader(response.GetResponseStream()))
        {
            body = reader.ReadToEnd();
        }

        // Do whatever you want with the body 
        Response.ContentType = "application/json";
        Response.Write(body);
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php
function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: ListFileVersions',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FileGUID Header
                    'FileGUID: 6F7381473A094790B479D5CF7B3E3D60',
                    //The Request PageIndex Header
                    'PageIndex: 6F7381473A094790B479D5CF7B3E3D60',
                    //The Request PageLimit Header
                    'PageLimit: 6F7381473A094790B479D5CF7B3E3D60',
                    );
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();

        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers);
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
            
            // do whatever you want with the body
            
            echo $body;   
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}
//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>
Details
Gets favoriate files metadata.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
ClientID required The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "ListFavoriteFiles" string
DeviceGUID optional The GUID of the required device. string
PageIndexrequired The page index int
PageLimitrequired Files in each page limit (max number is 1000) int

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3017 Invalid Variable Input
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3007 Files Not Found
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Missing required header member: please send PageIndex The "PageIndex" header is required but was not sent
Missing required header member: please send PageLimit The "PageLimit" header is required but was not sent
PageIndex is not in correct format ( int ) The "PageIndex" header is not in correct format ( int )
PageLimit is not in correct format ( int ) The "PageLimit" header is not in correct format ( int )
Value of PageIndex must be greater than (-1). "PageIndex" Minimum value is zero
Value of PageLimit must be greater than (-1). "PageLimit" Minimum value is zero
Files Not Found. Check DeviceGUID then retry again. The file requested is not found.
Files Not Found In This Account. The file requested is not found.
Your device IP address is blocked Blocked IP Address

Response Body (json)

                            
{
   "IsThereMore": bool,
    "NextPageIndex":int,
    "Files": [
        {
            "FileName": string,
            "FileGUID": string,
            "FileType": string,
            "FileFullPath": string,
            "Extension": string,
            "FileSize": long,
            "ModificationDate": long,
            "ParentPath": string,
            "IsFolder": bool,
            "PageCount": int,
            "DeviceName" string
        }
            ]
}
                            

Response Body (Description)

Parameter Name Description Type
FileGUID Shows the file GUID. string
FileType The Type of the file ( documents , video , audio , photos , ocr , folders , raw files ) string
FullName The File Name ( base64 ) string
FileFullPath Shows the Full Path of the file ( base64 ). string
Extension The file extension string
FileSize Shows the size of the file by bytes. long
ModificationDate Shows the file Modification date. (UTC) long
ParentPath The Parent File Path (Base64). string
IsFolder indicats if the device is of type folder or not. string
PageCount Shows the page count for the document file. int
DeviceName The device name that the file belongs to. (base64) string

Example

                            
try
{
    //The URL For The API
    string requestURL = "https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "ListFavoriteFiles");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request PageIndex Header
    request.Headers.Add("PageIndex", "0");
    //The Request PageLimit Header
    request.Headers.Add("PageLimit", "10");
    WebResponse response = request.GetResponse();

    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 

        string body = string.Empty;
        //Read the response body
        using (StreamReader reader = new StreamReader(response.GetResponseStream()))
        {
            body = reader.ReadToEnd();
        }

        // Do whatever you want with the body 
        Response.ContentType = "application/json";
        Response.Write(body);
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php
function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: ListFavoriteFiles',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566',
                    //The Request FileGUID Header
                    'FileGUID: 6F7381473A094790B479D5CF7B3E3D60',
                    //The Request PageIndex Header
                    'PageIndex: 0',
                    //The Request PageLimit Header
                    'PageLimit: 100'
                    );
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER => 1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER => true,
            // CURLOPT_FORBID_REUSE => 1,
            //Set the request timeout in milliseconds
            CURLOPT_TIMEOUT => 200,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();

        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers);
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
            
            // do whatever you want with the body
            
            echo $body;   
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
       
    }
}

//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Upload

Details
Upload files chunk by chunk.

Request Headers POST :

Header Name Description Type Value
ResellerTokenrequired The Reseller Token string
DeviceGUIDrequired The GUID of the required Device string
ClientIDrequired The client ID provided. string
Action required The action name "Upload" string
ClientSecret required The client secret provided. string
ChunkSize optional The size of the chunk that is being uploaded, default size is 8388608 bytes, maximum is 104857600 bytes. int
ChunkOffset required Determines from which byte the upload handler should resume upload the file. int
IsLastrequired Determins if the chunck being uploaded is the last or not. bool
Tagsoptional The file Tags ( base64 ) string
IsFavouriteoptional Determins if the File is Favourite or Not. bool
IsOCRoptional Determins if the File is OCR or Not. bool
OCRLanguageoptional The language Of the written Text in the file. this header is required if the header "IsOCR" is sent true. Send the Value of the language as specified. int
Value Description
0 Unknown
1 Arabic
2 Brazilian
3 Danish
4 German
5 English
6 Spanish
7 Finnish
8 French
9 Hebrew
10 Hindi
11 Italian
12 Japanese
13 Korean
14 Dutch
15 Norwegian
16 Portuguese
17 Russian
18 Swedish
19 Turkish
20 Chinese
FileSizerequired The length of the file stream. int
CreationDaterequired The Creation date time.
This header is not required in case the device is a cloud drive device this will be set to current time.
string
ModificationDaterequired The Modification date time. string
FilePathrequired the file path where we want to save the file in. (base64) string

Request body


Filestream.
                             

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
2070 Invalid Access Token
2047 Backup is Disabled
2011 Device Quota Exceeded
2010 User Quota Exceeded
2004 Account Quota Exceeded
2045 Account OCR Quota Exceeded
2043 Device OCR Quota Exceeded
2044 User OCR Quota Exceeded
3010 invalid base64 string
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3017 Invalid Variable Input
3009 The device is not a custom device or a cloud drive device.
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Missing required header member: please send IsLast The "IsLast" header is required but was not sent
Missing required header member: please send OCRLanguage The "OCRLanguage" header is required but was not sent
Missing required header member: please send ChunkOffset The "ChunkOffset" header is required but was not sent
Missing required header member: please send FileSize The "FileSize" header is required but was not sent
Missing required header member: please send CreationDate The "CreationDate" header is required but was not sent
Missing required header member: please send ModificationDate The "ModificationDate" header is required but was not sent
Missing required header member: please send FilePath The "FilePath" header is required but was not sent
Backup is Disabled User type is search only user and the user is not allowed to run backup on the device
Device Quota Exceeded Max hot storage limit has been reached.
User Quota Exceeded Max hot storage limit has been reached.
Account Quota Exceeded Account max hot storage limit has been reached
Account OCR Quota Exceeded Account max OCR limit has been reached
Device OCR Quota Exceeded Device max OCR limit has been reached
User OCR Quota Exceeded User max OCR limit has been reached
Tags header value is invalid base64 string. invalid base64 string.
FilePath header value is invalid base64 string. invalid base64 string.
ModificationDate is not incorrect format ( FileTime UTC ) The modificationDate Header Must be in fileTime UTC Format
CreationDate is not incorrect format ( FileTime UTC ) The CreationDate header must be in FileTime UTC format
FileSize provided is not equal to the actual file size. FileSize header is not equal to the actual file size.
The device is not a custom device or a cloud drive device. The device you are trying to upload to is not custom device.
ChunkSize is not incorrect format The ChunkSize header is not in correct format ( int )
ChunkOffset is not incorrect format The ChunkOffset header is not in correct format ( int )
FileAttributes is not incorrect format The FileAttributes Header Must be in fileTime UTC Format
FileSize is not incorrect format The FileSize header is not in correct format ( int )
The device is not a custom device or a cloud drive device. The device is not a custom device or a cloud drive device.
IsLast is not in correct format ( bool ) The IsLast header is not in correct format ( bool )
IsFavourite is not in correct format ( bool ) The IsFavourite header is not in correct format ( bool )
Your device IP address is blocked Blocked IP Address
FileGUID The uploaded file GUID
This header will be retured if the file is only one chunk or its the last chunk request (if it's chuncked file)

Example


try
{
string path = @"D:\TestingImages\Test80.rar";
using (FileStream fileStream = File.OpenRead(path))
{
    int chunkSize = 8388608;
    string fileName = fileStream.Name;
    int totalChunks = (int)Math.Ceiling((double)fileStream.Length / chunkSize);

    fileStream.Position = 0;
    long fileSize = fileStream.Length;
    // Loop through the whole stream and send it chunk by chunk;  
    long chunkOffset = 0;
    for (int i = 0; i < totalChunks; i++)
    {
        int startIndex = i * chunkSize;
        int endIndex = (int)(startIndex + chunkSize > fileStream.Length ? fileStream.Length : startIndex + chunkSize);
        int length = endIndex - startIndex;
        byte[] bytes = new byte[length];
        fileStream.Read(bytes, 0, bytes.Length);
        bool isLast = i == totalChunks - 1;

        
        string requestURL = "http://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(requestURL);
        request.Method = "POST";
        request.ContentType = "application/x-www-form-urlencoded";
        request.Headers.Add("Action", "Upload");
        request.Headers.Add("DeviceGUID", "EB2A42A034E8441C91D10BBB20E3C325");
        request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
        request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
        request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
        request.Headers.Add("FilePath", Convert.ToBase64String(Encoding.UTF8.GetBytes(fileName)));
        request.Headers.Add("Tags", Convert.ToBase64String(Encoding.UTF8.GetBytes("something,idontknow")));
        request.Headers.Add("Description", Convert.ToBase64String(Encoding.UTF8.GetBytes("dafgdag")));
        request.Headers.Add("ChunkSize", chunkSize.ToString());
        request.Headers.Add("ChunkOffset", chunkOffset.ToString());
        request.Headers.Add("IsLast", isLast.ToString());
        request.Headers.Add("FileSize", fileSize.ToString());
        request.Headers.Add("ModificationDate", DateTime.Now.ToFileTimeUtc().ToString());
        request.Headers.Add("CreationDate", DateTime.Now.ToFileTimeUtc().ToString());
        request.ContentLength = bytes.Length;

        using (Stream stream = request.GetRequestStream())
        {
            stream.Write(bytes, 0, bytes.Length);
        }
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
        Response.Write(response.Headers["ErrorMessage"]);
        HttpContext.Current.Response.Flush();

        chunkOffset += chunkSize;
    }
    fileStream.Flush();
    fileStream.Dispose();
}
}
catch (Exception ex)
{
    throw ex;
}
                            
<\?php

function GetFileSize($filepath) {
    $fileSize = sprintf("% u",filesize($filepath));
    if($fileSize < 1)
    {
        exec('dir ' . $filepath, $inf);
        $size_raw = $inf[6];
   
        $size_exp = explode("1 File(s)", $size_raw);
        $size_txt = explode("bytes", $size_exp[1]);
        $size_array = explode(",", $size_txt[0]);
   
        $size = "0"; 
        for($i = 0 ; $i < count($size_array); $i++)
        {  
           $size = $size.trim($size_array[$i]);
        }
        return (float)$size;
    }
    else
    {
        return (float)$fileSize;
    }
}
function get_headers_from_curl_response($response)
{
    $headers = array();
    // $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));

    foreach (explode("\r\n", $response) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            if($line == "" || $line == NULL || !stripos($line,":")){
                continue;
            }
            list ($key, $value) = explode(':', $line);
            if(!($key == null || $value ==null))
            {
                $headers[$key] = $value;
            }
        }
    return $headers;
}

function PostRequest($FullPath,$chunkOffset,$isLast,$fileSize,$chunkSize, $buffer) {
    $url='https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';
    $body =  $buffer;
    $headers = array(
            //The Request Reseller Token Header
            'ResellerToken:3AE7E7F042846E8AF3D0A213727C326',
             //The Request ClientID Header
            'ClientID:3AE7E7F0332821E8AF3D0A213727C326',
            //The Request ClientSecret Header
            'ClientSecret: 3AE7E7F0342811E8AF3D0A213727C326',
            //The Request Action Header
            'Action: Upload',
            //The Request FilePath Header
            'FilePath:'.base64_encode($FullPath),
            //The Request DeviceGUID Header
            'DeviceGUID:08311A826AC143E89DBAAC8DA3B414C1',
            //The Request Tags Header
            'Tags :'.base64_encode('something , idontknow'),
            //The Request Description Header
            'Description :dafgdag',
            //The Request ChunkSize Header
            'ChunkSize:'.$chunkSize,
            //The Request chunkOffset Header
            'ChunkOffset :'.$chunkOffset,
            //The Request IsLast Header
            'IsLast : '.$isLast,
            //The Request FileAttributes Header
            'FileAttributes : 0',
            //The Request fileSize Header
            'FileSize :'.$fileSize,
            'ModificationDate : 131821716783898722',
            'CreationDate : 131821716783898722'
            );
// Post the request to the API Using API URL

$request = array(
    //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
    CURLOPT_POST => 1,
    //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
    CURLOPT_HEADER =>1,
    //Set the URL of the API.
    CURLOPT_URL => $url,
    //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
    CURLOPT_FRESH_CONNECT => 1,
    //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
    CURLOPT_RETURNTRANSFER =>true,
    //Set the request timeout in milliseconds
    // CURLOPT_TIMEOUT => 1000000,
    //The request Method
    CURLOPT_CUSTOMREQUEST => "POST",
    //The request body
    CURLOPT_POSTFIELDS => ($body)
);
$curl_request = curl_init();

//fill curl_request using curl_setopt() function.
curl_setopt($curl_request, CURLOPT_HTTPHEADER , $headers);
curl_setopt_array($curl_request, $request);

//Send request using curl_exec() function.
$response = curl_exec($curl_request);

//Getting the header size from the response.
$headerSize =  curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);

//Getting the body from the response.
$body =  substr($response, $headerSize);

//Getting the headers from the response.
$responseHeaders = get_headers_from_curl_response($response);

echo "ErrorCode : ".$responseHeaders["ErrorCode"]." , ErrorMessage : ".$responseHeaders["ErrorMessage"]; 
//Closing the Request object.
curl_close($curl_request);
ob_flush();
flush();
}

function UploadFile($fullPath){ 	
    $chunkSize=8388608;	
    //open file to read 
    $file_handle = fopen($fullPath,"rb+",true); 
    //get file size 
    $fileSize = GetFileSize($fullPath); 
    //number of parts to split 
    $parts = ceil($fileSize / $chunkSize); 
    $chunkOffset = 0;
    for($i=0;$i<$parts;$i++){ 
        //read buffer sized amount from file 
       $buffer = fread($file_handle, $chunkSize); 
        //Send the Chunck 
        $isLast=($i==$parts-1)?'true':'false';
        $x = PostRequest($fullPath, $chunkOffset,$isLast,$fileSize,$chunkSize, $buffer);
        $chunkOffset+=$chunkSize;
    }     
    fclose($file_handle); 
}

UploadFile("D:\\TestingImages\\Test94.rar");

?>

UploadColdStorage

Details
Upload files chunk by chunk to the cold storage.

Request Headers POST :

Header Name Description Type Value
ResellerTokenrequired The Reseller Token string
DeviceGUIDrequired The GUID of the required Device string
ClientIDrequired The client ID provided. string
Action required The action name "UploadColdStorage" string
ClientSecret required The client secret provided. string
ChunkSize optional The size of the chunk that is being uploaded, default size is 8388608 bytes, maximum is 104857600 bytes. int
ChunkOffset required Determines from which byte the upload handler should resume upload the file. int
IsLastrequired Determins if the chunck being uploaded is the last or not. bool
Tagsoptional The file Tags ( base64 ) string
FileSizerequired The length of the file stream. int
CreationDaterequired The Creation date time.
This header is not required in case the device is a cloud drive device this will be set to current time.
string
ModificationDaterequired The Modification date time. string
FilePathrequired the file path where we want to save the file in. (base64) string

Request body


Filestream.
                             

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
2047 Backup is Disabled
2011 Device Quota Exceeded
2010 User Quota Exceeded
2004 Account Quota Exceeded
3010 invalid base64 string
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3017 Invalid Variable Input
3009 The device is not a custom device or a cloud drive device.
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Missing required header member: please send IsLast The "IsLast" header is required but was not sent
Missing required header member.: Please Send FilePath The "FilePath" header is required but was not sent
Missing required header member: please send ChunkOffset The "ChunkOffset" header is required but was not sent
Missing required header member: please send FileSize The "FileSize" header is required but was not sent
Missing required header member: please send CreationDate The "CreationDate" header is required but was not sent
Missing required header member: please send ModificationDate The "CreationDate" header is required but was not sent
Backup is Disabled User type is search only user and the user is not allowed to run backup on the device
Device Quota Exceeded Max cold storage limit has been reached.
User Quota Exceeded Max cold storage limit has been reached.
Account Quota Exceeded Account max cold storage limit has been reached
Tags header value is invalid base64 string. invalid base64 string.
FilePath header value is invalid base64 string. invalid base64 string.
ModificationDate is not incorrect format ( FileTime UTC ) The ModificationDate header must be in FileTime UTC format
CreationDate is not incorrect format ( FileTime UTC ) The CreationDate header must be in fileTime UTC format
FileSize provided is not equal to the actual file size. FileSize header is not equal to the actual file size.
The device is not a custom device or a cloud drive device. The device is not a custom device or a cloud drive device.
ChunkSize is not incorrect format The ChunkSize header is not in correct format ( int )
ChunkOffset is not incorrect format The ChunkOffset header is not in correct format ( int )
FileAttributes is not incorrect format The FileAttributes header is not in correct format ( long )
FileSize is not incorrect format The FileSize header is not in correct format ( int )
The device is not a custom device or a cloud drive device. The device is not a custom device or a cloud drive device.
IsLast is not in correct format ( bool ) The IsLast header is not in correct format ( bool )
IsFavourite is not in correct format ( bool ) The IsFavourite header is not in correct format ( bool )
Your device IP address is blocked Blocked IP Address
FileGUID The uploaded file GUID
This header will be retured if the file is only one chunk or its the last chunk request (if it's chuncked file)

Example


try
{
string path = @"D:\TestingImages\Test80.rar";
using (FileStream fileStream = File.OpenRead(path))
{
    int chunkSize = 8388608;
    string fileName = fileStream.Name;
    int totalChunks = (int)Math.Ceiling((double)fileStream.Length / chunkSize);

    fileStream.Position = 0;
    long fileSize = fileStream.Length;
    // Loop through the whole stream and send it chunk by chunk;  
    long chunkOffset = 0;
    for (int i = 0; i < totalChunks; i++)
    {
        int startIndex = i * chunkSize;
        int endIndex = (int)(startIndex + chunkSize > fileStream.Length ? fileStream.Length : startIndex + chunkSize);
        int length = endIndex - startIndex;
        byte[] bytes = new byte[length];
        fileStream.Read(bytes, 0, bytes.Length);
        bool isLast = i == totalChunks - 1;

        
        string requestURL = "http://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(requestURL);
        request.Method = "POST";
        request.ContentType = "application/x-www-form-urlencoded";
        request.Headers.Add("Action", "UploadColdStorage");
        request.Headers.Add("DeviceGUID", "EB2A42A034E8441C91D10BBB20E3C325");
        request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
        request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
        request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
        request.Headers.Add("FilePath", Convert.ToBase64String(Encoding.UTF8.GetBytes(fileName)));
        request.Headers.Add("Tags", Convert.ToBase64String(Encoding.UTF8.GetBytes("something,idontknow")));
        request.Headers.Add("Description", Convert.ToBase64String(Encoding.UTF8.GetBytes("dafgdag")));
        request.Headers.Add("ChunkSize", chunkSize.ToString());
        request.Headers.Add("ChunkOffset", chunkOffset.ToString());
        request.Headers.Add("IsLast", isLast.ToString());
        request.Headers.Add("FileSize", fileSize.ToString());
        request.Headers.Add("ModificationDate", DateTime.Now.ToFileTimeUtc().ToString());
        request.Headers.Add("CreationDate", DateTime.Now.ToFileTimeUtc().ToString());
        request.ContentLength = bytes.Length;

        using (Stream stream = request.GetRequestStream())
        {
            stream.Write(bytes, 0, bytes.Length);
        }
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
        Response.Write(response.Headers["ErrorMessage"]);
        HttpContext.Current.Response.Flush();

        chunkOffset += chunkSize;
    }
    fileStream.Flush();
    fileStream.Dispose();
}
}
catch (Exception ex)
{
    throw ex;
}
                            
<\?php

function GetFileSize($filepath) {
    $fileSize = sprintf("% u",filesize($filepath));
    if($fileSize < 1)
    {
        exec('dir ' . $filepath, $inf);
        $size_raw = $inf[6];
   
        $size_exp = explode("1 File(s)", $size_raw);
        $size_txt = explode("bytes", $size_exp[1]);
        $size_array = explode(",", $size_txt[0]);
   
        $size = "0"; 
        for($i = 0 ; $i < count($size_array); $i++)
        {  
           $size = $size.trim($size_array[$i]);
        }
        return (float)$size;
    }
    else
    {
        return (float)$fileSize;
    }
}
function get_headers_from_curl_response($response)
{
    $headers = array();
    // $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));

    foreach (explode("\r\n", $response) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            if($line == "" || $line == NULL || !stripos($line,":")){
                continue;
            }
            list ($key, $value) = explode(':', $line);
            if(!($key == null || $value ==null))
            {
                $headers[$key] = $value;
            }
        }
    return $headers;
}

function PostRequest($FullPath,$chunkOffset,$isLast,$fileSize,$chunkSize, $buffer) {
    $url='https://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';
    $body =  $buffer;
    $headers = array(
            //The Request Reseller Token Header
            'ResellerToken:3AE7E7F042846E8AF3D0A213727C326',
             //The Request ClientID Header
            'ClientID:3AE7E7F0332821E8AF3D0A213727C326',
            //The Request ClientSecret Header
            'ClientSecret: 3AE7E7F0342811E8AF3D0A213727C326',
            //The Request Action Header
            'Action: UploadColdStorage',
            //The Request FilePath Header
            'FilePath:'.base64_encode($FullPath),
            //The Request DeviceGUID Header
            'DeviceGUID:08311A826AC143E89DBAAC8DA3B414C1',
            //The Request Tags Header
            'Tags :'.base64_encode('something , idontknow'),
            //The Request Description Header
            'Description :dafgdag',
            //The Request ChunkSize Header
            'ChunkSize:'.$chunkSize,
            //The Request chunkOffset Header
            'ChunkOffset :'.$chunkOffset,
            //The Request IsLast Header
            'IsLast : '.$isLast,
            //The Request FileAttributes Header
            'FileAttributes : 0',
            //The Request fileSize Header
            'FileSize :'.$fileSize,
            'ModificationDate : 131821716783898722',
            'CreationDate : 131821716783898722'
            );
// Post the request to the API Using API URL

$request = array(
    //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
    CURLOPT_POST => 1,
    //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
    CURLOPT_HEADER =>1,
    //Set the URL of the API.
    CURLOPT_URL => $url,
    //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
    CURLOPT_FRESH_CONNECT => 1,
    //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
    CURLOPT_RETURNTRANSFER =>true,
    //Set the request timeout in milliseconds
    // CURLOPT_TIMEOUT => 1000000,
    //The request Method
    CURLOPT_CUSTOMREQUEST => "POST",
    //The request body
    CURLOPT_POSTFIELDS => ($body)
);
$curl_request = curl_init();

//fill curl_request using curl_setopt() function.
curl_setopt($curl_request, CURLOPT_HTTPHEADER , $headers);
curl_setopt_array($curl_request, $request);

//Send request using curl_exec() function.
$response = curl_exec($curl_request);

//Getting the header size from the response.
$headerSize =  curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);

//Getting the body from the response.
$body =  substr($response, $headerSize);

//Getting the headers from the response.
$responseHeaders = get_headers_from_curl_response($response);

echo "ErrorCode : ".$responseHeaders["ErrorCode"]." , ErrorMessage : ".$responseHeaders["ErrorMessage"]; 
//Closing the Request object.
curl_close($curl_request);
ob_flush();
flush();
}

function UploadFile($fullPath){ 	
    $chunkSize=8388608;	
    //open file to read 
    $file_handle = fopen($fullPath,"rb+",true); 
    //get file size 
    $fileSize = GetFileSize($fullPath); 
    //number of parts to split 
    $parts = ceil($fileSize / $chunkSize); 
    $chunkOffset = 0;
    for($i=0;$i<$parts;$i++){ 
        //read buffer sized amount from file 
       $buffer = fread($file_handle, $chunkSize); 
        //Send the Chunck 
        $isLast=($i==$parts-1)?'true':'false';
        $x = PostRequest($fullPath, $chunkOffset,$isLast,$fileSize,$chunkSize, $buffer);
        $chunkOffset+=$chunkSize;
    }     
    fclose($file_handle); 
}

UploadFile("D:\\TestingImages\\Test94.rar");

?>

Download Single File

Details
Allows single file download.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
DeviceGUIDrequired The GUID of the required Device. string
ClientIDrequired The client ID provided. string
Actionrequired The action name "DownloadSingleFile" string
ClientSecretrequired The client secret provided. string
FileGUIDrequired The file GUID. string
IsVersionrequired The file is version or not. bool
File Download is for files only ( no folders allowed ).

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3007 Files Not Found.
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3009 The device is not a custom device or a cloud drive device.
3017 Invalid Variable Input
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Missing required header member: please send FileGUID The "FileGUID" header is required but was not sent
Missing required header member: please send IsVersion The "IsVersion" header is required but was not sent
File Not Found. Check FileGUID ,DeviceGUID and storage type (cold or hot) then retry again. File requested was not found.
IsVersion is not in correct format ( bool ) The IsVersion Header Must be a bool type
The device is not a custom device or a cloud drive device. The device is not a custom device or a cloud drive device.
Your device IP address is blocked Blocked IP Address

Response Body (Stream)


FileStream
                             

Example

                            
try
{
    //The URL For The API
    string requestURL = "http://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "DownloadSingleFile");
    //The Request FileGUID Header
    request.Headers.Add("FileGUID", "FD65861F807A4C66A112569D3FD48111");
    //The Request IsVersion Header
    request.Headers.Add("IsVersion", "false");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    WebResponse response = request.GetResponse();
    
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
        int bytesReaded = 0;
    
        using (Stream stream = response.GetResponseStream())
        {
            byte[] buffer = new byte[response.ContentLength];
            HttpContext.Current.Response.Headers.Add("Content-Disposition", response.Headers["Content-Disposition"]);
            while ((bytesReaded = stream.Read(buffer, 0, buffer.Length)) != 0 && HttpContext.Current.Response.IsClientConnected)
            {
                HttpContext.Current.Response.OutputStream.Write(buffer, 0, bytesReaded);
                HttpContext.Current.Response.OutputStream.Flush();
            }
            HttpContext.Current.Response.End();
        }
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php

function Request()
{
    try{
        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: DownloadSingleFile',
                     //The Request FileGUID Header
                     'FileGUID: 40DECD74D5C6428DBEEE17BA5370E21B',
                     //The Request IsVersion Header
                     'IsVersion: false',
                     //The Request DeviceGUID Header
                     'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566'
                );
                            
        $request = array(
            //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
            CURLOPT_POST => 1,
            //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
            CURLOPT_HEADER =>1,
            //Set the URL of the API.
            CURLOPT_URL => $url,
            //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
            CURLOPT_FRESH_CONNECT => 1,
            //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
            CURLOPT_RETURNTRANSFER =>true,
            //Set the request timeout in milliseconds
            // CURLOPT_TIMEOUT => 1000000,
            //The request Method
            CURLOPT_CUSTOMREQUEST => "GET"
        );
        $curl_request = curl_init();
        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers );
        curl_setopt_array($curl_request, $request);

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
       

        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Getting the body from the response.
        $body =  substr($response, $headerSize);
        
        //Getting the headers from the response.
        $headers =get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            header("Content-Type:".$headers["Content-Type"]);
            header("Content-Disposition:".$headers["Content-Disposition"]);
            header("Content-Length:".$headers["Content-Length"]);
            echo $body;

            //The file has been downloaded successfully
              
            //Closing the Request object.
            curl_close($curl_request);    
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
       
    }
    catch (Exception $ex)
    {
       
    }
}

//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Request Cold Files Download

Details
Request to start a job to make cold files ready for download.
Steps of how to download from the cold storage
  1. Select the required files for download.
  2. Send the required files GUIDs to "RequestColdFilesDownload" API in order to prepare the files for download , for versions download send the versionNumber with this Request , the version number is for all the Requested files.
  3. Files will be ready in 3 to 5 hours after the Request is sent
  4. To check if the files are ready for download send the job ID provieded from the "RequestColdFilesDownload" API and then send it to "CheckColdFilesJob" API.
  5. When the files are ready to download , use "ColdFilesDownloadLinks" API providing jobID , page limit and pageIndex.
Request cold files download is for files only ( no folders allowed ).

Request Headers POST :

Parameter Name Description Type
ResellerTokenrequired The Reseller Token string
DeviceGUIDrequired The GUID of the required Device. string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "RequestColdFilesDownload" string
VersionNumberoptional Files version number. default is "-1" int

Request body


[
     {"FileGUID":string}
]
                             

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
3002 Key does not exist
3007 Files Not Found.
2013 Wrong Device GUID
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2012 Device Suspended
2015 Device Deleted
3004 json text is not in correct format
3018 cold storage service
3009 The device is not a custom device or a cloud drive device.
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Files Not Found. Check FileGUID, DeviceGUID and storage type (cold or hot) then retry again. Files requested are Not Found.
FileGUID Key does not exist The json key "FileGUID" does not exist
json text is not in correct format The json provided in the request body is either an incorrect format json or the body is empty.
Set only FileGUID of cold storage. Don't mix cold storage GUIDs with hot storage GUIDs.
The device is not a custom device or a cloud drive device. The device is not a custom device or a cloud drive device.
Your device IP address is blocked Blocked IP Address
JobID The requested Job ID

Example

                            
try
{
    //The URL For The API
    string requestURL = "http://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "POST";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "RequsetColdFilesDownload");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    
    //The Request Body
    string body = "[{'FileGUID':'20365D1DDC7546879026618A5E52B514'},{'FileGUID':'9987C5781D7843F9AB3630E80082D2C3'}"
                 +",{'FileGUID':'1CC485928E314D91B3A7B7A04F68D85E'},{'FileGUID':'676A97F1A0D34B0B9AAC23EAE6C32EDE'}]";
    
    byte[] bytes = ASCIIEncoding.ASCII.GetBytes(body);
    request.ContentLength = bytes.Length;
    Stream stream = request.GetRequestStream();
    stream.Write(bytes, 0, bytes.Length);
    WebResponse response = request.GetResponse();
    
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php
function Request()
{
    try{
        //The Request Content Type
        header('Content-Type: application/json');

        //The request Body
        $body = "[{'FileGUID':'20365D1DDC7546879026618A5E52B514'},{'FileGUID':'9987C5781D7843F9AB3630E80082D2C3'}"
                .",{'FileGUID':'1CC485928E314D91B3A7B7A04F68D85E'},{'FileGUID':'676A97F1A0D34B0B9AAC23EAE6C32EDE'}]";

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: RequestColdFilesDownload',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566'
                    );

        $request = array(
                   //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
                   CURLOPT_POST => 1,
                   //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
                   CURLOPT_HEADER =>1,
                   //Set the URL of the API.
                   CURLOPT_URL => $url,
                   //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
                   CURLOPT_FRESH_CONNECT => 1,
                   //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
                   CURLOPT_RETURNTRANSFER =>true,
                   //Set the request timeout in milliseconds
                   // CURLOPT_TIMEOUT => 1000000,
                   //The request Method
                   CURLOPT_CUSTOMREQUEST => "POST",
                   //The request body
                   CURLOPT_POSTFIELDS => ($body)
               );
        $curl_request = curl_init();

        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers);
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers = get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
            
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
    }
}

//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Check Cold Files Job

Details
Checks the cold files job status.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
DeviceGUIDrequired The GUID of the required Device. string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "CheckColdFilesJob" string
JobIDrequired The JobID of the requested files. int

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
3017 Invalid Variable Input
2027 Not Found
2072 Blocked IP Address
ErrorMessage
Value Description
Success The request is successful without any errors.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send DeviceGUID The "DeviceGUID" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
Missing required header member: please send JobID The "JobID" header is required but was not sent
JobID is not in correct format ( int ) JobID must be in correct format ( int )
The job requested does not exist. JobID requsted was not found.
Your device IP address is blocked Blocked IP Address

Response Body (json)


{
        "jobID":int,
        "createDate": File Time UTC,
        "status": int
}
                             

Response Body (Description)

Parameter Name Description Type Values
jobID Shows the job ID. int
createDate Shows the create date of the job. long
status Shows the status of the job. int
Value Description
0 Not Ready
1 Ready
2 Failed
3 Archive Deleted

Example

                            
try
{
    //The URL For The API
    string requestURL = "http://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "CheckColdFilesRequestedJob");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request JobID Header
    request.Headers.Add("JobID", "531");

    WebResponse response = request.GetResponse();
    
    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch(Exception ex)
{
    throw ex;
}
                            
<\?php
function Request()
{
    try{

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: CheckColdFilesJob',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566'
                    //The Request JobID Header
                    'JobID: 531'
                    );

        $request = array(
                   //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
                   CURLOPT_POST => 1,
                   //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
                   CURLOPT_HEADER =>1,
                   //Set the URL of the API.
                   CURLOPT_URL => $url,
                   //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
                   CURLOPT_FRESH_CONNECT => 1,
                   //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
                   CURLOPT_RETURNTRANSFER =>true,
                   //Set the request timeout in milliseconds
                   // CURLOPT_TIMEOUT => 1000000,
                   //The request Method
                   CURLOPT_CUSTOMREQUEST => "Get",
               );
        $curl_request = curl_init();

        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers);
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);
        
        //Getting the body from the response.
        $body =  substr($response, $headerSize);

        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers = get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
            
            // do whatever you want with the body
            
            echo $body;   
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
    }
}

//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>

Create Folder

Details
Createing new folder by sending full path.

Request Headers GET :

Header Name Description Type
ResellerTokenrequired The Reseller Token string
DeviceGUIDrequired The GUID of the required Device. string
ClientIDrequired The client ID provided. string
ClientSecretrequired The client secret provided. string
Actionrequired The action name "CreateFolder" string
FullPathrequired The full path that will be created, that will created all folders containing in path if not exists. (base64) string
CreationDaterequired The Creation date time.
This header is not required in case the device is a cloud drive device this will be set to current time.
string
ModificationDaterequired The Modification date time. string

Response Headers

Headers Info
ErrorCode
Value Description
0 Success
2001 Wrong ClientID or ClientSecret
3003 Oops! Something unexpected happened. Please try again later.
2029 The Action : ??? Does Not Exist.
3000 Missing required header member.
2070 Invalid Access Token
2049 Search user is trying to login
2063 Demo user is trying to login
2061 Unconfirmed User
2003 Account Suspended
2005 User Suspended
2013 Wrong Device GUID
2012 Device Suspended
2015 Device Deleted
2072 Blocked IP Address
3010 invalid base64 string.
3017 Invalid Variable Input
ErrorMessage
Value Description
Success The Requst is successful without any errors.
Oops! Something unexpected happened. Please try again later. There was an unexpected error and you may try again later.
Wrong ClientID or ClientSecret Incorrect value entered in ClientID or ClientSecret
The Action : ??? Does Not Exist. The action value provided does not exist.
Missing required header member: please send Action The "Action" header is required but was not sent
Invalid ResellerToken, Please insert a valid ResellerToken. The ResellerToken inserted is not valid.
Missing required header member: please send ClientID The "ClientID" header is required but was not sent
Missing required header member: please send ClientSecret The "ClientSecret" header is required but was not sent
Missing required header member: please send ResellerToken The "ResellerToken" header is required but was not sent
Missing required header member: please send FullPath The "FullPath" header is required but was not sent
Missing required header member: please send CreationDate The "CreationDate" header is required but was not sent
Missing required header member: please send ModificationDate The "ModificationDate" header is required but was not sent
Wrong Device GUID DeviceGUID is incorrect
Device Deleted The Device requested is deleted
FullPath header value is invalid base64 string. invalid base64 string.
ModificationDate is not incorrect format ( FileTime UTC ) The modificationDate Header Must be in fileTime UTC Format
CreationDate is not incorrect format ( FileTime UTC ) The CreationDate Header Must be in fileTime UTC Format
Your device IP address is blocked Blocked IP Address

Example

                            
try
{
    //The URL For The API
    string requestURL = "http://intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx";
    WebRequest request = WebRequest.Create(requestURL);
    //The Request Method
    request.Method = "GET";
    //The Request Content Type
    request.ContentType = "application/x-www-form-urlencoded";
    //The Request ResellerToken Header
    request.Headers.Add("ResellerToken", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientID Header
    request.Headers.Add("ClientID", "ABD0FD32F8FC4D88A86D863BE1D71E56");
    //The Request ClientSecret Header
    request.Headers.Add("ClientSecret", "c132d5d700e511e8af3d0a213727c326");
    //The Request Action Header
    request.Headers.Add("Action", "CreateFolder");
    //The Request DeviceGUID Header
    request.Headers.Add("DeviceGUID", "6f8cb1f9ca0711e783490afc49057566");
    //The Request FullPath Header
    request.Headers.Add("FullPath", Convert.ToBase64String(Encoding.UTF8.GetBytes("c/users/user"))));
    //The Request ModificationDate Header
    request.Headers.Add("ModificationDate", DateTime.Now.ToFileTimeUtc().ToString());
    //The Request CreationDate Header
    request.Headers.Add("CreationDate", DateTime.Now.ToFileTimeUtc().ToString());

    WebResponse response = request.GetResponse();

    //check the error code to see if there is any errors in the request
    if (response.Headers["ErrorCode"] == "0")
    {
        // The Request Succeeded. 
    }
    else
    {
        // There is an error check the Error Code and Error Message
        Response.Write("Error Code = " + response.Headers["ErrorCode"] + " , Error Message = " + response.Headers["ErrorMessage"]);
    }
}
catch (Exception ex)
{
    throw ex;
}
                            
<\?php
function Request()
{
    try{

        //The URL of the API
        $url='intellitest.zoolz.com/Services/Public_API/PublicAPIs.ashx';

        //The headers array 
        $headers = array(
                    'Accept: application/json',
                    //The Request ClientID Header       
                    'ClientID:ABD0FD32F8FC4D88A86D863BE1D71E56',
                    //The Request ClientSecret Header
                    'ClientSecret: c132d5d700e511e8af3d0a213727c326',
                    //The Request Action Header
                    'Action: CreateFolder',
                    //The Request DeviceGUID Header
                    'DeviceGUID: 6f8cb1f9ca0711e783490afc49057566'
                    //The Request FullPath Header
                    'FullPath:'.base64_encode($FullPath),
                    //The Request ModificationDate Header
                    'ModificationDate : 131821716783898722',
                    //The Request CreationDate Header
                    'CreationDate : 131821716783898722'
                    );

        $request = array(
                   //Set CURLOPT_POST to 1 will make the request use a "Content-Type: application/x-www-form-urlencoded" header. 
                   CURLOPT_POST => 1,
                   //Set CURLOPT_HEADER to 1 to include the headers with the body in the response.
                   CURLOPT_HEADER =>1,
                   //Set the URL of the API.
                   CURLOPT_URL => $url,
                   //set CURLOPT_FRESH_CONNECT to 1 will force a new connection to be used.
                   CURLOPT_FRESH_CONNECT => 1,
                   //Set CURLOPT_RETURNTRANSFER to true  to return the raw output of the response.
                   CURLOPT_RETURNTRANSFER =>true,
                   //Set the request timeout in milliseconds
                   // CURLOPT_TIMEOUT => 1000000,
                   //The request Method
                   CURLOPT_CUSTOMREQUEST => "Get",
               );
        $curl_request = curl_init();

        //fill curl_request using curl_setopt() function.
        curl_setopt($curl_request, CURLOPT_HTTPHEADER,$headers);
        curl_setopt_array($curl_request, ($request));

        //Send request using curl_exec() function.
        $response = curl_exec($curl_request);
        
        //Getting the header size from the response.
        $headerSize = curl_getinfo($curl_request, CURLINFO_HEADER_SIZE);

        //Closing the Request object.
        curl_close($curl_request);

        //Getting the headers from the response.
        $headers = get_headers_from_curl_response($response);

        //checking the header ErrorCode
        if($headers["ErrorCode"]==0)
        {
            //The request is successful.
        }
        else
        {
            //There is an error .. Check the ErrorCode and ErrorMessage
            echo "ErrorCode : ".$headers["ErrorCode"]." , ErrorMessage : ".$headers["ErrorMessage"]; 
        }
    }
    catch (Exception $ex)
    {
    }
}

//get the headers by key and returning an array object of the headers
function get_headers_from_curl_response($response)
{
    $headers = array();
    $header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
    foreach (explode("\r\n", $header_text) as $i => $line)
        if ($i === 0)
            $headers['http_code'] = $line;
        else
        {
            list ($key, $value) = explode(': ', $line);
            $headers[$key] = $value;
        }
    return $headers;
}

Request();
?>