sign in sign up
activity workflows accounts
developers

Ready to use libraries

API 2.0

Table of contents

  1. Obtaining a consumer key and secret
  2. Accessing the API endpoint
  3. Security
  4. Available methods
    1. /workflow/start/<id>
    2. /workflow/adhoc/start
    3. /workflow/<id>
    4. /workflow/shortinfo/<id>
    5. /workflow/shortinfo/all
    6. /user/info
    7. /user/shortinfo
    8. /user/service/subscribed/all
    9. /activity/workflow/<tid>
    10. /service/all
    11. /service/info/<name>
  5. Error responses
    1. Generic
    2. OAuth
    3. /workflow/start/<id>
    4. /workflow/adhoc
    5. /workflow/<id>
    6. /workflow/shortinfo/<id>
    7. /user/service/subscribed/all
    8. /service/info/<name>
  6. Support

Obtaining a consumer key and secret

To start using our available methods you first need to register your application and obtain a consumer key and secret. During an early phase we'll be screening all application requests. Please if you're interested in using our API.

Accessing the API endpoint

The API is listening on http://api.tarpipe.net/2.0/. To execute a method add the method's path to this URL.

Whenever invoking HTTP POST methods make sure that you're using the multipart/form-data encoding type, either by using the -F curl option or by defining it in your code. Here's an example using PHP's cURL library:

$ch = curl_init('http://example.com/');
$params = array('title' => 'test title');
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);

Just make sure that $params is an array.

Security

Applications should receive authorization using the OAuth protocol. This API complies to a subset of the OAuth Core 1.0 Standard and provides the following endpoints:

All requests to the API methods must be using HMAC-SHA1 signatures.

We suggest that you use one of the available OAuth libraries for your favorite programming language. You can also use Jon Crosby's excellent Endpointr application if you want to test our API methods.

Because some of our methods receive the payload on a multipart/form-data HTTP POST, we suggest that you send the OAuth protocol parameters in the HTTP Authorization header as defined in OAuth HTTP Authorization Scheme.

Available methods

The API follows the RESTful approach and all the responses comply to the REST response schema.

/workflow/start/<id>

Starts the REST workflow defined by id. The workflow must already exist.

To invoke this method, send an HTTP POST to its endpoint.

The response is an XML document containing the result code and the transaction identifier (tid). The tid can be used later on to obtain information about this transaction's activity (see also /activity/workflow/<tid>).

Example response:

<?xml version="1.0"?>
<restResponse code="200">
  <item>
    <var name="tid" value="5D0937A38DFE6F5C32C6024C8E896AC5"/>
  </item>
</restResponse>

/workflow/adhoc/start

Starts the workflow provided on the request.

To invoke this method, send an HTTP POST to its endpoint. You specify the workflow by sending an XML definition through the _workflow POST field. The contents of the _workflow field must comply to the workflow schema.

Example _workflow contents:

<?xml version="1.0"?>
<workflow version="1.0">
  <head>
    <title/>
    <description/>
    <owner/>
    <receptor/>
  </head>
  <body>
    <step id="1" connector="TwitterUpdater">
      <input>
        <var name="title" field="title"/>
      </input>
    </step>
  </body>
</workflow>

The response is an XML document containing the result code and the transaction identifier (tid). The tid can be used later on to obtain information about this transaction's activity (see also /activity/workflow/<tid>).

Example response:

<?xml version="1.0"?>
<restResponse code="200">
  <item>
    <var name="tid" value="5D0937A38DFE6F5C32C6024C8E896AC5"/>
  </item>
</restResponse>

/workflow/<id>

Returns information about the workflow defined by id. The workflow must already exist.

To invoke this method, send an HTTP GET to its endpoint.

The response is an XML document containing verbose information about the workflow, including its steps.

Example response:

<?xml version="1.0"?>
<workflow version="1.0">
  <head>
    <title>Geocoder to email</title>
    <description>Geocoder to email</description>
    <owner>http://example.com/user</owner>
    <receptor uri="XXXXXXX">rest.receptor.tarpipe.com</receptor>
  </head>
  <body>
    <step id="0" connector="RestDecoder">
      <input>
        <var name="restBody" field="doc_uri"/>
      </input>
    </step>
    <step id="1" connector="GoogleGeocoder">
      <input>
        <var name="location" step="0" field="body"/>
      </input>
    </step>
    <step id="2" connector="Mailer">
      <input>
        <var name="to" step="0" field="title"/>
        <var name="subject" step="0" field="body"/>
        <var name="body" step="3" field="text"/>
      </input>
    </step>
    <step id="3" connector="TextFormatter">
      <input>
        <var name="text1" step="1" field="latitude"/>
        <var name="text2" step="1" field="longitude"/>
      </input>
    </step>
  </body>
</workflow>

/workflow/shortinfo/<id>

Returns a short information about the workflow defined by id. The workflow must already exist.

To invoke this method, send an HTTP GET to its endpoint.

The response is an XML document containing information about the workflow.

Example response:

<?xml version="1.0"?>
<restResponse code="200">
  <item>
    <var name="_id" value="CD4CB69D7BA06FE040A9A9673D7D045E"/>
    <var name="title" value="Geocoder to email"/>
    <var name="description" value="Geocoder to email"/>
    <var name="receptor" value="rest.receptor.tarpipe.com"/>
    <var name="token" value="XXXXXXX"/>
  </item>
</restResponse>

/workflow/shortinfo/all

Returns a short information about all the existing workflows.

To invoke this method, send an HTTP GET to its endpoint.

The response is an XML document containing information about all the workflows.

Example response:

<?xml version="1.0"?>
<restResponse code="200">
  <item>
    <var name="_id" value="FE1670131613FDD8200366A6DA420DB8"/>
    <var name="title" value="Geocoder"/>
    <var name="description" value="Geocoder"/>
    <var name="receptor" value="smtp.receptor.tarpipe.com"/>
    <var name="token" value="XXXXXXX@tarpipe.net"/>
  </item>
  <item>
    <var name="_id" value="C6C426074C3919228486F19C2DD8EE2B"/>
    <var name="title" value="Status"/>
    <var name="description" value="Status update on Plurk, Pownce, Tumblr and Twitter"/>
    <var name="receptor" value="rest.receptor.tarpipe.com"/>
    <var name="token" value="XXXXXXX"/>
  </item>
  <item>
    <!-- ... -->
  </item>
</restResponse>

/user/info/

Returns information about the user.

To invoke this method, send an HTTP GET to its endpoint.

The response is an XML document containing verbose information about the user.

Example response:

<?xml version="1.0"?>
<restResponse code="200">
  <item>
    <var name="fullname" value="Vitor Rodrigues"/>
    <var name="nickname" value="vitor"/>
    <var name="email" value="XXXXXXX@tarpipe.com"/>
    <var name="openid" value="http://claimid.com/rodrigues"/>
    <var name="publicActivity" value="1"/>
    <var name="creationTimeStamp" value="1218561081"/>
  </item>
</restResponse>

/user/shortinfo/

Returns a short information about the user.

To invoke this method, send an HTTP GET to its endpoint.

The response is an XML document containing information about the user.

Example response:

<?xml version="1.0"?>
<restResponse code="200">
  <item>
    <var name="fullname" value="Vitor Rodrigues"/>
    <var name="nickname" value="vitor"/>
  </item>
</restResponse>

/user/service/subscribed/all

Returns a list of all subscribed services.

To invoke this method, send an HTTP GET to its endpoint.

The response is an XML document containing a list of all services subscribed by the user.

Example response:

<?xml version="1.0"?>
<restResponse code="200">
  <item>
    <var name="name" value="Jaiku"/>
    <var name="title" value="Jaiku"/>
    <var name="description" value=""/>
    <var name="version" value=""/>
    <var name="type" value=""/>
    <var name="connector_uri" value="http://jaiku.connector.tarpipe.net/"/>
  </item>
  <item>
    <var name="name" value="Tumblr"/>
    <var name="title" value="Tumblr"/>
    <var name="description" value=""/>
    <var name="version" value=""/>
    <var name="type" value=""/>
    <var name="connector_uri" value="http://tumblr.connector.tarpipe.net/"/>
  </item>
  <item>
    <!-- ... -->
  </item>
</restResponse>

/activity/workflow/<tid>

Returns activity that happened during the transaction defined by tid.

To invoke this method, send an HTTP GET to its endpoint.

The response is an XML document describing all activity that happened during the given transaction. The tid is obtained after starting a workflow (see also /workflow/start/<id>).

Example response:

<?xml version="1.0"?>
<restResponse code="200">
  <item>
    <workflow tid="9EE159A3EE92DC5992BDD2049BF34651" startTimestamp="1211627135"
              endTimestamp="1211627149" resultCode="200" resultDescription="success">
      <step connectorUri="http://maildecoder.connector.tarpipe.net/" startTimestamp="1211627136"  
            endTimestamp="1211627136" resultCode="200" resultDescription="success"/>
      <step connectorUri="http://photobucket.connector.tarpipe.net/" startTimestamp="1211627136" 
            endTimestamp="1211627149" resultCode="200" resultDescription="success">
        <activity name="title" value="MooCards Box!!" type="text/plain"/>
        <activity name="picture" value="http://photobucket.com/albums/mm66/rvitor/TW9vQ2FyZHMgQm94ISE-1.jpg" 
                  type="image/*"/>
      </step>
      <step connectorUri="http://twitterupdater.connector.tarpipe.net/" startTimestamp="1211627147" 
            endTimestamp="1211627148" resultCode="200" resultDescription="success">
        <activity name="statusUrl" value="http://twitter.com/rvitor/statuses/818920606" type="text/plain"/>
        <activity name="title" value="MooCards Box!!" type="text/*"/>
      </step>
      <step connectorUri="http://flickr.connector.tarpipe.net/" startTimestamp="1211627136" 
            endTimestamp="1211627147" resultCode="200" resultDescription="success">
        <activity name="title" value="MooCards Box!!" type="text/plain"/>
        <activity name="thumbnail" value="http://farm4.static.flickr.com/3190/2518426348_442bca2f72_s.jpg" 
                  type="image/*"/>
      </step>
    </workflow>
  </item>
</restResponse>

/service/all

Returns a list of all supported services.

To invoke this method, send an HTTP GET to its endpoint.

The response is an XML document containing a list of all the supported services including their uri's.

Example response:

<?xml version="1.0"?>
<restResponse code="200">
  <item>
    <var name="name" value="Pownce"/>
    <var name="title" value="Pownce"/>
    <var name="description" value=""/>
    <var name="version" value=""/>
    <var name="uri" value="http://pownce.connector.tarpipe.net/"/>
  </item>
  <item>
    <var name="name" value="Flickr"/>
    <var name="title" value="Flickr"/>
    <var name="description" value=""/>
    <var name="version" value=""/>
    <var name="uri" value="http://flickr.connector.tarpipe.net/"/>
  </item>
  <item>
    <!-- ... -->
  </item>
</restResponse>

/service/info/<name>

Returns information about the service identified by name.

To invoke this method, send an HTTP GET to its endpoint.

The response is an XML document containing information about the service. Example:

<?xml version="1.0"?>
<restResponse code="200">
  <item>
    <var name="name" value="FriendFeed"/>
    <var name="title" value="FriendFeed"/>
    <var name="description" value=""/>
    <var name="version" value=""/>
    <var name="type" value=""/>
    <var name="uri" value="http://friendfeed.connector.tarpipe.net/"/>
  </item>
</restResponse>

Error responses

All the errors are returned as HTTP responses containing the appropriate HTTP error code and a XML body containing the error detail.

Generic

The generic errors may occur in all API methods

OAuth

Every OAuth error response has the HTTP Header WWW-Authenticate: OAuth realm="http://api.tarpipe.net/2.0/"

/workflow/start/<id>

/workflow/adhoc/start

/workflow/<id>

/workflow/shortinfo/<id>

/user/service/subscribed/all

/service/info/<name>

Support

Please send us any bug reports or questions about the API to .

If you want to make an application announcement or simply want to discuss your implementation with other developers, please go to our tarpipe Google Group.