Files API
...
Files API Docs
Files

Get a file

code examples curl location globoff '/api/v1/files/{id}' \\ \ 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("/api/v1/files/{id}", 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("/api/v1/files/{id}") http = net http new(url host, url port); request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = http request(request) puts response read body import requests import json url = "/api/v1/files/{id}" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // success { "file handle" { "file path" "folder/file png", "id" "86027e2c e853 11ee b1d4 7c214a6ed8c7", "url" "https //files sparklayer io/siteid/siteenv/path/to/file png ", "required headers" \[ { "name" "content type", "value" "application/pdf" } ] }, "ready" true, "mime type" "image/x png", "file size" 255, "created at" "2020 01 01t00 00 00+02 00", "updated at" "2020 01 01t00 00 00+02 00" }// error response