Ruza Drive / Guides
Quickstart
Create an API key, check it, list your drive, upload a file and share it with a link: the Ruza Drive API in five requests, with fictive data.
Five requests to get started. The examples use fictive data: replace rza_YOUR_KEY with your key, and the IDs with those your answers return.
1. Create a key
Open your Ruza'Gency account, API keys, then "New key". Name it, pick the Backup template and also tick Create and manage share links for the last step. Confirm with your password.
The full key, rza_ followed by 46 characters, is shown only once. Keep it in an environment variable, never in your code:
To stay readable, the examples of the documentation spell the key out; a real program reads it from that variable (key security).
2. Check the key
GET /key tells what the key may do: its permissions, its restrictions, its expiry and the account's rate limits. Any valid key may call it.
A 401 invalid_key answer means a key copied wrong, unknown or revoked; 401 expired_key, a key to extend in your account.
3. List the root of the drive
root names the root of the drive. A folder's content comes in pages, folders first: pass next back as after for the rest; null marks the last page.
4. Upload a file
Up to 100 MiB, a file goes in a single request: the body holds its bytes, the folder and the name go in the address. The server cuts and checks the file itself.
If a file already has that name, the answer is 409 name_conflict; if_exists=new_version adds a version instead, if_exists=rename picks another name. Beyond 100 MiB: resumable upload.
5. Create a share link
With the ID returned in step 4 (entry.id), create a read-only link. The answer holds url, the address to give: its secret is after the #, and browsers never send it to a server.
The account's plan bounds a link's duration and options (403 plan_required beyond). Links accepting deposits are created in the application.
What next
- The endpoints, each with its examples and the "Try it" console.
- Uploads and content hash: large files, in resumable blocks.
- Change feed: follow a drive without walking it again.
- Errors and rate limits: react the right way.
- Permissions and key security: a key that opens only what it needs.