This process begins when a tsuru user creates an instance of the service
via command line tool:

$ tsuru service-instance-add mysql mysql_instance

tsuru calls the service API to create a new instance via POST on /resources
(please notice that tsuru does not include a trailing slash) with the name,
plan, tags and the team that owns the instance. Example of request:

tsuru calls the service API to inform the instance update via PUT on /resources
(please notice that tsuru does not include a trailing slash) with the new, updated
fields (description, tags, team owner and plan). Example of request:

This process begins when a tsuru user binds an app to an instance of the
service via command line tool:

$ tsuru service-instance-bind mysql mysql_instance --app my_app

Now, tsuru services has two bind endpoints:
/resources/<service-instance-name>/bind and
/resources/<service-instance-name>/bind-app.
The first endpoint will be called every time an app adds an unit.
This endpoint is a POST with:

The service API should return the following HTTP response code with the
respective response body:

201: if the app has been successfully bound to the instance. The response
body must be a JSON containing the environment variables from this
instance that should be exported in the app in order to connect to the
instance. If the service does not export any environment variable, it can
return null or {} in the response body. Example of response:

This process begins when a tsuru user unbinds an app from an instance of
the service via command line:

$ tsuru service-instance-unbind mysql mysql_instance --app my_app

Now, tsuru services has two unbind endpoints:
/resources/<service-instance-name>/bind and
/resources/<service-instance-name>/bind-app.
The first endpoint will be called every time an app removes an unit.
This endpoint is a DELETE with app-host and unit-host. Example of request:

The second endpoint /resources/<service-instance-name>/bind-app will be
called once when the binding between a service and an application is removed.
This endpoint is a DELETE with app-host. Example of request:

When the user run tsuruservice-info<service> or
tsuruservice-instance-info, tsuru will get informations
from all instances. This is an optional endpoint in the service API. Some
services does not provide any extra information for instances. Example of
request: