{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/api/copy/:path","auth":"never","params":[{"name":"path","type":"string","default":"","desc":"An existing directory or file that will be copied","required":false,"in":"path","ref":"","_id":"54680b5d016b480800bc7cc4"},{"name":"destination","type":"string","default":"","desc":"Path to copy the source item to","required":false,"in":"body","ref":"","_id":"54680b5d016b480800bc7cc3"}],"results":{"codes":[{"language":"json","code":"{\n    \"data\": {\n        \"name\": \"baz\",\n        \"path\": \"/baz\",\n        \"type\": \"directory\",\n        \"size\": 136,\n        \"atime\": 1416092956000,\n        \"mtime\": 1416092956000,\n        \"link\": false\n    }\n}","name":"","status":201},{"code":"{\n    \"errors\": {\n        \"status\": \"400\",\n        \"code\": \"malformed_json\",\n        \"title\": \"could not parse request body\",\n        \"detail\": \"Could not parse request body as JSON\"\n    }\n}","name":"","status":400,"language":"json"},{"status":404,"language":"json","code":"{\n    \"errors\": {\n        \"status\": \"404\",\n        \"code\": \"file_not_found\",\n        \"title\": \"directory does not exist\",\n        \"detail\": \"Could not find the file '/foo/bar'\"\n    }\n}"},{"status":409,"language":"json","code":"{\n    \"errors\": {\n        \"status\": \"409\",\n        \"code\": \"dir_conflict\",\n        \"title\": \"directory already exists\",\n        \"detail\": \"Could not create '/foo/bar' as it already exists\"\n    }\n}"}]},"try":false,"basic_auth":false,"method":"post"},"next":{"description":"","pages":[]},"title":"Copy File","type":"endpoint","slug":"copy-file","excerpt":"","body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$.post('/api/copy/foo/bar', {\\n  destination: '/foo/baz'\\n});\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","updates":[],"order":11,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"54680b5d016b480800bc7cc2","user":"5467f76e016b480800bc7c7d","createdAt":"2014-11-16T02:26:37.561Z","editedParams":true,"editedParams2":true,"category":{"sync":{"isSync":false,"url":""},"pages":["5467f78698b68408002689fa","54680584016b480800bc7ca0","546806af016b480800bc7ca3","5468084998b6840800268a28","546808fe016b480800bc7ca6","546809b098b6840800268a32","54680ab898b6840800268a42","54680b5d016b480800bc7cc2","54680b9a016b480800bc7cc5","5468293298b6840800268a79","54682958016b480800bc7cf9","54682fbc016b480800bc7cfd","54f664fd542ade0d00f1c69b"],"title":"API Documentation","slug":"api-documentation","order":0,"from_sync":false,"reference":false,"_id":"5467f78698b68408002689f8","__v":13,"project":"5467f78598b68408002689f4","createdAt":"2014-11-16T01:01:58.022Z","version":"5467f78598b68408002689f7"},"is_link":false,"project":"5467f78598b68408002689f4","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5467f78698b68408002689f8"],"_id":"5467f78598b68408002689f7","project":"5467f78598b68408002689f4","releaseDate":"2014-11-16T01:01:57.550Z","__v":1,"createdAt":"2014-11-16T01:01:57.550Z"},"__v":0,"githubsync":""}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

path:
string
An existing directory or file that will be copied

Body Params

destination:
string
Path to copy the source item to

Result Format


Documentation

[block:code] { "codes": [ { "code": "$.post('/api/copy/foo/bar', {\n destination: '/foo/baz'\n});", "language": "javascript" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}