API reference

Swagger Spec based reference

GET /1.0/services

List services

Status Codes:
Response JSON Object:
  • [].instances[] (string)

  • [].plans[] (string)

  • [].service (string)

  • [].service_instances[].apps[] (string)

  • [].service_instances[].bound_units[].app_name (string)

  • [].service_instances[].bound_units[].id (string)

  • [].service_instances[].bound_units[].ip (string)

  • [].service_instances[].description (string)

  • [].service_instances[].id (integer)

  • [].service_instances[].name (string)

  • [].service_instances[].plan_name (string)

  • [].service_instances[].service_name (string)

  • [].service_instances[].tags[] (string)

  • [].service_instances[].team_owner (string)

  • [].service_instances[].teams[] (string)

GET /1.0/services/instances

List service instances

Query Parameters:
  • app (string) – Filter instances by app name

Status Codes:
Response JSON Object:
  • [].instances[] (string)

  • [].plans[] (string)

  • [].service (string)

  • [].service_instances[].apps[] (string)

  • [].service_instances[].bound_units[].app_name (string)

  • [].service_instances[].bound_units[].id (string)

  • [].service_instances[].bound_units[].ip (string)

  • [].service_instances[].description (string)

  • [].service_instances[].id (integer)

  • [].service_instances[].name (string)

  • [].service_instances[].plan_name (string)

  • [].service_instances[].service_name (string)

  • [].service_instances[].tags[] (string)

  • [].service_instances[].team_owner (string)

  • [].service_instances[].teams[] (string)

GET /1.0/services/{service}/instances/{instance}

Get service instance information

Parameters:
  • service (string) – Service name.

  • instance (string) – Instance name.

Status Codes:
Response JSON Object:
  • apps[] (string)

  • custominfo (object)

  • description (string)

  • plandescription (string)

  • planname (string)

  • tags[] (string)

  • teamowner (string)

  • teams[] (string)

PUT /1.0/services/{service}/instances/{instance}

Update a service instance

Parameters:
  • service (string) – Service name.

  • instance (string) – Instance name.

Request JSON Object:
  • description (string)

  • plan (string)

  • tags[] (string)

  • teamowner (string)

Status Codes:
DELETE /1.0/services/{service}/instances/{instance}

Remove service instance

Parameters:
  • service (string) – Service name.

  • instance (string) – Instance name.

Query Parameters:
  • unbindall (boolean) – Remove current binds to this instance

Status Codes:
GET /1.7/brokers

List service brokers

Status Codes:
Response JSON Object:
  • brokers[].Config (any)

  • brokers[].Name (string)

  • brokers[].URL (string)

POST /1.7/brokers

Create service broker

Request JSON Object:
  • Config (any)

  • Name (string)

  • URL (string)

Status Codes:
DELETE /1.7/brokers/{name}
Parameters:
  • name (string) – Service Broker name.

Status Codes:
PUT /1.7/brokers/{name}

Update service broker

Parameters:
  • name (string) – Service Broker name.

Request JSON Object:
  • Config (any)

  • Name (string)

  • URL (string)

Status Codes:
GET /1.0/apps

List apps.

Query Parameters:
  • locked (boolean) – Filter applications by lock status.

  • name (string) – Filter applications by name.

  • owner (string) – Filter applications by owner.

  • platform (string) – Filter applications by platform.

  • pool (string) – Filter applications by pool.

  • status (string) – Filter applications by unit status.

  • tag (array) – Filter applications by tag.

  • teamOwner (string) – Filter applications by team owner.

  • simplified (boolean) – Returns applications without units list.

Status Codes:
Response JSON Object:
  • [].cname[] (string)

  • [].error (string)

  • [].ip (string)

  • [].lock.acquireDate (string)

  • [].lock.locked (boolean)

  • [].lock.owner (string)

  • [].lock.reason (string)

  • [].name (string)

  • [].plan.cpushare (integer)

  • [].plan.default (boolean)

  • [].plan.memory (integer)

  • [].plan.name (string)

  • [].plan.router (string)

  • [].plan.swap (integer)

  • [].pool (string)

  • [].routers[].addres (string)

  • [].routers[].name (string)

  • [].routers[].opts (object)

  • [].routers[].status (string)

  • [].routers[].status-detail (string)

  • [].routers[].type (string)

  • [].tags[] (string)

  • [].teamOwner (string)

  • [].units[].address.host (string)

  • [].units[].address.scheme (string)

  • [].units[].appname (string)

  • [].units[].id (string)

  • [].units[].ip (string)

  • [].units[].name (string)

  • [].units[].processname (string)

  • [].units[].status (string)

  • [].units[].type (string)

POST /1.0/apps

Create a new app.

Request JSON Object:
  • description (string) – App description.

  • name (string) – App name. (required)

  • plan (string) – App plan name.

  • platform (string) – App platform.

  • pool (string) – App pool name.

  • router (string) – App router name.

  • routeropts (object) – Custom router options.

  • tags[] (string)

  • teamOwner (string) – Team that owns the app.

Status Codes:
Response JSON Object:
  • ip (string)

  • repository_url (string)

  • status (string)

GET /1.0/apps/{app}

Get info about a tsuru app.

Parameters:
  • app (string) – Appname.

Status Codes:
Response JSON Object:
  • cname[] (string)

  • description (string) – App description.

  • ip (string)

  • name (string) – App name. (required)

  • owner (string)

  • plan.cpushare (integer)

  • plan.default (boolean)

  • plan.memory (integer)

  • plan.name (string)

  • plan.router (string)

  • plan.swap (integer)

  • platform (string) – App platform.

  • pool (string) – App pool.

  • router (string) – App router.

  • routeropts (object) – Custom router options.

  • tags[] (string)

  • teamOwner (string) – Team that owns the app.

  • teams[] (string)

DELETE /1.0/apps/{app}

Delete a tsuru app.

Parameters:
  • app (string) – App name.

Status Codes:
PUT /1.0/apps/{app}

Update a tsuru app.

Parameters:
  • app (string) – App name.

Status Codes:
POST /1.0/apps/{app}/env

Set new environment variable.

Parameters:
  • app (string) – App name.

Request JSON Object:
  • envs[].alias (string)

  • envs[].name (string)

  • envs[].value (string)

  • norestart (boolean)

  • private (boolean)

Status Codes:
Response JSON Object:
  • [].name (string)

  • [].public (boolean)

  • [].value (string)

GET /1.0/apps/{app}/env

Get app environment variables.

Parameters:
  • app (string) – App name.

Query Parameters:
  • env (string) – Environment variable name.

Status Codes:
Response JSON Object:
  • [].alias (string)

  • [].name (string)

  • [].value (string)

DELETE /1.0/apps/{app}/env

Unset app environment variables.

Parameters:
  • app (string) – App name.

Query Parameters:
  • env (array)

  • norestart (boolean)

Status Codes:
GET /1.0/apps/{app}/quota

Shows app usage info and its quota limit.

Parameters:
  • app (string) – App name.

Status Codes:
Response JSON Object:
  • inuse (integer)

  • limit (integer)

PUT /1.0/apps/{app}/quota

Changes the maximum limit of units allowed for use.

Parameters:
  • app (string) – App name.

Status Codes:
POST /1.0/apps/{app}/restart

Restart App.

Parameters:
  • app (string) – App name.

Status Codes:
DELETE /1.0/platforms/{platform}

Delete platform.

Parameters:
  • platform (string) – Platform name.

Status Codes:
PUT /1.0/platforms/{platform}

Update platform.

Parameters:
  • platform (string) – Platform name.

Status Codes:
GET /1.0/platforms

List platforms.

Status Codes:
Response JSON Object:
  • [].disabled (boolean)

  • [].name (string)

POST /1.0/platforms

Add new platform.

Status Codes:
GET /1.6/platforms/{platform}

Platform info.

Parameters:
  • platform (string) – Platform info.

Status Codes:
Response JSON Object:
  • images[] (string)

  • platform.disabled (boolean)

  • platform.name (string)

POST /1.6/platforms/{platform}/rollback

Platform rollback.

Parameters:
  • platform (string) – Platform name.

Query Parameters:
  • image (string)

Status Codes:
GET /1.0/teams

List teams.

Status Codes:
Response JSON Object:
  • [].name (string)

  • [].permissions[] (string)

  • [].tags[] (string)

POST /1.0/teams

Create a team.

Request JSON Object:
  • name (string)

  • tags[] (string)

Status Codes:
DELETE /1.0/teams/{team}

Delete a team.

Parameters:
  • team (string) – Team name.

Status Codes:
GET /1.4/teams/{team}

Get a team.

Parameters:
  • team (string) – Team name.

Status Codes:
Response JSON Object:
  • apps[].cname[] (string)

  • apps[].description (string) – App description.

  • apps[].ip (string)

  • apps[].name (string) – App name. (required)

  • apps[].owner (string)

  • apps[].plan.cpushare (integer)

  • apps[].plan.default (boolean)

  • apps[].plan.memory (integer)

  • apps[].plan.name (string)

  • apps[].plan.router (string)

  • apps[].plan.swap (integer)

  • apps[].platform (string) – App platform.

  • apps[].pool (string) – App pool.

  • apps[].router (string) – App router.

  • apps[].routeropts (object) – Custom router options.

  • apps[].tags[] (string)

  • apps[].teamOwner (string) – Team that owns the app.

  • apps[].teams[] (string)

  • name (string)

  • pools[].allowed (object)

  • pools[].default (boolean)

  • pools[].name (string)

  • pools[].provisioner (string)

  • pools[].public (boolean)

  • pools[].teams[] (string)

  • tags[] (string)

  • users[].email (string)

  • users[].permissions[].contexttype (string)

  • users[].permissions[].contextvalue (string)

  • users[].permissions[].name (string)

  • users[].roles[].contexttype (string)

  • users[].roles[].contextvalue (string)

  • users[].roles[].name (string)

PUT /1.6/teams/{team}

Update a team.

Parameters:
  • team (string) – Team name.

Request JSON Object:
  • newname (string)

  • tags[] (string)

Status Codes:
GET /1.0/users

List users.

Query Parameters:
  • email (string)

  • role (string)

  • context (string)

Status Codes:
Response JSON Object:
  • [].email (string)

  • [].permissions[].contexttype (string)

  • [].permissions[].contextvalue (string)

  • [].permissions[].name (string)

  • [].roles[].contexttype (string)

  • [].roles[].contextvalue (string)

  • [].roles[].name (string)

POST /1.0/users

Create a new user.

Request JSON Object:
  • email (string)

  • password (string)

Status Codes:
DELETE /1.0/users

Delete an user.

Query Parameters:
  • email (string) – User e-mail.

Status Codes:
GET /1.0/users/api-key

Show the API token of an user.

Query Parameters:
  • email (string)

Status Codes:
POST /1.0/users/api-key

Regenerate the API Token of an user.

Query Parameters:
  • email (string)

Status Codes:
GET /1.0/users/keys

Show the list of the ssh keys of logged user.

Status Codes:
Response JSON Object:
  • keyname (string) – keyvalue

POST /1.0/users/keys

Add SSH key to logged user.

Request JSON Object:
  • force (boolean)

  • key (string)

  • keyname (string)

Status Codes:
DELETE /1.0/users/keys/{key}

Delete one ssh key of logged user.

Parameters:
  • key (string)

Status Codes:
GET /1.0/users/info

Get information on logged user.

Status Codes:
Response JSON Object:
  • email (string)

  • permissions[].contexttype (string)

  • permissions[].contextvalue (string)

  • permissions[].name (string)

  • roles[].contexttype (string)

  • roles[].contextvalue (string)

  • roles[].name (string)

GET /1.0/users/{email}/quota

Get quota of an user.

Parameters:
  • email (string) – User e-mail.

Status Codes:
Response JSON Object:
  • inuse (integer)

  • limit (integer)

PUT /1.0/users/{email}/quota

Change quota of an user.

Parameters:
  • email (string) – User e-mail.

Query Parameters:
  • limit (integer) – User new quota.

Status Codes:
PUT /1.0/users/password

Change password of logged user.

Request JSON Object:
  • confirm (string)

  • new (string)

  • old (string)

Status Codes:
POST /1.0/users/{email}/password

Reset password of an user.

Parameters:
  • email (string)

Status Codes:
DELETE /1.0/users/tokens

Logout.

Status Codes:
GET /1.2/node

List nodes.

Status Codes:
Response JSON Object:
  • machines[].address (string)

  • machines[].creationparams (object)

  • machines[].iaas (string)

  • machines[].id (string)

  • machines[].port (integer)

  • machines[].protocol (string)

  • nodes[].address (string)

  • nodes[].iaasid (string)

  • nodes[].metadata (object)

  • nodes[].pool (string)

  • nodes[].provisioner (string)

  • nodes[].status (string)

POST /1.2/node

Add a node.

Request JSON Object:
  • address (string)

  • cacert (string) – Docker API CA certificate.

  • clientcert (string) – Docker API client certificate.

  • clientkey (string) – Docker API client key.

  • metadata (object)

  • register (boolean) – Register an existing node.

  • waitto (integer) – Timeout in nanoseconds.

Status Codes:
PUT /1.2/node

Update node.

Request JSON Object:
  • address (string)

  • disable (boolean)

  • enable (boolean)

  • metadata (object)

  • pool (string)

Status Codes:
DELETE /1.2/node/{address}

Remove node.

Parameters:
  • address (string) – Node address.

Query Parameters:
  • no-rebalance (boolean) – Trigger node rebalance.

  • remove-iaas (boolean) – Remove machine from IaaS.

Status Codes:
GET /1.2/node/{address}

Get node information.

Parameters:
  • address (string) – Node address.

Status Codes:
Response JSON Object:
  • node.address (string)

  • node.iaasid (string)

  • node.metadata (object)

  • node.pool (string)

  • node.provisioner (string)

  • node.status (string)

  • status.address (string)

  • status.checks[].checks[].err (string)

  • status.checks[].checks[].name (string)

  • status.checks[].checks[].successful (boolean)

  • status.checks[].time (string)

  • status.lastsuccess (string)

  • status.lastupdate (string)

  • units.address.host (string)

  • units.address.scheme (string)

  • units.appname (string)

  • units.id (string)

  • units.ip (string)

  • units.name (string)

  • units.processname (string)

  • units.status (string)

  • units.type (string)

GET /1.4/volumes

List volumes.

Status Codes:
Response JSON Object:
  • [].binds[].id.app (string) – App the volume is bound to.

  • [].binds[].id.mountpoint (string) – Volume mountpoint.

  • [].binds[].id.volume (string) – Volume name.

  • [].binds[].readonly (boolean) – Volume is read-only.

  • [].name (string) – Volume name.

  • [].opts (object) – Custom volume options.

  • [].plan.name (string) – Volume plan name.

  • [].plan.opts (object) – Volume plan opts.

  • [].pool (string) – Volume pool.

  • [].status (string) – Volume status.

  • [].teamOwner (string) – Team that owns the volume.

POST /1.4/volumes

Create volume.

Request JSON Object:
  • binds[].id.app (string) – App the volume is bound to.

  • binds[].id.mountpoint (string) – Volume mountpoint.

  • binds[].id.volume (string) – Volume name.

  • binds[].readonly (boolean) – Volume is read-only.

  • name (string) – Volume name.

  • opts (object) – Custom volume options.

  • plan.name (string) – Volume plan name.

  • plan.opts (object) – Volume plan opts.

  • pool (string) – Volume pool.

  • status (string) – Volume status.

  • teamOwner (string) – Team that owns the volume.

Status Codes:
GET /1.0/pools

List pools.

Status Codes:
Response JSON Object:
  • [].allowed (object)

  • [].default (boolean)

  • [].name (string)

  • [].provisioner (string)

  • [].public (boolean)

  • [].teams[] (string)

POST /1.0/pools

Creates a pool.

Request JSON Object:
  • default (boolean)

  • force (boolean)

  • name (string)

  • provisioner (string)

  • public (boolean)

Status Codes:
GET /pools/{pool}

Get pool information

Parameters:
  • pool (string)

Status Codes:
Response JSON Object:
  • allowed (object)

  • default (boolean)

  • name (string)

  • provisioner (string)

  • public (boolean)

  • teams[] (string)

DELETE /pools/{pool}

Deletes a pool.

Parameters:
  • pool (string)

Status Codes:
PUT /pools/{pool}

Updates a pool.

Parameters:
  • pool (string)

Request JSON Object:
  • default (boolean)

  • force (boolean)

  • public (boolean)

Status Codes:
GET /1.3/provisioner/clusters

List cluster

Status Codes:
Response JSON Object:
  • [].addresses[] (string)

  • [].cacert (string)

  • [].clientcert (string)

  • [].clientkey (string)

  • [].create_data (object)

  • [].custom_data (object)

  • [].default (boolean)

  • [].name (string)

  • [].pools[] (string)

  • [].provisioner (string)

POST /1.3/provisioner/clusters

Create cluster.

Request JSON Object:
  • addresses[] (string)

  • cacert (string)

  • clientcert (string)

  • clientkey (string)

  • create_data (object)

  • custom_data (object)

  • default (boolean)

  • name (string)

  • pools[] (string)

  • provisioner (string)

Status Codes:
DELETE /1.3/provisioner/clusters/{cluster_name}

Delete cluster.

Parameters:
  • cluster_name (string) – Cluster name.

Status Codes:
POST /1.4/provisioner/clusters/{cluster_name}

Update cluster.

Parameters:
  • cluster_name (string) – Cluster name.

Request JSON Object:
  • addresses[] (string)

  • cacert (string)

  • clientcert (string)

  • clientkey (string)

  • create_data (object)

  • custom_data (object)

  • default (boolean)

  • name (string)

  • pools[] (string)

  • provisioner (string)

Status Codes:
GET /1.8/provisioner/clusters/{cluster_name}

Cluster info

Parameters:
  • cluster_name (string) – Cluster name.

Status Codes:
Response JSON Object:
  • addresses[] (string)

  • cacert (string)

  • clientcert (string)

  • clientkey (string)

  • create_data (object)

  • custom_data (object)

  • default (boolean)

  • name (string)

  • pools[] (string)

  • provisioner (string)

DELETE /1.4/volumes/{volume}

Delete volume.

Parameters:
  • volume (string) – Volume name.

Status Codes:
GET /1.4/volumes/{volume}

Get a volume.

Parameters:
  • volume (string) – Volume name.

Status Codes:
Response JSON Object:
  • binds[].id.app (string) – App the volume is bound to.

  • binds[].id.mountpoint (string) – Volume mountpoint.

  • binds[].id.volume (string) – Volume name.

  • binds[].readonly (boolean) – Volume is read-only.

  • name (string) – Volume name.

  • opts (object) – Custom volume options.

  • plan.name (string) – Volume plan name.

  • plan.opts (object) – Volume plan opts.

  • pool (string) – Volume pool.

  • status (string) – Volume status.

  • teamOwner (string) – Team that owns the volume.

POST /1.4/volumes/{volume}/bind

Bind volume.

Parameters:
  • volume (string) – Volume name.

Request JSON Object:
  • mountpoint (string)

  • norestart (boolean)

  • readonly (boolean)

Status Codes:
DELETE /1.4/volumes/{volume}/bind

Unbind volume.

Parameters:
  • volume (string) – Volume name.

Request JSON Object:
  • mountpoint (string)

  • norestart (boolean)

  • readonly (boolean)

Status Codes:
GET /1.4/volumeplans

List volume plans.

Status Codes:
POST /1.6/roles/{role_name}/token

Assigns a role to a team token.

Parameters:
  • role_name (string)

Request JSON Object:
  • context (string)

  • token_id (string)

Status Codes:
DELETE /1.6/roles/{role_name}/token/{token_id}

Dissociates a role from a team token.

Parameters:
  • role_name (string)

  • token_id (string)

Query Parameters:
  • context (string)

Status Codes:
GET /1.6/tokens

List team tokens.

Status Codes:
Response JSON Object:
  • [].created_at (string)

  • [].creator_email (string)

  • [].description (string)

  • [].expires_at (string)

  • [].last_access (string)

  • [].roles[].contextvalue (string)

  • [].roles[].name (string)

  • [].team (string)

  • [].token (string)

  • [].token_id (string)

POST /1.6/tokens

Creates a team token.

Request JSON Object:
  • description (string)

  • expires_in (integer) – Expire time in seconds.

  • team (string)

  • token_id (string)

Status Codes:
Response JSON Object:
  • created_at (string)

  • creator_email (string)

  • description (string)

  • expires_at (string)

  • last_access (string)

  • roles[].contextvalue (string)

  • roles[].name (string)

  • team (string)

  • token (string)

  • token_id (string)

DELETE /1.6/tokens/{token_id}

Deletes a team token.

Parameters:
  • token_id (string) – Token ID.

Status Codes:
PUT /1.6/tokens/{token_id}

Updates a team token.

Parameters:
  • token_id (string) – Token ID.

Status Codes:
Response JSON Object:
  • created_at (string)

  • creator_email (string)

  • description (string)

  • expires_at (string)

  • last_access (string)

  • roles[].contextvalue (string)

  • roles[].name (string)

  • team (string)

  • token (string)

  • token_id (string)

GET /1.7/tokens/{token_id}

Shows information about a specific token.

Parameters:
  • token_id (string) – Token ID.

Status Codes:
Response JSON Object:
  • created_at (string)

  • creator_email (string)

  • description (string)

  • expires_at (string)

  • last_access (string)

  • roles[].contextvalue (string)

  • roles[].name (string)

  • team (string)

  • token (string)

  • token_id (string)

POST /1.1/events/{eventid}/cancel
Parameters:
  • eventid (string)

Request JSON Object:
  • reason (string)

Status Codes:
GET /1.6/events/webhooks
Status Codes:
Response JSON Object:
  • [].body (string)

  • [].description (string)

  • [].event_filter.error_only (boolean)

  • [].event_filter.kind_names[] (string)

  • [].event_filter.kind_types[] (string)

  • [].event_filter.success_only (boolean)

  • [].event_filter.target_types[] (string)

  • [].event_filter.target_values[] (string)

  • [].headers (object)

  • [].insecure (boolean)

  • [].method (string)

  • [].name (string)

  • [].proxy_url (string)

  • [].team_owner (string)

  • [].url (string)

POST /1.6/events/webhooks
Request JSON Object:
  • body (string)

  • description (string)

  • event_filter.error_only (boolean)

  • event_filter.kind_names[] (string)

  • event_filter.kind_types[] (string)

  • event_filter.success_only (boolean)

  • event_filter.target_types[] (string)

  • event_filter.target_values[] (string)

  • headers (object)

  • insecure (boolean)

  • method (string)

  • name (string)

  • proxy_url (string)

  • team_owner (string)

  • url (string)

Status Codes:
GET /1.6/events/webhooks/{name}
Parameters:
  • name (string) – Webhook name.

Status Codes:
Response JSON Object:
  • body (string)

  • description (string)

  • event_filter.error_only (boolean)

  • event_filter.kind_names[] (string)

  • event_filter.kind_types[] (string)

  • event_filter.success_only (boolean)

  • event_filter.target_types[] (string)

  • event_filter.target_values[] (string)

  • headers (object)

  • insecure (boolean)

  • method (string)

  • name (string)

  • proxy_url (string)

  • team_owner (string)

  • url (string)

PUT /1.6/events/webhooks/{name}
Parameters:
  • name (string) – Webhook name.

Request JSON Object:
  • body (string)

  • description (string)

  • event_filter.error_only (boolean)

  • event_filter.kind_names[] (string)

  • event_filter.kind_types[] (string)

  • event_filter.success_only (boolean)

  • event_filter.target_types[] (string)

  • event_filter.target_values[] (string)

  • headers (object)

  • insecure (boolean)

  • method (string)

  • name (string)

  • proxy_url (string)

  • team_owner (string)

  • url (string)

Status Codes:
DELETE /1.6/events/webhooks/{name}
Parameters:
  • name (string) – Webhook name.

Status Codes:
GET /1.7/provisioner

List provisioners

Status Codes:
Response JSON Object:
  • [].cluster_help.create_data_help (object)

  • [].cluster_help.custom_data_help (object)

  • [].cluster_help.provisioner_help (string)

  • [].name (string)