Category Filter
Deploy File
This API request creates a deploy-file action to copy file(s) to a destination path on targeted devices or users.
Prerequisite: Before deploying a file, it must be fully uploaded and cataloged on the server. This involves Generate Presigned Upload URL, uploading the file via the Amazon S3 URL, and confirming it via Verify File Upload.
Note: This API is only supported on macOS and Android platforms.
| Argument | Type | Description |
|---|---|---|
| file_ids | Array | IDs of the files to deploy (must be active and exist) |
| file_path | String | Destination path on the device (leading / added if missing) |
| users | Array | IDs of the users |
| usergroups | Array | IDs of the user groups |
| devices | Array | IDs of the devices |
| devicegroups | Array | IDs of the device groups |
(Note: At least one of users, usergroups, devices, or devicegroups must be non-empty).
HTTP Request:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
POST https://<portal>.hexnodemdm.com/api/v1/actions/deploy-file/ headers:- Authorization: <api key> Content-Type: application/json Sample Post Data:- { "file_ids": [101, 102], "file_path": "/user/local/docs/", "users": [2, 3], "usergroups": [4], "devices": [5, 6], "devicegroups": [12] } |
Shell Command:
|
1 |
curl -H "Authorization: <api key>" -H "Content-Type: application/json" -d '{"file_ids":[101, 102],"file_path":"/user/local/docs/","users":[2,3],"usergroups":[4],"devices":[5,6],"devicegroups":[12]}' https://<portal>.hexnodemdm.com/api/v1/actions/deploy-file/ |
HTTP Response:
|
1 2 3 |
{ "message": "Action Created" } |