A data item is a file you host on Haiyz with a version history: upload it once, publish new versions, share it by link or in a data room, open it from every product — or switch editing on and change its features in place.
In the product the surface is called Data items, under Data. In the API the entity is still a data item — every endpoint below says /data items — and the two words mean the same thing.
One hosted item, every service. The diagram shows what reads it and what shares it; nothing copies it.
An item is a name plus an ordered list of versions. Each version is one file of up to 50 MB, stored as uploaded.
shp_zipgeojsongpkggeotiffkmlkmzcsvotherWhen a version is a recognised spatial format, the engine reads it and records what it found — the coordinate system, the geometry type, the feature count, the bounding box, warnings. The record is attached to the version and shown on the page:
"validation": {
"valid": true,
"crs": "EPSG:4326",
"geometryType": "Point",
"featureCount": 1,
"bbox": [46.6753, 24.7136, 46.6753, 24.7136],
"layers": [],
"warnings": []
}A failed validation does not reject the upload
Every version is scanned for malware after upload. The scan has four states, and the state decides who may download the file — never whether it was accepted:
pendingcleaninfectedunsupportedAn item has one visibility. Private is yours alone; unlisted opens by link to anyone signed in; public is listed in the catalog; org is visible to your organization's members according to their role:
privateunlistedpublicorgInside an organization the role decides what a member may do with the organization's items:
| Role | View | Upload | Share | Delete |
|---|---|---|---|---|
owner | ✓ | ✓ | ✓ | ✓ |
admin | ✓ | ✓ | ✓ | ✓ |
editor | ✓ | ✓ | ✓ | — |
contributor | ✓ | ✓ | — | — |
viewer | ✓ | — | — | — |
The visibility values and the role names are the API's own enumerations; they are printed here exactly as the API expects them.
Four requests cover the everyday cycle. Each was run against the development API before it was written here; the placeholders are the only parts to replace.
One multipart request: the file, a slug, a bilingual title and the visibility. The response is the item with its first version.
curl -X POST https://haiyz.net/api/datasets \
-H "Authorization: Bearer <access-token>" \
-F "[email protected]" \
-F "slug=riyadh-parcels" \
-F 'title={"en":"Riyadh parcels","ar":"قطع الرياض"}' \
-F "visibility=private"Post a file to the item's versions collection. The response is the new version, with validation attached once it has run.
curl -X POST https://haiyz.net/api/datasets/<datasetId>/versions \
-H "Authorization: Bearer <access-token>" \
-F "[email protected]"Every version of an item, newest first, with size, checksum, validation and scan state.
curl https://haiyz.net/api/datasets/<datasetId>/versions \
-H "Authorization: Bearer <access-token>"The latest clean version by default; ?v=2 picks version 2. The response streams the file with its original name.
curl -OJ "https://haiyz.net/api/datasets/<datasetId>/download?v=2" \
-H "Authorization: Bearer <access-token>"Authentication
A share link hands one version to people without an account. It carries a scope, an expiry (7 days by default, 90 at most), an optional use cap, and whether a sign-in is required.
scopeexpiresInDaysmaxUsesrequireLoginA data room bundles up to 50 pinned versions for a group of people — a delivery, a review set, a tender package — with roles and an activity log.
A group is a named list of members. It is a way to grant access to several people at once; it is not a seat and it holds nothing of its own.
An item can point at an external service — an Esri REST layer, a portal — instead of holding a file. The platform then reads rows from the source when the item is opened.
A hard copy freezes a live source, a tool result or another item's version into a stored version of your own. It is the way to keep a dated snapshot of data you do not control.
A ready Hyz Layer can be switched to editable by a manager of the item. From then on its rows are the live copy: editors change features in the browser, offline in Hyz Desktop with sync, and from Hyz Field through a campaign target. Every change passes two checks on the server — the person's permission for the operation, and the feature's lock plus the layer's rules — and is logged. Snapshots store the live rows as versions of kind snapshot and can be restored.
The result of any tool that produces a file can be saved as a data item, or as a new version of one, from the run's result panel — without downloading and re-uploading it.
Uploads are metered as runs on the tool ledger, under the data item-upload tool key, with the same windows as any metered tool.
Storage is a cumulative ceiling per owner across every version of every item:
| Plan | Storage |
|---|---|
| Free | 20 MB |
| Plus | 100 MB |
| Organization | 200 GB |
The codes the data surface answers with, bound to their HTTP status. Meanings mirror the bilingual message the API returns.
DATASET_NOT_FOUNDNo item with that id, or one you cannot see.
DATASET_VERSION_NOT_FOUNDThe item exists but has no such version.
DATASET_FORBIDDENYou may see the item but not do this to it.
DATASET_FILE_REQUIREDThe request carried no file part.
DATASET_SLUG_TAKENAnother of your items already uses that slug.
DATASET_QUOTA_EXCEEDEDStoring this version would exceed the owner's storage ceiling.
DATASET_NO_CLEAN_VERSIONThe item has no version that passed the scan, so nothing can be delivered.
DATASET_SOURCE_NOT_FOUNDThe live source behind the item could not be reached or no longer exists.
DATASET_DELETE_BLOCKED_PROMOTEDThe item is promoted to open data and cannot be deleted while it is.
DATASET_PURCHASE_REQUIREDThe item is priced and this account has not purchased it.
GIS_USAGE_LIMIT_REACHEDThe upload allowance for the current window is spent.
SHARE_TOKEN_INVALIDThe share link does not exist.
SHARE_TOKEN_EXPIREDThe share link has passed its expiry.
SHARE_TOKEN_REVOKEDThe share link was revoked by its owner.
SHARE_TOKEN_EXHAUSTEDThe share link has reached its use cap.
SHARE_LOGIN_REQUIREDThe share link requires a signed-in visitor.
SHARE_SCOPE_FORBIDDENThe share link does not cover the version requested.
DATA_ROOM_NOT_FOUNDNo room with that id, or one you are not a member of.
DATA_ROOM_FORBIDDENYour role in the room does not allow this.
DATA_ROOM_SLUG_TAKENAnother room already uses that slug.
EDITING_OFFEditing is not switched on for this layer.
EDIT_FORBIDDENYour role does not carry this editing operation; meta.reason names the decision.
EDITING_BLOCKS_UPLOADA layer of the item is being edited; snapshot or switch editing off before uploading a version.
EDIT_RESYNC_REQUIREDThe client's sync version is older than the retained edit log or the layer was restored; check the layer out again.
A public item can be promoted to the open-data catalog, where it is listed for everyone with its licence and its versions. Promotion is reviewed; a promoted item cannot be deleted while it is listed.
Data rooms and groups have guides of their own under Data and Sharing; the tool ledger and its windows are on the quotas page.