Docs
d1sks.com does three things: lists every disk that serves an OpenDisk descriptor, says what it is as an OpenObject store, and gives a requester and an agent the same rows as data.
Listing a disk
Serve /.well-known/opendisk.json on your own origin, as application/json. The smallest valid file is a name, the free space and a price:
{ "name": "spare drive, Lisbon", "capacity": { "free_gib": 900 }, "price": { "currency": "USD", "per_gib_month": 0.08 } }Then tell d1sks the origin, on the form or from a terminal:
curl -X POST https://d1sks.com/api/v1/disks -H 'content-type: application/json' -d '{"url":"https://your-disk.example"}'d1sks fetches the file (https only, 256 KiB at most, ten seconds), validates it against OpenDisk 0.1, and lists it. It dedupes on the seeder key, or on the origin when there is none. Every hour it fetches the file again, skipping one whose ETag has not changed. A file that stops answering three times in a row and stays gone for a day is marked gone, never deleted. Fields the spec names are read; fields it does not are kept and shown. Absence is reported as absence.
Reading disks
The page at /disks and GET /api/v1/disks take the same parameters:
| country | ISO codes, comma separated; a disk in any of them matches |
| min_gib | free GiB at least |
| max_price | per GiB-month at most, in the disk's own currency |
| encrypted | 1 for ciphertext-only disks, 0 for the rest |
| visibility | public, private or personal: what the disk will hold |
| base | own, licensed, open-license, public-domain or personal |
| min_standing | hub standing at least, as copied into the descriptor |
| q | name or origin contains |
| sort, order | price, free, standing, updated or name; asc or desc |
| status | active (default), gone or all |
| limit, offset | page size up to 200, and the offset |
curl -s 'https://d1sks.com/api/v1/disks?country=DE,FI&min_gib=500&max_price=0.15&sort=price' -H 'accept: application/json' curl -s 'https://d1sks.com/api/v1/disks/<id>' # one disk, with its OpenServer offer curl -s 'https://d1sks.com/api/v1/disks/<id>/openserver.json' # the offer alone curl -s 'https://d1sks.com/api/v1/stats'
Standing is shown as the disk copied it. A marketplace that ranks on standing reads the hub in record.source; d1sks shows the number and links the hub, and will read the hub itself once one is running.
Validating
curl -s 'https://d1sks.com/api/v1/validate?url=https://your-disk.example' curl -s -X POST 'https://d1sks.com/api/v1/validate' -H 'content-type: application/json' --data-binary @opendisk.json
Both answer ok, errors (what makes it invalid), warnings (what a reader will ignore or assume) and the normalised disk.
The pool and the descriptors
- /api/disks: every active descriptor as fetched, which is the
disksfield of the store descriptor. - /.well-known/openobject.json: d1sks.com as an OpenObject store: policies, prices, pool summary.
- /.well-known/openserver.json: the same as OpenServer offers, one per policy.
- /openobject/v1: the store API root. Bucket routes answer 501 until buckets open.
Limits
Reads are free and unmetered for now. Submissions are thirty per address per hour. Fetches go to https origins on public addresses only, follow three redirects at most, and stop at 256 KiB.
Source
github.com/profullstack/d1sks.com, MIT. Bun, Hono, Postgres, no build step. Run it with a DATABASE_URL and bun start.