Which links work
The server downloads from any publichttps URL: a link from your own
document system, a signed link from cloud storage (an Amazon S3 presigned
URL, an Azure Blob SAS link, a Google Cloud Storage signed URL) or a file on
your own web server. The rules:
- The link must work on its own. The server sends no headers and no cookies, and a user name or password inside the URL is refused. A link that answers with a sign-in page instead of the file gives no file.
- At most 3 redirects are followed, and every one of them must again be a
public
httpsaddress. Addresses in a private network (10.x,192.168.x,localhostand the like) are refused. - The server checks the content of what it downloaded, not only the file name. It stores only these types: PDF; images (JPEG, PNG, SVG, TIFF, WebP, HEIC/HEIF); Word, Excel and PowerPoint documents; video (MP4, MOV, WMV); plain text and STEP/IFC. Other types, such as programs and ZIP archives, are refused.
1
Make the file reachable
Get a public
https link to the file that works without signing in — for
example a short-lived signed link from your document system or cloud
storage. See Which links work.2
Register the file
fileName is required (at most 250 characters). Remember to URL-encode
fileUrl. The call answers {"code": 200, "message": "OK"} at once;
downloading and processing happen in the background.A file with the same fileName in the same group is not duplicated: the
upload becomes a new version of it.3
Verify
The answer carries no id, and a failed download is not reported — a
refused URL, an unreachable one or a file type that is not on the list
above simply produces no file. So check: list the files with
GET /api/v2/data/file/{database}?searchByName=… until it appears, and
treat “not there after a few minutes” as a failure.Upload a new version of an existing file
Same mechanism, on the update endpoint. Send the file document back (read it withGET /api/v2/data/file/{database}/{id}); fileName must be in it:
versions array. To make
an earlier version current again, set versionId to its id and PUT without
fileUrl.
Download a file
Ask for a short-lived signed link ({"url": …}), then fetch it:
Upload a map (drawing)
Maps follow the same URL-fetch pattern but with a dedicated endpoint, because the PDF is rendered into map tiles after upload:groupName is the map group; it is created if it doesn’t exist yet. The same
link rules apply to pdfURL, and the downloaded file’s
name must end in .pdf. Tiling is asynchronous — the map appears in
GET /api/v2/data/maps?database=$DB once processed. As with files, the answer
("success") does not mean the map will exist: a failed download is not
reported, so check that it appears.
To let someone report on the new drawing, add them as a reporter once it has
appeared: see Give someone Reporter access.
