API Document for Public and Third Party (Partners) By DigiBoxx

Introduction

Made with ♥ in 2020, DigiBoxx is the first Indian Digital Asset Management platform that’s secure, fast, intuitive and yes, it’s easy on the pocket too! Backed by robust technology and back-end support, DigiBoxx is the most cost-effective way to share, store, track, and manipulate your files – all on an Indian server.

Overview

This DigiBoxx for Developers document is written to provide detailed information on all APIs provided by DigiBoxx, for implementation by the general public, third party (TP) or partners as well. This will give developers an understanding of what each API is called, and what responses can be expected. An example of the API usage is provided as well, in case developers need to understand how an API is to be called.

API List

Below is the list of APIs available from DigiBoxx for partners to use. It gives a brief explanation of each feature’s functionality, usage and details of the parameters and return value.

Returned JSON Response:
Key Value Data Type
status
  • success
  • fail
String
message fail:
  • Only POST method is allowed for this API
  • Invalid UserToken
  • Invalid user.
  • Something went wrong with the API
String
Possible JSON responses:
  • {"status": "fail", "message": " Only POST method is allowed for this API"}
  • {'status':'fail', 'message':'Invalid UserToken'}
  • {'status':'fail', 'message':'invalid user'}
  • {"status": "fail", "message": "Something went wrong with the API"}
  • {"status": "success", "data": [130755], "parent_folder_id": 0, "default_thumbnail_data": [], "message": "Files uploaded successfully"}
Sample usage

curl --location --request POST 'https://publicapi.digiboxx.com/login/profile/' \
--header 'Content-Type: application/json' \
--data-raw '{"userToken":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "tp_identifier":"sample_tp_identifier" }'

<?php


// Api URL

$url = 'https://publicapi.digiboxx.com/login/profile/';


// Parameters

$data_array = array(

'userToken'    =>  'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',

"tp_identifier"     =>  "sample_tp_identifier",

);


$post_data = json_encode($data_array,JSON_UNESCAPED_SLASHES);


$ch = curl_init($url);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');

curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_MAXREDIRS, 10);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));


$response = curl_exec($ch);

curl_close($ch);

print_r($response);


?>

import requests


url = 'https://publicapi.digiboxx.com/assets/asset_list/'


para = {

'userToken'    :   'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',

'tp_identifier'     :  'sample_tp_identifier',

}


headers = {

'Content-Type': 'application/json'

}


response = requests.post(url, json=para, headers=headers)

print(response.text)

Response

{"message": "success", "consumed_data": "0.0", "fname": "Sample_f_name", "lname": "", "email": "[email protected]", "mobile": "XXXXXXXXXX", "total_storage_allowed": 32212254720.0, "storage_unit": "gb", "workspace_name": "sample_workspace", "profile_image": null}