[ZendTo] AutoPickUp
Cole, Sean
Sean.Cole at sunywcc.edu
Tue May 26 18:56:43 BST 2020
Each Drop-off has a different claimID and passcode so if you have 10 drop-offs how can you automate the pickup if you don't have the unique claimID and passcode for each of the 10 drop-offs?
Thanks Again for you help,
Sean Cole
________________________________
From: Jules <Jules at Zend.To>
Sent: Saturday, May 23, 2020 5:41 AM
To: ZendTo Users
Cc: Cole, Sean
Subject: Re: [ZendTo] AutoPickUp
Sean,
Before using any of the scripts, you need to create a user that will be only used for driving the automation scripts of ZendTo. Don't use a real user's account, create one just for the purpose.
Put that username in the 'automationUsers' setting in preferences.php.
For this example, let's set a few things:
- The automation user is going to have the username "robot" with a password of "machines".
- The claimID and passcode of the drop-off will be "aaaClaimIDaaa" and "bbbPasscodebbb".
- The address of your ZendTo site will be "https://your-zendto-site.com/". The site address always goes at the very end of the command, after all the other options.
To see the command-line usage:
/opt/zendto/bin/autopickup --help
Fetch information about the drop-off, without downloading anything:
/opt/zendto/bin/autopickup --username "robot" --password "machines" --claimid "aaaClaimIDaaa" --passcode "bbbPasscodebbb" --list --nofiles https://your-zendto-site.com/
Fetch all the files in the drop-off to the current directory, verifying their checksums, and logging that they were picked up by "user at yourdomain.com"<mailto:user at yourdomain.com>:
/opt/zendto/bin/autopickup --username "robot" --password "machines" --claimid "aaaClaimIDaaa" --passcode "bbbPasscodebbb" --checksum --pickedupby "user at yourdomain.com"<mailto:user at yourdomain.com> https://your-zendto-site.com/
Fetch all the files in the drop-off to the directory "/var/tmp/downloads", not bothering with checksums or logging who did it:
/opt/zendto/bin/autopickup --username "robot" --password "machines" --claimid "aaaClaimIDaaa" --passcode "bbbPasscodebbb" --output "/var/tmp/downloads" https://your-zendto-site.com/
The output of the "--list --nofiles" command above will give you a unique "fileid" number for each of the files in the drop-off. So let's download file number 123, verify its checksum and save it to the file "~/Downloads/my-picked-up-file":
/opt/zendto/bin/autopickup --username "robot" --password "machines" --claimid "aaaClaimIDaaa" --passcode "bbbPasscodebbb" --file 123 --checksum --output "~/Downloads/my-picked-up-file" https://your-zendto-site.com/
If you are using a locally-signed SSL certificate on your ZendTo server, you may need to add the option
--insecure
to all of the above examples.
To see the "curl" command it creates, which is what does all the work, but not actually run anything, add the option
--debug
to any of the above examples.
Does that help?
The point of me using "curl" is that all the script really does is create all the parameters for an HTTP POST request to your ZendTo server, and then pull out the JSON results from the right header in the returned data. The "--debug" option will help you understand what it's doing.
Once you have played with it a bit, take a look how the script works (90% is just parsing the command-line!) and you will see how you could use a .Net http request to achieve the same result with your own code running on a Windows server.
Cheers,
Jules.
On 22/05/2020 20:25, Cole, Sean via ZendTo wrote:
?Is anyone using the AutoPickUp Script? Any documentation on the use of the script or examples. Trying to move the files uploaded from the ZendTo server to a Windows server.
Regards,
Sean Cole
Mgr. Network Services
SeanCole at sunywcc.edu<mailto:SeanCole at sunywcc.edu>
914-606-6923
_______________________________________________
ZendTo mailing list
ZendTo at zend.to<mailto:ZendTo at zend.to>
http://jul.es/mailman/listinfo/zendto
Jules
--
Julian Field MEng CEng CITP MBCS MIEEE MACM
The current UK shipping forecast:
Trafalgar: Northerly or northeasterly 5 to 7, occasionally 4 at first. Rough.
Rain or showers at first. Good, occasionally moderate at first.
www.Zend.To<http://www.Zend.To>
Twitter: @JulesFM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jul.es/pipermail/zendto/attachments/20200526/241f4026/attachment.html>
More information about the ZendTo
mailing list