This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

If you are reading this, you are likely wanting a well documented published API to reference. You won't find that here. Its my opinion that the admin WebInterface provides a working example that is easily watched to see the commands its issuing for the documentation. If you want to know how to make a user using a web call, enable the network monitoring in Chrome/Safari/FireBug and make a user. Then its all detailed out.

I will provide one example here to get you started though, and I may add to this by user request if things are not clear enough.


Making a new User for the User Manager

Builds a brand new user, or replaces and existing one entirely.

curl -d command=setUserItem -d data_action=replace -d xmlItem=user -d serverGroup=MainUsers -d username=curl_user --data-urlencode user@user.xml --data-urlencode vfs_items@vfs_items.xml --data-urlencode permissions@permissions.xml http://crushadmin:pass@127.0.0.1:8080/
(long line, so get it all)

Updating a user in the User Manager

Fills in the missing properties, doesn't alter the VFS. The VFS is an all or nothing approach. The above we did all, this one we are doing nothing. The password is always required, and in this case we are just updating the user with the items in the user.xml, but not replacing items that the user already has.

curl -d command=setUserItem -d data_action=update -d xmlItem=user -d serverGroup=MainUsers -d username=curl_user --data-urlencode user@user.xml http://crushadmin:pass@127.0.0.1:8080/
(long line, so get it all)

The attachments contain the sample files.

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
xml
permissions.xml 0.2 kB 1 25-Oct-2018 04:31 Ben Spink
xml
user.xml 0.2 kB 1 25-Oct-2018 04:31 Ben Spink
xml
vfs_items.xml 0.3 kB 1 25-Oct-2018 04:31 Ben Spink
« This particular version was published on 25-Oct-2018 04:31 by Ben Spink.
G’day (anonymous guest)
CrushFTP9 | What's New

Referenced by
LeftMenu

JSPWiki