All URIs are relative to http://localhost:1823/api/v1
| Method | HTTP request | Description |
|---|---|---|
| createFolder | POST /folder | Create folder |
| downloadFile | GET /file/{hash}/{cid} | Download file |
| getFolder | GET /folder/{hash} | Get folder |
| search | GET /search/{name} | Search |
| tree | GET /tree | Get folders tree |
| updateFile | PUT /file | Update file |
| uploadFile | POST /file | Upload file |
| versions | GET /versions/{hash} | Versions of file |
createFolder(body)
Create folder
Creating folder by user
var Woden = require('woden');
var defaultClient = Woden.ApiClient.instance;
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';
var apiInstance = new Woden.FileSystemApi();
var body = new Woden.CreateFolder(); // CreateFolder |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.createFolder(body, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| body | CreateFolder |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
File downloadFile(hash, cid)
Download file
Downloading file from current folder
var Woden = require('woden');
var defaultClient = Woden.ApiClient.instance;
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';
var apiInstance = new Woden.FileSystemApi();
var hash = "hash_example"; // String | The file hash
var cid = "cid_example"; // String | The file version
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.downloadFile(hash, cid, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| hash | String | The file hash | |
| cid | String | The file version |
File
- Content-Type: Not defined
- Accept: application/json, image/png, image/gif, image/jpeg, multipart/form-data, application/pdf
getFolder(hash)
Get folder
Getting folder means that user will receive the contents of the folder (files and folders)
var Woden = require('woden');
var defaultClient = Woden.ApiClient.instance;
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';
var apiInstance = new Woden.FileSystemApi();
var hash = "hash_example"; // String | The folder hash
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.getFolder(hash, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| hash | String | The folder hash |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
search(name)
Search
Search folders and files means that user will receive folder or file if exist
var Woden = require('woden');
var defaultClient = Woden.ApiClient.instance;
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';
var apiInstance = new Woden.FileSystemApi();
var name = "name_example"; // String | The folder or file name
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.search(name, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| name | String | The folder or file name |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
tree()
Get folders tree
Get tree of folders and shared folders of user
var Woden = require('woden');
var defaultClient = Woden.ApiClient.instance;
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';
var apiInstance = new Woden.FileSystemApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.tree(callback);This endpoint does not need any parameter.
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
updateFile(hash, file)
Update file
Update existing file
var Woden = require('woden');
var defaultClient = Woden.ApiClient.instance;
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';
var apiInstance = new Woden.FileSystemApi();
var hash = "hash_example"; // String |
var file = "/path/to/file.txt"; // File | File to upload.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.updateFile(hash, file, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| hash | String | ||
| file | File | File to upload. |
null (empty response body)
- Content-Type: multipart/form-data
- Accept: application/json
uploadFile(name, parentFolder, file)
Upload file
Uploading file in current folder
var Woden = require('woden');
var defaultClient = Woden.ApiClient.instance;
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';
var apiInstance = new Woden.FileSystemApi();
var name = "name_example"; // String |
var parentFolder = "parentFolder_example"; // String |
var file = "/path/to/file.txt"; // File | File to upload.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.uploadFile(name, parentFolder, file, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| name | String | ||
| parentFolder | String | ||
| file | File | File to upload. |
null (empty response body)
- Content-Type: multipart/form-data
- Accept: application/json
versions(hash)
Versions of file
Get all existing versions of file
var Woden = require('woden');
var defaultClient = Woden.ApiClient.instance;
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';
var apiInstance = new Woden.FileSystemApi();
var hash = "hash_example"; // String | The folder or file name
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.versions(hash, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| hash | String | The folder or file name |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined