/nfs/directory/:rootPath/:directoryPath/

Fetch a directory.
Only authorised requests can invoke this API.

Request Header

Authorization: Bearer <TOKEN>

Response

The API returns the metadata of the directory as well as the metadata of its files and subdirectories.

{
	"info": {
		"name": String,
		"isPrivate": Boolean,		
		"createdOn": Long,
		"modifiedOn": Long,
		"metadata": base64 String
	},
	"files": [],
	"subDirectories": []
}
Unauthorized
Fields are missing
FieldDescription
info.nameName of the directory.
info.isPrivateWhether the directory is private or not.
info.createdOnCreated timestamp.
info.modifiedOnLast modified timestamp.
info.metadataMetadata associated with the directory encoded as a base64 string.
filesList of metadata related to the files in the directory.
subDirectoriesList of metadata related to the subdirectories.

Examples

var request = require('request');
var endPoint = 'http://localhost:8100/nfs/directory/app/';

var onResponse = function(err, response, body) {
  if (err) {
    return console.error(err.message);
  }
  if (response.statusCode === 200) {
    return console.log(body);
  }
  console.error('Failed', body);
};

request.get(endPoint, {
  auth: {
    bearer: constants.token
  }
}, onResponse);
Language
Click Try It! to start a request and see the response here!