CloudFiles API
Files
Get file
1min
code examples curl location 'https //api cloudfiles io/v1/files/\ fileid' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api cloudfiles io/v1/files/\ fileid", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api cloudfiles io/v1/files/\ fileid") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body import requests import json url = "https //api cloudfiles io/v1/files/\ fileid" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses { "error" "file not found" }{ "booleancustomcolumn" true, "mediaserviceimagetags" \[], "id" "014kg4vactss2wrfivlfayvrjz34h64hlg", "contenttype" "document", " checkincomment" "", "filesizedisplay" "8900", "itemchildcount" "0", "folderchildcount" "0", " complianceflags" "", " compliancetag" "", " compliancetagwrittentime" "", " compliancetaguserid" "", " commentcount" "", " likecount" "", " displayname" "", " uiversionstring" "8 0", "name" "logo png", "fullname" "logo png", "type" "file", "size" 8900, "isexternal" true, "createdat" "2023 11 09t06 46 45z", "createdby" "himangshu baid", "externalurl" "https //cloudfileswork sharepoint com/shared%20documents/himangshu%27s%20folders/logo png", "extension" "png", "kind" "image", "parent" { "id" "014kg4vad6oyvoyort5jelo4hwl5a3bldd", "type" "folder", "driveid" "b!4704y9yaqeuugf85ojtc974npkofq3finmnf0qe1bvhdsy6da5bmr5xgrruy7hkl" }, "librarycontext" { "listid" "9d2e4b5d 9003 4766 95c6 ad1532ee190b", "listitemid" "435", "listitemuniqueid" "68b59453 1595 4159 8ac5 39df0fee1d66", "siteid" "cb38bde3 9adc 4b40 9418 5f393894c2f7", "siteurl" "https //cloudfileswork sharepoint com", "tenantid" "a0f026d1 e293 44d0 8c05 d9e0951a9bb9", "webid" "4a3e27be 4305 4871 9cc9 dfd101350558" }, "path" "/himangshu's folders/logo png", "actions" { "share" true, "rename" true, "replace" true, "download" true, "delete" true, "dataroom" true, "autosync" true, "open" true }, "library" "sharepoint", "driveid" "b!4704y9yaqeuugf85ojtc974npkofq3finmnf0qe1bvhdsy6da5bmr5xgrruy7hkl" }