Storage API
S3-compatible object storage. The control plane lives at https://cloudnx.in/storage/; actual data path is at https://s3.cloudnx.in (region in-mum).
Buckets
| Method | Path | Purpose |
|---|---|---|
| GET / POST | /storage/buckets | List or create buckets. |
| GET / PATCH / DELETE | /storage/buckets/{name} | Show, update (public_read flag), or delete. |
Bucket-name rules
- 3–63 chars, lowercase letters / digits / dots / dashes.
- Must start and end with a letter or digit.
- No consecutive dots or dashes.
- Unique within your account (not globally).
Objects
We don’t front the data path with our own endpoints — point any AWS SDK at https://s3.cloudnx.in and use a per-bucket access key. The control plane provides metadata + lifecycle helpers:
| Method | Path | Purpose |
|---|---|---|
| GET | /storage/buckets/{name}/objects | List object metadata (paginated). |
| GET | /storage/buckets/{name}/objects/presign | Presigned download URL. |
| POST | /storage/buckets/{name}/objects/presign | Presigned upload URL. |
| DELETE | /storage/buckets/{name}/objects | Delete one object. |
Per-bucket access keys
These are the credentials your AWS SDK uses to talk to s3.cloudnx.in:
| Method | Path | Purpose |
|---|---|---|
| GET / POST | /storage/access-keys | List or create. |
| DELETE | /storage/access-keys/{id} | Revoke immediately. |
Using AWS SDK
import { S3Client, ListObjectsV2Command } from "@aws-sdk/client-s3";
const s3 = new S3Client({
region: "in-mum",
endpoint: "https://s3.cloudnx.in",
credentials: { accessKeyId: "AKIA…", secretAccessKey: "…" },
forcePathStyle: true,
});
await s3.send(new ListObjectsV2Command({ Bucket: "my-bucket" }));Curl example — presigned upload
# 1. Get a presigned URL from the control plane
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"key":"reports/2026-05.pdf","content_type":"application/pdf"}' \
https://cloudnx.in/storage/buckets/my-bucket/objects/presign
# 2. PUT the file directly to the presigned URL (no auth header needed)
curl -X PUT --data-binary @./report.pdf \
-H "Content-Type: application/pdf" \
"$PRESIGNED_URL"