API

For the Civil 3D plugin and any field software that can make HTTPS requests. Everything is JSON except file bodies, which are sent raw.

Authentication

Send your API key (made under API keys, or by POST /api/login) in a header on every call:

X-API-Key: sc_xxxxxxxx          (or  Authorization: Bearer sc_xxxxxxxx)

Calls

MethodPathWhat
POST/api/loginbody {"email","password","label"} → {"api_key"} (a new key labelled for that device)
GET/api/mewho the key belongs to
GET/api/projectsprojects you are a member of
POST/api/projectsbody {"name","client","description"} → the new project
GET/api/projects/ID/files?folder=Fieldcurrent version of every file (folder optional)
PUT/api/projects/ID/files/Field/day3.csvupload: the body is the file itself; headers X-Source (device / app) and X-Note optional; Content-Length is required (no chunked uploads), X-Content-Sha256 optional → {"id","version","checks","unchanged"}. The same path with other content makes a new version; the same content as the current version returns that version with "unchanged": true.
GET/api/projects/ID/files/Field/day3.csvdownload the current version (?version=2 for an older one); headers X-File-Version, X-File-Sha256
GET/api/projects/ID/versions/Field/day3.csvevery version of that file
DELETE/api/projects/ID/files/Field/day3.csvdelete every version (editors and owners)
DELETE/api/projects/ID/folders/Field/Day 1delete every file in that folder, sub-folders included (editors and owners) → {"deleted","files"}
POST/api/projects/ID/moverename or move a folder: body {"from","to","to_project"} (to is the full new path; to_project optional, another project you can edit) → {"moved","merged","project","folder"}. A file that already exists there gets the moved versions as new versions.
POST/api/projects/IDrename the project: body {"name","client","description"} (owner)
DELETE/api/projects/IDdelete the project (owner): hidden for everyone, share links stop
POST/api/projects/ID/sharebody {"path","days","password","label"} (path "" = whole project) → {"url","expires"}
GET/api/projects/ID/activitythe last 200 events
GET/api/storageadmins: free and total disk space on the server, what the cloud takes, and the size of each project (bytes)
GET/api/healthno key needed: {"ok":true}

Example: upload a point file from a script

curl -X PUT "https://cloud.avgstools.com/api/projects/12/files/Field/day3.csv" -H "X-API-Key: sc_xxxxxxxx" -H "X-Source: Trimble Access" --data-binary @day3.csv

Errors come back as {"error": "..."} with a 4xx status. Checks (point counts, duplicate numbers, LAS header, DWG version...) are run on every upload and returned with it.