Synchronize Files and Folders
What you’ll build
A one-way sync from e.g. SharePoint / file shares into remberg:
- Create the folder structure in remberg.
- Upload files into the right folders.
- (Optional) Assign folders or files to assets.
- Detect changes and avoid duplicates using resolve + listing.
remberg stores items in a simple tree: folders can contain folders and files. Both are “file items” and share IDs you’ll use for nesting. You can also use the foldername and path as a unique identifier.
Related Endpoints
Files Get
Files Create
Resolve File
Step 1: Create folders (and subfolders)
Use POST /v1/files/folder to create folderss
Key fields:
name– folder nameparentId– optional, to nest the folder inside another folderisPublic– keep false (default)assetTypes,assetNumbers– optional asset assignment on folder level
Example structure to mirror SharePoint:
Root (already exists / or a top-level folder you create)
├─ Maschinenhandbuch
│ ├─ Elektrik
│ └─ Mechanik
└─ Prüfprotokolle
└─ 2025
Flow:
- Create
Maschinenhandbuch→ get itsid. - Create
ElektrikwithparentId = id(Maschinenhandbuch). - Create
MechanikwithparentId = id(Maschinenhandbuch). - Create
Prüfprotokolle→ get itsid. - Create
2025withparentId = id(Prüfprotokolle).
Best practices for folder names (sync-friendly):
- Keep names stable over time; treat them as part of your integration “key”.
- Avoid special characters you can’t reliably round-trip across systems (
/ \ : * ? " < > |). - Prefer short, meaningful categories over deep nesting (many Mittelstand trees get very deep).
- If your source system has IDs (SharePoint library IDs etc.), store them on your side as metadata mapped to remberg folder IDs.
- The full path to a file or folder can later be retrieved as an key as well.
Step 2: Upload files into a folder
Use POST /v1/files for file uploads.
This endpoint supports multipart/form-data uploads (perfect for PDFs). Provide:
- the binary file(s)
parentIdto place the file inside a folderisPublicshould remain false (default)
Typical sync pattern:
- For each source file, decide the target folder.
- Upload with
parentId = id(targetFolder). - Store returned remberg file
idalongside your source file identifier.
Note: you can upload multiple files per request, but keep an eye on practical payload sizes and your own retry logic. We recommend to use remberg for files up to 100MB each.
The API is rate-limited to 5 requests per second.
Step 3 (optional): Assign to an asset
Assignment is not required for syncing, but useful to make documents show up on an asset e.g. as a manual.
Options:
- Assign folder when creating it using
assetTypesorassetNumbers. Everything you upload into that folder inherits the context in the UI. TheassetNumbercan be your internal reference for this asset or equipment. - Assign individual files similarly during upload (same fields exist on file creation).
Keep it optional in your integration: if you don’t have a reliable asset mapping yet, sync first, enrich later.
Step 4: Detect changes & avoid duplicates
To “synchronize” rather than blindly upload, you need a way to resolve whether a file already exists in remberg.
This can be done by periodically checking changed files. A webhook will be available later.
You have two tools:
4a) List what’s already there
GET /v1/files lets you list items, optionally scoped to a folder.
- Use
folderIdto fetch contents of a known folder. - Use
isFolder=truewhen you only want folders. - Use
updatedAtFromto fetch changes since your last sync.
This is handy for:
- initial folder ID discovery
- periodic reconciliation runs
4b) Resolve existing files
GET /v1/files/resolve is intended to help match external file references to remberg items.
Recommended pattern:
- Before upload, call resolve with your external reference (e.g., SharePoint file ID or path).
- If resolve returns a remberg
id, skip upload or update content based on timestamps. - If no match: upload new.
If your sync supports updates, use:
PATCH /v1/files/{id}/contentto replace the binary of an existing file.
Summary
- Create top-level folders with
POST /v1/files/folder. - Create nested folders by passing
parentId. - Resolve or list to find/confirm targets.
- Upload PDFs with
POST /v1/files+parentId. - Optional:Store mappings (sourceID ↔ rembergID) to make the next sync deterministic.
- On later runs: resolve → update/skip → upload if missing.
Updated 15 days ago
