Web Services

You can retrieve and store data in your ProjectPipe projects using web services. Our web services api follows the REST style, which means that you do queries and make changes by sending http GETs and POSTs, respectively. You verify that api calls succeeded by checking the http status code - 200 is good and 404 is an error. All output is in the JSON format, which is a simple, cross-platform data representation format with library support available for all major languages.

Below are sample URLs for project test.test:

One of the great things about REST apis is that you can use any http client to use the api. For example, you can use the curl command to query for tasks:

curl -u userid:password http://hosted.projectpipe.com/test.test/svc/task

Below is a Python snippet to do the same thing:

import base64, pprint, simplejson, urllib2
theurl = ‘http://hosted.projectpipe.com/test.test/svc/task′
username = ‘userid’
password = ‘password’
encoding = base64.encodestring(’%s:%s’ % (username, password))[:-1]
req = urllib2.Request(theurl, headers={’Authorization’: ‘Basic %s’ % encoding})
out = urllib2.urlopen(req).read()
pprint.pprint(simplejson.loads(out))

If there is an error then the urlopen().read() will throw an exception, that's the great thing about using http status codes.