Files and photos
The connector’s tool calls carry JSON, not files. These two take bytes, so they’re on the API, the Python client and the command line only:
/api/uploads/{upload_id}?t=…Send a file to the single-use link from change upload_create (at most 30 MB; the link’s t is the credential, no other sign-in). Then import it by its upload_id: change dataset_upload, change import_rbd, change import_excel or change rbd_upload_outage_log. Reliafy Maintenance users can also send a PDF (purpose document, at most 20 MB) and keep it on an item or position with maintenance attachments.add_document.
curl -X POST https://reliafy.com/api/v1/change/upload_create -H "Authorization: Bearer $RELIAFY_TOKEN" \
-H "Content-Type: application/json" -d '{"purpose": "rbd_import", "filename": "plant.xml"}' # → url, upload_id
curl -X PUT --data-binary @plant.xml "UPLOAD_URL"
curl -X POST https://reliafy.com/api/v1/change/import_rbd -H "Authorization: Bearer $RELIAFY_TOKEN" \
-H "Content-Type: application/json" -d '{"upload_id": "UPLOAD_ID"}'
reliafy import rbd plant.xml # the same three steps
reliafy upload bearings.xlsx --name Bearings
reliafy upload --notation "120, 310, [400, 450], 1000+" --name Seals --unit hours # a few lives typed inPUT /api/uploads/{upload_id}?t=…(orPOSTwith the raw body) — no sign-in: the link’s token is the credential. It works once and expires after 15 minutes. Answers{ upload_id, size, sha256, detected_format }.- Errors:
404(no such upload, or a wrong token),409(already used),410(expired),413(over the size limit — 30 MB at most),429(too many attempts). - Uploads are private to you, are never served back, and are deleted once imported or after an hour.
- The upload URL points straight at Reliafy’s app service, which is fastest. Some sandboxes and corporate proxies refuse that host (for example
CONNECT tunnel failed, response 403). For those,change upload_createalso returnsurl_fallback(with a readycurl_fallback): the same link on reliafy.com. Send the same PUT there once. It’s slower for large files. A PUT that a proxy refused never reached Reliafy, so the link is still unused.
/api/v1/maintenance/photos?target_id=…&caption=…Reliafy Maintenance users: add a photo to a position, item, location or work order. The body is the image (JPEG, PNG, WebP or HEIC, at most 20 MB), or multipart with a file field. It’s cleaned and stripped of camera and location data, like a photo added in the app. Needs the write scope.
reliafy photo add IMG_*.jpg --to POSITION_ID --caption "Nameplate"
reliafy photo link PHOTO_ID --to LOCATION_ID # show it there too
reliafy photo move PHOTO_ID --to POSITION_ID # only there
reliafy photo unlink PHOTO_ID --from LOCATION_IDFrom Python: rf.upload_dataset, rf.import_rbd, rf.import_excel, rf.add_photo and rf.add_document (see the Python client).