{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/nfs/directory/:rootPath/:directoryPath","auth":"never","examples":{"codes":[]},"method":"get","params":[{"name":"rootPath","type":"string","default":"","desc":"Accepted value - `app` or `drive`","required":true,"in":"path","ref":"","_id":"56e24f0995d1c60e00a969b9"},{"name":"directoryPath","type":"string","default":"/","desc":"Full path of the directory. If not specified, the root directory will be retrieved","required":false,"in":"path","ref":"","_id":"56e24f0995d1c60e00a969b8"}],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"/nfs/directory/:rootPath/:directoryPath/","type":"endpoint","slug":"nfs-get-directory","excerpt":"Fetch a directory.\nOnly authorised requests can invoke this API.","body":"### Request Header\n\n```\nAuthorization: Bearer <TOKEN>\n```\n\n### Response\n\nThe API returns the metadata of the directory as well as the metadata of its files and subdirectories.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"name\": 200,\n      \"code\": \"{\\n\\t\\\"info\\\": {\\n\\t\\t\\\"name\\\": String,\\n\\t\\t\\\"isPrivate\\\": Boolean,\\t\\t\\n\\t\\t\\\"createdOn\\\": Long,\\n\\t\\t\\\"modifiedOn\\\": Long,\\n\\t\\t\\\"metadata\\\": base64 String\\n\\t},\\n\\t\\\"files\\\": [],\\n\\t\\\"subDirectories\\\": []\\n}\",\n      \"language\": \"json\",\n      \"status\": 200\n    },\n    {\n      \"code\": \"Unauthorized\",\n      \"language\": \"http\",\n      \"name\": \"401\"\n    },\n    {\n      \"code\": \"Fields are missing\",\n      \"language\": \"http\",\n      \"name\": \"400\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"info.name\",\n    \"0-1\": \"Name of the directory.\",\n    \"1-0\": \"info.isPrivate\",\n    \"1-1\": \"Whether the directory is private or not.\",\n    \"2-0\": \"info.createdOn\",\n    \"2-1\": \"Created timestamp.\",\n    \"3-0\": \"info.modifiedOn\",\n    \"3-1\": \"Last modified timestamp.\",\n    \"4-0\": \"info.metadata\",\n    \"4-1\": \"Metadata associated with the directory encoded as a base64 string.\",\n    \"5-0\": \"files\",\n    \"5-1\": \"List of metadata related to the files in the directory.\",\n    \"6-0\": \"subDirectories\",\n    \"6-1\": \"List of metadata related to the subdirectories.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\n## Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var request = require('request');\\nvar endPoint = 'http://localhost:8100/nfs/directory/app/';\\n\\nvar onResponse = function(err, response, body) {\\n  if (err) {\\n    return console.error(err.message);\\n  }\\n  if (response.statusCode === 200) {\\n    return console.log(body);\\n  }\\n  console.error('Failed', body);\\n};\\n\\nrequest.get(endPoint, {\\n  auth: {\\n    bearer: constants.token\\n  }\\n}, onResponse);\",\n      \"language\": \"javascript\",\n      \"name\": \"Nodejs\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","updates":["56e80624e5f8200e003e0bca"],"order":6,"isReference":false,"hidden":true,"sync_unique":"","link_url":"","link_external":false,"_id":"5721e9c849df4f0e00528346","user":"564d9fcd1936752300aa6439","editedParams2":true,"githubsync":"","parentDoc":null,"project":"5656d449a795770d00a2aec1","__v":0,"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"SAFE Launcher API","slug":"safe-launcher-api-1","order":3,"from_sync":false,"reference":false,"_id":"5721e9c849df4f0e00528328","project":"5656d449a795770d00a2aec1","createdAt":"2016-03-07T18:25:17.849Z","__v":0,"version":"5721e9c849df4f0e0052831f"},"createdAt":"2016-03-11T04:52:25.121Z","editedParams":true,"version":{"version":"0.5","version_clean":"0.5.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5721e9c849df4f0e00528320","5721e9c849df4f0e00528321","5721e9c849df4f0e00528322","5721e9c849df4f0e00528323","5721e9c849df4f0e00528324","5721e9c849df4f0e00528325","5721e9c849df4f0e00528326","5721e9c849df4f0e00528327","5721e9c849df4f0e00528328","5721e9c849df4f0e00528329","5a6f6fc5043d990023daeb09"],"_id":"5721e9c849df4f0e0052831f","releaseDate":"2016-04-28T10:45:28.369Z","hasReference":true,"project":"5656d449a795770d00a2aec1","createdAt":"2016-04-28T10:45:28.369Z","hasDoc":true,"__v":2}}

get/nfs/directory/:rootPath/:directoryPath/

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

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

rootPath:
required
string
Accepted value - `app` or `drive`
directoryPath:
string/
Full path of the directory. If not specified, the root directory will be retrieved

Documentation

### Request Header ``` Authorization: Bearer <TOKEN> ``` ### Response The API returns the metadata of the directory as well as the metadata of its files and subdirectories. [block:code] { "codes": [ { "name": 200, "code": "{\n\t\"info\": {\n\t\t\"name\": String,\n\t\t\"isPrivate\": Boolean,\t\t\n\t\t\"createdOn\": Long,\n\t\t\"modifiedOn\": Long,\n\t\t\"metadata\": base64 String\n\t},\n\t\"files\": [],\n\t\"subDirectories\": []\n}", "language": "json", "status": 200 }, { "code": "Unauthorized", "language": "http", "name": "401" }, { "code": "Fields are missing", "language": "http", "name": "400" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "0-0": "info.name", "0-1": "Name of the directory.", "1-0": "info.isPrivate", "1-1": "Whether the directory is private or not.", "2-0": "info.createdOn", "2-1": "Created timestamp.", "3-0": "info.modifiedOn", "3-1": "Last modified timestamp.", "4-0": "info.metadata", "4-1": "Metadata associated with the directory encoded as a base64 string.", "5-0": "files", "5-1": "List of metadata related to the files in the directory.", "6-0": "subDirectories", "6-1": "List of metadata related to the subdirectories." }, "cols": 2, "rows": 7 } [/block] [block:api-header] { "type": "basic" } [/block] ## Examples [block:code] { "codes": [ { "code": "var request = require('request');\nvar endPoint = 'http://localhost:8100/nfs/directory/app/';\n\nvar onResponse = function(err, response, body) {\n if (err) {\n return console.error(err.message);\n }\n if (response.statusCode === 200) {\n return console.log(body);\n }\n console.error('Failed', body);\n};\n\nrequest.get(endPoint, {\n auth: {\n bearer: constants.token\n }\n}, onResponse);", "language": "javascript", "name": "Nodejs" } ], "sidebar": true } [/block]