HELP & Documents

[...]




Date: 2018.3.20        Author: Admin

Search index: (title and article description search)

No record was found!

DRIVE API


DRIVE API is used by third party web applications to access users resources.

An application key name is required in conjunction with the open authorization web application in order to gain a valid access token.

The application key will give access to folders stored in "Applications" root folder.

There are two base folders that may be preset for each app key:

- Applications/<basename> - used to store application files
- Applications/webroot/<webpath> - used to store public application files (Applications/webroot/ is the start point for resources that can be accessed via a web url address)


READ

folderdata

URL:  https://q-ube.com:3200/sfd/folderdata
Method: POST
Headers: {Authorization: Bearer <token>}
Data: {
        appkey:<appkey>,
        id:<foldername || folderpath>,
        ft:<web || any>
    }

appkey - the application key name
id - foldername that will be verified or a folder path
ft - if it is "web" the requested folder data is located under "Applications/webroot/<webkeypath>" path.

OK result is a JSON structure that describe the folder status.
Error is a NOT found message.

folderfiles

URL:  https://q-ube.com:3200/sfd/folderfiles
Method: POST
Headers: {Authorization: Bearer <token>}
Data: {
        appkey:<appkey>,
        id:<foldername || folderpath>,
        ft:<web || any>
    }

appkey - the application key name
id - foldername or a folder path - the files list folder
ft - if it is "web" the requested folder data is located under "Applications/webroot/<webkeypath>" path.

OK result is a JSON structure of the files list.
Error is a NOT found message.

getfiletp - Get one file

URL: https://q-ube.com:3200/sfd/getfiletp
Method: POST
Headers: {Authorization: Bearer <token>}
Data: {
        appkey:<appkey>,
        id:<filepath || folder / file name>,
        ft:<web || any>
    }

appkey - the application key name
id - filename or a file path
ft - if it is "web" the requested folder data is located under "Applications/webroot/<webkeypath>" path.

OK result is a JSON structure of the files list.
Error is a NOT found message.



WRITE

createfolder - create one folder


URL: https://q-ube.com:3200/sfd/createfolder
Method: POST
Headers: {Authorization: Bearer <token>}
Data: {
        appkey:<appkey>,
        id:<folder path>,
        folder: <folder name>,
        ft:<web || any>
    }


appkey - the application key name
id - folder path, the parent folder path (Ex: folder1/folder2)
folder - folder name (use only alfanumeric and NO spaces, CAN NOT be a path)
ft - if it is "web" the requested folder data is located under "Applications/webroot/<webkeypath>" path.


OK result is a JSON.
Error - information about the error (JSON).


upload - file upload

It is a file upload form-post.

URL: https://q-ube.com:3200/filetp/s3enc/<folder id>?token=<token>&appkey=<appkey>&ft=<ftype>
Data: {s3enc: <file>};


token - authorization token
appkey - your application key
ft - folder type (save into application folder or into a declared public folder path)
    ft=web for web public folder

Sample for AngularJS:
- use Upload services ( ng-file-upload.js  || ng-file-upload.min.js )

load next scripts before you load your controller js files:

    <script src="https://drive.webdo.com/dst/jss/angular-file-model.js"></script>
    <script src="https://drive.webdo.com/dst/jss/ng-file-upload.min.js"></script>
    <script src="https://drive.webdo.com/dst/jss/ng-file-upload-shim.min.js"></script>

The file upload function is attached to the file object.

//....
file.upload = Upload.upload({url: url,
                        data: data
                    });
file.upload.then(function (response) {
                next(false,response,ext,file.size);
            }, function (error){
                next(error,false)},
            function (evt) {
                $scope.progress = Math.min(100, parseInt(100.0 * evt.loaded / evt.total));
            }
);
//....       

File will be write over if exist.

savefile - upload a file from memory

- create the file as a new blob and use file upload to write the file ( check "upload" )

Angular samples:

// Text
var strtext = JSON.stringify({xname:"webcentral.eu"});
var file = new Blob([strtext,{type:"application/json"});
file.name = "myfile.json";
savefile(file,folder,function(error,response){
    // code
});
// Files - create
// create a new blob, requires an array buffer;
var file = new Blob([Buffer], {type: file.type});
file.name = "myfile.ext";
savefile(file,folder,function(error,response){
    //code
});


renamefile

DELETE

deletefile

deletefolder















Loading data

Loading WordBricks ...

| WebDo, the WEB builder| 1.1.2. Start| 1.1.3. Technical support| 1.2.1. New website| 1.2.2. New page| 1.2.3. Sections / Page BLOCKS| 1.2.4. Settings| 1.2.5. Save / Backup / Restore| 1.2.6. Background| 1.2.7. My pages| 1.2.8. Page settings| 1.2.9. Website header| 1.2.10. Website menu| 1.2.11. Publish| 1.2.12. Compatibility| 1.2.13. Specials blocks| 1.2.14. DATABLOCKS| 2.1.1. WEB hosting| 2.2.1. Hosting plans| 2.3.1. Domain Names| 2.3.2. Register a new domain name| 2.3.3. Domain name management| 2.3.4. Add a SSL certificate| 2.3.5. Create an SSL certificate| 2.4.1. SEO informations| 3.1.1. DRIVE| 3.2.1. Files storage| 3.2.2. API drive access| 3.2.3. Safe share files| 3.3.1. WebDO IDE| 4.1.1. Email| 5.1.1. Databases| 5.1.2. API key| 5.2.1. Micro data| 5.3.1. Datasets (test fake data)| 6.1.1. We use SOA| 6.2.1. Authorization| 6.2.2. File access| 6.2.3. SendMail| 6.2.4. QR Code| 6.2.5. Document storage API| 6.2.6. MicroData API| 6.2.7. SQL API| 6.2.8. IP API| 6.2.9. DRIVE API| 7.1.2. WebDo CLOUD| 8.1.1. Payment| 8.1.2. European VAT| 8.2.1. Privacy policies| 8.2.2. Refund policies| 8.2.3. Change web hosting plan| 8.2.4. Minimum order value| 9.1.1. Terms and conditions| 10.1.2. About us| 10.1.2. |