storage

Assign a Cassetta resource to patients

Changed on

Copies a file under materials/resources/{area}/… into each patient's kit, where the patient app lists it, and sends them a push. An operator's copy goes into their own kit for that patient (kit_psi as psychologist, kit_nutri as nutritionist) whatever the area; admin, customer care and the coordinator use the area's kit — kit_psi for psicologo, kit_nutri for nutrizionista. A patient who already has a file of that name keeps it and is reported as skipped. Operators may assign to their own patients only; admin and customer care to anyone — one patient outside that scope rejects the whole request before any copy.

post/api/storage/materials/assign

Request

  • Base URL: https://api.corabea.it (the document declares no server; this is the origin it was published from)
  • URL: https://api.corabea.it/api/storage/materials/assign
  • Auth: HTTP bearer

Request body

file_pathstring required

A key under materials/resources/{psicologo|nutrizionista}/…

patient_idsstring[] required

The patients whose kits receive a copy

Response

Successful Response

assignedstring[]

Patients whose kit received the copy

skippedstring[]

Patients who already had it

failedstring[]

Patients whose copy failed

messagestring required

Success message

Changes

    • breaking

      added the new required request property

    • breaking

      removed the required property from the response with the status

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      the response property became required for the status

    • info

      the response's property default value File caricato con successo was removed for the status

    • info

      endpoint added