Custom Reporting for CrashPlan PRO using Python and the REST API

CrashPlan PRO has some nice reports but sometimes you just want to dump raw data so you can do your own thing with it.

Here's an example of how to use the CrashPlan PRO REST API to dump out tab-delimited columns of data. Output looks like this:

Computer User GB Email OS IP Server Last Connect
optiplex745 Doe, Jane 25 Windows 7 6.1 1 2011-01-18T09:29:27.332-06:00
optiplex760 Doe, John 20 Windows XP 5.1 1 2011-01-18T06:19:27.257-06:00
macbookpro Doe, Jenny 81 Mac OS X 10.6.6 1 2011-01-18T09:25:18.946-06:00

The script is attached below as a text file. To run it just use python scriptname at the command line on the CrashPlan server. It's just a modification of one of the examples at the CrashPlan API Architecture page. You can do much more with the API than this lowly querying and reporting.

I'm running on OS X 10.5.8 (we use old Macs for CrashPlan servers since it takes very little CPU) and I had to install Python 2.7.x using the PPC installer; the stock Python in 10.5 is ancient.

Plain text icon userreport.txt4.84 KB


I copied down your example text file and I have downloaded Python as well and I appreciate your excellent example since CP API examples (working ones) are hard to find!

I'm having a small issue with line 34 out of the shoot.
This is my first Python script but I'm familar with others so my troubleshooting Python is stuck in the mud.

If you have encountered this issue please let me know.
I would like to get your script working as a model to build more for our environment.
error here and i get the same error running from the CP server:
File C:\Python32\, line 34
print Exception in HTTP operations: %s inst
SyntaxError: invalid syntax

Hi, Steve. I'm afraid I've only tested the script on python 2.7 on OS X. You're on Windows so you may run into some issues.