API reference
set envs
- path: /apps/{app}/env
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Envs updated
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
app log
- path: /apps/{app}/log
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
app unlock
- path: /apps/{app}/lock
- produce: application/json
- method: DELETE
- 200: Ok
- 401: Unauthorized
- 404: App not found
app swap
- path: /swap
- consume: application/x-www-form-urlencoded
- method: POST
- 400: Invalid data
- 401: Unauthorized
- 404: App not found
- 200: Ok
- 409: App locked
- 412: Number of units or platform don't match
app start
- path: /apps/{app}/start
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 401: Unauthorized
- 404: App not found
revoke access to app
- path: /apps/{app}/teams/{team}
- method: DELETE
- 200: Access revoked
- 401: Unauthorized
- 403: Forbidden
- 404: App or team not found
app restart
- path: /apps/{app}/restart
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 401: Unauthorized
- 404: App not found
register unit
- path: /apps/{app}/units/register
- produce: application/json
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 401: Unauthorized
- 404: App not found
metric envs
- path: /apps/{app}/metric/envs
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
- 404: App not found
remove app
- path: /apps/{name}
- produce: application/x-json-stream
- method: DELETE
- 200: App removed
- 401: Unauthorized
- 404: Not found
grant access to app
- path: /apps/{app}/teams/{team}
- method: PUT
- 200: Access granted
- 401: Unauthorized
- 404: App or team not found
- 409: Grant already exists
app log
- path: /apps/{app}/log
- produce: application/x-json-stream
- method: GET
- 200: Ok
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
bind service instance
- path: /services/{service}/instances/{instance}/{app}
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Ok
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
unset envs
- path: /apps/{app}/env
- produce: application/x-json-stream
- method: DELETE
- 200: Envs removed
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
set cname
- path: /apps/{app}/cname
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
app stop
- path: /apps/{app}/stop
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 401: Unauthorized
- 404: App not found
rebuild routes
- path: /apps/{app}/routes
- produce: application/json
- method: POST
- 200: Ok
- 401: Unauthorized
- 404: App not found
app update
- path: /apps/{name}
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: App updated
- 401: Unauthorized
- 404: Not found
add units
- path: /apps/{name}/units
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Units added
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
set node status
- path: /node/status
- produce: application/json
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 404: App or unit not found
- 401: Unauthorized
get envs
- path: /apps/{app}/env
- produce: application/x-json-stream
- method: GET
- 200: OK
- 401: Unauthorized
- 404: App not found
app info
- path: /apps/{name}
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
- 404: Not found
app create
- path: /apps
- produce: application/json
- consume: application/x-www-form-urlencoded
- method: POST
- 400: Invalid data
- 201: App created
- 403: Quota exceeded
- 401: Unauthorized
- 409: App already exists
app list
- path: /apps
- produce: application/json
- method: GET
- 200: List apps
- 401: Unauthorized
- 204: No content
unbind service instance
- path: /services/{service}/instances/{instance}/{app}
- produce: application/x-json-stream
- method: DELETE
- 200: Ok
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
set unit status
- path: /apps/{app}/units/{unit}
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 404: App or unit not found
- 401: Unauthorized
run commands
- path: /apps/{app}/run
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 401: Unauthorized
- 404: App not found
app sleep
- path: /apps/{app}/sleep
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
remove units
- path: /apps/{name}/units
- produce: application/x-json-stream
- method: DELETE
- 200: Units removed
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
unset cname
- path: /apps/{app}/cname
- method: DELETE
- 200: Ok
- 400: Invalid data
- 404: App not found
- 401: Unauthorized
user create
- path: /users
- consume: application/x-www-form-urlencoded
- method: POST
- 400: Invalid data
- 201: User created
- 403: Forbidden
- 401: Unauthorized
- 409: User already exists
change password
- path: /users/password
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Ok
- 400: Invalid data
- 403: Forbidden
- 404: Not found
- 401: Unauthorized
remove team
- path: /teams/{name}
- method: DELETE
- 200: Team removed
- 401: Unauthorized
- 403: Forbidden
- 404: Not found
user list
- path: /users
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
user info
- path: /users/info
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
add key
- path: /users/keys
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 401: Unauthorized
- 409: Key already exists
remove key
- path: /users/keys/{key}
- method: DELETE
- 200: Ok
- 400: Invalid data
- 404: Not found
- 401: Unauthorized
remove user
- path: /users
- method: DELETE
- 200: User removed
- 401: Unauthorized
- 404: Not found
logout
- path: /users/tokens
- method: DELETE
- 200: Ok
team list
- path: /teams
- produce: application/json
- method: GET
- 200: List teams
- 401: Unauthorized
- 204: No content
list keys
- path: /users/keys
- produce: application/json
- method: GET
- 200: OK
- 400: Invalid data
- 401: Unauthorized
regenerate token
- path: /users/api-key
- produce: application/json
- method: POST
- 200: OK
- 401: Unauthorized
- 404: User not found
show token
- path: /users/api-key
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
- 404: User not found
login
- path: /auth/login
- produce: application/json
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 403: Forbidden
- 404: Not found
- 401: Unauthorized
reset password
- path: /users/{email}/password
- method: POST
- 200: Ok
- 400: Invalid data
- 403: Forbidden
- 404: Not found
- 401: Unauthorized
team create
- path: /teams
- consume: application/x-www-form-urlencoded
- method: POST
- 400: Invalid data
- 201: Team created
- 401: Unauthorized
- 409: Team already exists
get auth scheme
- path: /auth/scheme
- produce: application/json
- method: GET
- 200: OK
dump goroutines
- path: /debug/goroutines
- method: GET
- 200: Ok
deploy list
- path: /deploys
- produce: application/json
- method: GET
- 200: OK
- 204: No content
deploy info
- path: /deploys/{deploy}
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
- 404: Not found
app deploy
- path: /apps/{appname}/deploy
- consume: application/x-www-form-urlencoded
- method: POST
- 200: OK
- 400: Invalid data
- 403: Forbidden
- 404: Not found
deploy diff
- path: /apps/{appname}/diff
- consume: application/x-www-form-urlencoded
- method: POST
- 200: OK
- 400: Invalid data
- 403: Forbidden
- 404: Not found
rollback
- path: /apps/{appname}/deploy/rollback
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: OK
- 400: Invalid data
- 403: Forbidden
- 404: Not found
healthcheck
- path: /healthcheck
- method: GET
- 200: OK
- 500: Internal server error
template destroy
- path: /iaas/templates/{template_name}
- method: DELETE
- 200: OK
- 401: Unauthorized
- 404: Not found
template update
- path: /iaas/templates/{template_name}
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: OK
- 400: Invalid data
- 404: Not found
- 401: Unauthorized
machine list
- path: /iaas/machines
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
machine destroy
- path: /iaas/machines/{machine_id}
- method: DELETE
- 200: OK
- 400: Invalid data
- 404: Not found
- 401: Unauthorized
machine template list
- path: /iaas/templates
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
template create
- path: /iaas/templates
- consume: application/x-www-form-urlencoded
- method: POST
- 400: Invalid data
- 201: Template created
- 401: Unauthorized
index
- path: /
- method: GET
- 200: OK
api info
- path: /info
- produce: application/json
- method: GET
- 200: OK
dissociate role from user
- path: /roles/{name}/user/{email}
- method: DELETE
- 200: Ok
- 400: Invalid data
- 404: Role not found
- 401: Unauthorized
list permissions
- path: /permissions
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
remove default role
- path: /role/default
- method: DELETE
- 200: Ok
- 400: Invalid data
- 401: Unauthorized
list default roles
- path: /role/default
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
role create
- path: /roles
- consume: application/x-www-form-urlencoded
- method: POST
- 400: Invalid data
- 201: Role created
- 401: Unauthorized
- 409: Role already exists
remove role
- path: /roles/{name}
- method: DELETE
- 200: Role removed
- 401: Unauthorized
- 404: Role not found
role list
- path: /roles
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
add permissions
- path: /roles/{name}/permissions
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 401: Unauthorized
- 409: Permission not allowed
assign role to user
- path: /roles/{name}/user
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 404: Role not found
- 401: Unauthorized
role info
- path: /roles/{name}
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
- 404: Role not found
add default role
- path: /role/default
- method: POST
- 200: Ok
- 400: Invalid data
- 401: Unauthorized
remove permission
- path: /roles/{name}/permissions/{permission}
- method: DELETE
- 200: Permission removed
- 401: Unauthorized
- 404: Not found
plan create
- path: /plans
- consume: application/x-www-form-urlencoded
- method: POST
- 400: Invalid data
- 201: Plan created
- 401: Unauthorized
- 409: Plan already exists
plan list
- path: /plans
- produce: application/json
- method: GET
- 200: OK
- 204: No content
remove plan
- path: /plans/{name}
- method: DELETE
- 200: Plan removed
- 401: Unauthorized
- 404: Plan not found
router list
- path: /plans/routers
- produce: application/json
- method: GET
- 200: OK
- 204: No content
- path: /platforms
- produce: application/x-json-stream
- consume: multipart/form-data
- method: POST
- 200: Platform created
- 400: Invalid data
- 401: Unauthorized
- path: /platforms/{name}
- produce: application/x-json-stream
- method: PUT
- 200: Platform updated
- 401: Unauthorized
- 404: Not found
- path: /platforms/{name}
- method: DELETE
- 200: Platform removed
- 401: Unauthorized
- 404: Not found
- path: /platforms
- produce: application/json
- method: GET
- 200: List platforms
- 401: Unauthorized
- 204: No content
pool list
- path: /pools
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
- 404: User not found
- 204: No content
pool create
- path: /pools
- consume: application/x-www-form-urlencoded
- method: POST
- 400: Invalid data
- 201: Pool created
- 401: Unauthorized
- 409: Pool already exists
remove pool
- path: /pools/{name}
- method: DELETE
- 200: Pool removed
- 401: Unauthorized
- 404: Pool not found
add team too pool
- path: /pools/{name}/team
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Pool updated
- 401: Unauthorized
- 400: Invalid data
- 404: Pool not found
remove team from pool
- path: /pools/{name}/team
- method: DELETE
- 200: Pool updated
- 401: Unauthorized
- 400: Invalid data
- 404: Pool not found
pool update
- path: /pools/{name}
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Pool updated
- 401: Unauthorized
- 404: Pool not found
- 409: Default pool already defined
profile index handler
- path: /debug/pprof
- method: GET
- 200: Ok
- 401: Unauthorized
profile cmdline handler
- path: /debug/pprof/cmdline
- method: GET
- 200: Ok
- 401: Unauthorized
profile handler
- path: /debug/pprof/profile
- method: GET
- 200: Ok
- 401: Unauthorized
profile symbol handler
- path: /debug/pprof/symbol
- method: GET
- 200: Ok
- 401: Unauthorized
user quota
- path: /users/{email}/quota
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
- 404: User not found
update user quota
- path: /users/{email}/quota
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Quota updated
- 400: Invalid data
- 404: User not found
- 401: Unauthorized
application quota
- path: /apps/{appname}/quota
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
- 404: Application not found
update application quota
- path: /apps/{appname}/quota
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Quota updated
- 400: Invalid data
- 404: Application not found
- 401: Unauthorized
saml callback
- path: /auth/saml
- method: POST
- 200: Ok
- 400: Invalid data
- path: /auth/saml
- produce: application/xml
- method: GET
- 200: Ok
- 400: Invalid data
service instance list
- path: /services/instances
- produce: application/json
- method: GET
- 200: List services instances
- 401: Unauthorized
- 204: No content
service instance status
- path: /services/{service}/instances/{instance}/status
- method: GET
- 200: List services instances
- 401: Unauthorized
- 404: Service instance not found
service instance proxy
- path: /services/{service}/proxy/{instance}
- method: *
- 401: Unauthorized
- 404: Instance not found
grant access to service instance
- path: /services/{service}/instances/permission/{instance}/{team}
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Access granted
- 401: Unauthorized
- 404: Service instance not found
remove service instance
- path: /services/{name}/instances/{instance}
- produce: application/x-json-stream
- method: DELETE
- 200: Service removed
- 401: Unauthorized
- 404: Service instance not found
service instance info
- path: /services/{service}/instances/{instance}
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
- 404: Service instance not found
service info
- path: /services/{name}
- produce: application/json
- method: GET
- 200: OK
service doc
- path: /services/{name}/doc
- method: GET
- 200: OK
- 401: Unauthorized
- 404: Not found
service instance create
- path: /services/{service}/instances
- consume: application/x-www-form-urlencoded
- method: POST
- 400: Invalid data
- 201: Service created
- 401: Unauthorized
- 409: Service already exists
service instance update
- path: /services/{service}/instances/{instance}
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Service instance updated
- 400: Invalid data
- 404: Service instance not found
- 401: Unauthorized
service plans
- path: /services/{name}/plans
- produce: application/json
- method: GET
- 200: OK
- 401: Unauthorized
- 404: Service not found
revoke access to service instance
- path: /services/{service}/instances/permission/{instance}/{team}
- method: DELETE
- 200: Access revoked
- 401: Unauthorized
- 404: Service instance not found
revoke access to a service
- path: /services/{service}/team/{team}
- method: DELETE
- 200: Access revoked
- 400: Team not found
- 404: Service not found
- 401: Unauthorized
- 409: Team does not has access to this service
change service documentation
- path: /services/{name}/doc
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Documentation updated
- 401: Unauthorized
- 403: Forbidden (team is not the owner or service with instances)
service list
- path: /services
- produce: application/json
- method: GET
- 200: List services
- 401: Unauthorized
- 204: No content
grant access to a service
- path: /services/{service}/team/{team}
- method: PUT
- 200: Service updated
- 400: Team not found
- 404: Service not found
- 401: Unauthorized
- 409: Team already has access to this service
service update
- path: /services/{name}
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Service updated
- 400: Invalid data
- 403: Forbidden (team is not the owner)
- 404: Service not found
- 401: Unauthorized
service delete
- path: /services/{name}
- method: DELETE
- 200: Service removed
- 401: Unauthorized
- 403: Forbidden (team is not the owner or service with instances)
- 404: Service not found
service proxy
- path: /services/proxy/service/{service}
- method: *
- 401: Unauthorized
- 404: Service not found
service create
- path: /services
- consume: application/x-www-form-urlencoded
- method: POST
- 400: Invalid data
- 201: Service created
- 401: Unauthorized
- 409: Service already exists
node container upgrade
- path: /docker/nodecontainers/{name}/upgrade
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invald data
- 404: Not found
- 401: Unauthorized
get autoscale config
- path: /docker/autoscale/config
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
autoscale rules list
- path: /docker/autoscale/rules
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
- 204: No content
update nodes
- path: /docker/node
- consume: application/x-www-form-urlencoded
- method: PUT
- 200: Ok
- 400: Invalid data
- 404: Not found
- 401: Unauthorized
list healing history
- path: /docker/healing
- produce: application/json
- method: GET
- 200: Ok
- 400: Invalid data
- 204: No content
- 401: Unauthorized
logs config
- path: /docker/logs
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
node container create
- path: /docker/nodecontainers
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invald data
- 401: Unauthorized
node container info
- path: /docker/nodecontainers/{name}
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
- 404: Not found
delete autoscale rule
- path: /docker/autoscale/rules/{id}
- method: DELETE
- 200: Ok
- 401: Unauthorized
- 404: Not found
add node
- path: /docker/node
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 201: Ok
- 404: Not found
- 401: Unauthorized
move containers
- path: /docker/containers/move
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 404: Not found
- 401: Unauthorized
list autoscale history
- path: /docker/healing
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
- 204: No content
logs config set
- path: /docker/logs
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 401: Unauthorized
list containers by app
- path: /docker/node/apps/{appname}/containers
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
- 404: Not found
- 204: No content
autoscale run
- path: /docker/autoscale/run
- produce: application/x-json-stream
- method: POST
- 200: Ok
- 401: Unauthorized
node healing update
- path: /docker/healing/node
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 401: Unauthorized
remove node
- path: /docker/node/{address}
- method: DELETE
- 200: Ok
- 401: Unauthorized
- 404: Not found
remove node healing
- path: /docker/healing/node
- produce: application/json
- method: DELETE
- 200: Ok
- 401: Unauthorized
list nodes
- path: /docker/node
- produce: application/json
- method: GET
- 200: Ok
- 204: No content
move container
- path: /docker/container/{id}/move
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 404: Not found
- 401: Unauthorized
list containers by node
- path: /docker/node/{address}/containers
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
- 404: Not found
- 204: No content
node container update
- path: /docker/nodecontainers/{name}
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invald data
- 404: Not found
- 401: Unauthorized
autoscale set rule
- path: /docker/autoscale/rules
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 401: Unauthorized
node healing info
- path: /docker/healing/node
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
remove node container list
- path: /docker/nodecontainers
- produce: application/json
- method: GET
- 200: Ok
- 401: Unauthorized
rebalance containers
- path: /docker/containers/rebalance
- produce: application/x-json-stream
- consume: application/x-www-form-urlencoded
- method: POST
- 200: Ok
- 400: Invalid data
- 204: No content
- 401: Unauthorized
remove node container
- path: /docker/nodecontainers/{name}
- method: DELETE
- 200: Ok
- 401: Unauthorized
- 404: Not found
Swagger Spec based reference
GET
/1.0/services
List services
|Status Codes:
|——-
|
- 200 OK – Services
- 204 No Content – No content
GET
/1.0/services/instances
List service instances
|Query Parameters:
|——-
| |
- app (string) – Filter instances by app name
|Status Codes:
|——-
|
- 200 OK – Service instances
- 204 No Content – No content
- 401 Unauthorized – Unauthorized
GET
/1.0/services/{service}/instances/{instance}
Get service instance information
|Parameters:
|——-
|
- service (string) – Service name.
- instance (string) – Instance name.
|Status Codes:
|——-
|
- 200 OK – Service instance
- 401 Unauthorized – Unauthorized
- 404 Not Found – Service instance not found
PUT
/1.0/services/{service}/instances/{instance}
Update a service instance
|Parameters:
|——-
|
- service (string) – Service name.
- instance (string) – Instance name.
|Status Codes:
|——-
|
- 200 OK – Service instance updated
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 404 Not Found – Service instance not found
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:
|——-
|
- 200 OK – Service removed
- 400 Bad Request – Bad request
- 401 Unauthorized – Unauthorized
- 404 Not Found – Service instance not found
GET
/1.7/brokers
List service brokers
|Status Codes:
|——-
|
- 200 OK – List service brokers
- 204 No Content – No content
- 401 Unauthorized – Unauthorized
POST
/1.7/brokers
Create service broker
|Status Codes:
|——-
|
- 200 OK – Service Broker created.
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized.
- 409 Conflict – Service Broker already exists.
DELETE
/1.7/brokers/{name}
|Parameters:
|——-
|
- name (string) – Service Broker name.
|Status Codes:
|——-
|
- 200 OK – Service Broker deleted.
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized.
- 404 Not Found – Service Broker not found.
PUT
/1.7/brokers/{name}
Update service broker
|Parameters:
|——-
|
- name (string) – Service Broker name.
|Status Codes:
|——-
|
- 200 OK – Service Broker updated.
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized.
- 404 Not Found – Service Broker not found.
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.
|Status Codes:
|——-
|
- 200 OK – List apps
- 204 No Content – No content
- 401 Unauthorized – Unauthorized
POST
/1.0/apps
Create a new app.
|Status Codes:
|——-
|
- 201 Created – App created
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 403 Forbidden – Quota exceeded
- 409 Conflict – App already exists
GET
/1.0/apps/{app}
Get info about a tsuru app.
|Parameters:
|——-
|
- app (string) – Appname.
|Status Codes:
|——-
|
- 200 OK – App info
- 401 Unauthorized – Unauthorized.
- 404 Not Found – App not found.
DELETE
/1.0/apps/{app}
Delete a tsuru app.
|Parameters:
|——-
|
- app (string) – App name.
|Status Codes:
|——-
|
- 200 OK – App removed.
- 401 Unauthorized – Unauthorized.
- 404 Not Found – App not found.
PUT
/1.0/apps/{app}
Update a tsuru app.
|Parameters:
|——-
|
- app (string) – App name.
|Status Codes:
|——-
|
- 200 OK – App updated
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 404 Not Found – Not found
POST
/1.0/apps/{app}/env
Set new environment variable.
|Parameters:
|——-
|
- app (string) – App name.
|Status Codes:
|——-
|
- 200 OK – Envs updated
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 404 Not Found – App not found
GET
/1.0/apps/{app}/env
Get app environment variables.
|Parameters:
|——-
|
- app (string) – App name.
|Query Parameters:
|——-
| |
- env (string) – Environment variable name.
|Status Codes:
|——-
|
- 200 OK – Environment variables
- 401 Unauthorized – Unauthorized
- 404 Not Found – App not found
DELETE
/1.0/apps/{app}/env
Unset app environment variables.
|Parameters:
|——-
|
- app (string) – App name.
|Query Parameters:
|——-
| |
- env (array) –
- norestart (boolean) –
|Status Codes:
|——-
|
- 200 OK – Envs deleted
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 404 Not Found – App not found
DELETE
/1.0/platforms/{platform}
Delete platform.
|Parameters:
|——-
|
- platform (string) – Platform name.
|Status Codes:
|——-
|
- 200 OK – Platform removed
- 401 Unauthorized – Unauthorized
- 404 Not Found – Not found
PUT
/1.0/platforms/{platform}
Update platform.
|Parameters:
|——-
|
- platform (string) – Platform name.
|Status Codes:
|——-
|
- 200 OK – Platform updated
- 401 Unauthorized – Unauthorized
- 404 Not Found – Not found
GET
/1.0/platforms
List platforms.
|Status Codes:
|——-
|
- 200 OK – Platform list
- 204 No Content – No content
- 401 Unauthorized – Unauthorized
POST
/1.0/platforms
Add new platform.
|Status Codes:
|——-
|
- 200 OK – Platform created
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
GET
/1.6/platforms/{platform}
Platform info.
|Parameters:
|——-
|
- platform (string) – Platform info.
|Status Codes:
|——-
|
- 200 OK – Platform info
- 401 Unauthorized – Unauthorized
- 404 Not Found – Not found
POST
/1.6/platforms/{platform}/rollback
Platform rollback.
|Parameters:
|——-
|
- platform (string) – Platform name.
|Query Parameters:
|——-
| |
- image (string) –
|Status Codes:
|——-
|
- 200 OK – Ok
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 404 Not Found – Not found
GET
/1.0/teams
List teams.
|Status Codes:
|——-
|
- 200 OK – Team list.
- 204 No Content – No content.
- 401 Unauthorized – Unauthorized
POST
/1.0/teams
Create a team.
|Status Codes:
|——-
|
- 201 Created – Team created.
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 409 Conflict – Team already exists
DELETE
/1.0/teams/{team}
Delete a team.
|Parameters:
|——-
|
- team (string) – Team name.
|Status Codes:
|——-
|
- 200 OK – Team removed.
- 401 Unauthorized – Unauthorized
- 403 Forbidden – Forbidden
- 404 Not Found – Team not found
GET
/1.4/teams/{team}
Get a team.
|Parameters:
|——-
|
- team (string) – Team name.
|Status Codes:
|——-
|
- 200 OK – Team data
- 401 Unauthorized – Unauthorized
- 404 Not Found – Team not found
PUT
/1.6/teams/{team}
Update a team.
|Parameters:
|——-
|
- team (string) – Team name.
|Status Codes:
|——-
|
- 200 OK – Team updated
- 400 Bad Request – Unauthorized
- 401 Unauthorized – Invalid data
- 404 Not Found – Team not found
GET
/1.0/users
List users.
|Query Parameters:
|——-
| |
- email (string) –
- role (string) –
- context (string) –
|Status Codes:
|——-
|
- 200 OK – List users.
- 401 Unauthorized – Unauthorized
POST
/1.0/users
Create a new user.
|Status Codes:
|——-
|
- 201 Created – User created.
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 403 Forbidden – Forbidden
- 409 Conflict – User already exists
DELETE
/1.0/users
Delete an user.
|Query Parameters:
|——-
| |
- email (string) – User e-mail.
|Status Codes:
|——-
|
- 200 OK – User removed
- 401 Unauthorized – Unauthorized
- 404 Not Found – Not found
GET
/1.0/users/api-key
Show the API token of an user.
|Query Parameters:
|——-
| |
- email (string) –
|Status Codes:
|——-
|
- 200 OK – API TOKEN
- 401 Unauthorized – Unauthorized
- 404 Not Found – User not found
POST
/1.0/users/api-key
Regenerate the API Token of an user.
|Query Parameters:
|——-
| |
- email (string) –
|Status Codes:
|——-
|
- 200 OK – API TOKEN
- 401 Unauthorized – Unauthorized
- 404 Not Found – User not found
GET
/1.0/users/keys
Show the list of the ssh keys of logged user.
|Status Codes:
|——-
|
- 200 OK – OK
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
POST
/1.0/users/keys
Add SSH key to logged user.
|Status Codes:
|——-
|
- 200 OK – Ok
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 409 Conflict – Key already exists
DELETE
/1.0/users/keys/{key}
Delete one ssh key of logged user.
|Parameters:
|——-
|
- key (string) –
|Status Codes:
|——-
|
- 200 OK – Ok
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 404 Not Found – Not found
GET
/1.0/users/info
Get information on logged user.
|Status Codes:
|——-
|
- 200 OK – OK
- 401 Unauthorized – Unauthorized
GET
/1.0/users/{email}/quota
Get quota of an user.
|Parameters:
|——-
|
- email (string) – User e-mail.
|Status Codes:
|——-
|
- 200 OK – OK
- 401 Unauthorized – Unauthorized
- 404 Not Found – User not found
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:
|——-
|
- 200 OK – Quota successfully updated
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 404 Not Found – User not found
PUT
/1.0/users/password
Change password of logged user.
|Status Codes:
|——-
|
- 200 OK – Ok
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 403 Forbidden – Forbidden
- 404 Not Found – Not found
POST
/1.0/users/{email}/password
Reset password of an user.
|Parameters:
|——-
|
- email (string) –
|Status Codes:
|——-
|
- 200 OK – Ok
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 403 Forbidden – Forbidden
- 404 Not Found – Not found
DELETE
/1.0/users/tokens
Logout.
|Status Codes:
|——-
|
- 200 OK – Ok
GET
/1.2/node
List nodes.
|Status Codes:
|——-
|
- 200 OK – Nodes List.
- 204 No Content – No content.
POST
/1.2/node
Add a node.
|Status Codes:
|——-
|
- 201 Created – Ok
- 401 Unauthorized – Unauthorized
- 400 Bad Request – Invalid parameters
PUT
/1.2/node
Update node.
|Status Codes:
|——-
|
- 200 OK – Ok
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 404 Not Found – Not found
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:
|——-
|
- 200 OK – Ok
- 401 Unauthorized – Unauthorized
- 404 Not Found – Not found
GET
/1.2/node/{address}
Get node information.
|Parameters:
|——-
|
- address (string) – Node address.
|Status Codes:
|——-
|
- 200 OK – Ok
- 401 Unauthorized – Unauthorized
- 404 Not Found – Not found
GET
/1.4/volumes
List volumes.
|Status Codes:
|——-
|
- 200 OK – List volumes
- 204 No Content – No content
- 401 Unauthorized – Unauthorized
POST
/1.4/volumes
Create volume.
|Status Codes:
|——-
|
- 201 Created – Volume created
- 401 Unauthorized – Unauthorized
- 409 Conflict – Volume already exists
GET
/1.0/pools
List pools.
|Status Codes:
|——-
|
- 200 OK – Pools list
- 204 No Content – No content
- 401 Unauthorized – Unauthorized
POST
/1.0/pools
Creates a pool.
|Status Codes:
|——-
|
- 201 Created – Pool created
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 409 Conflict – Pool already exists
DELETE
/pools/{pool}
Deletes a pool.
|Parameters:
|——-
|
- pool (string) –
|Status Codes:
|——-
|
- 200 OK – Pool deleted
- 401 Unauthorized – Unauthorized
- 403 Forbidden – Pool still has apps
- 404 Not Found – Pool not found
PUT
/pools/{pool}
Updates a pool.
|Parameters:
|——-
|
- pool (string) –
|Status Codes:
|——-
|
- 200 OK – Pool updated
- 401 Unauthorized – Unauthorized
- 404 Not Found – Pool not found
- 409 Conflict – Default pool already defined
GET
/1.3/provisioner/clusters
List cluster
|Status Codes:
|——-
|
- 200 OK – Cluster
- 401 Unauthorized – Unauthorized
- 404 Not Found – Cluster not found
POST
/1.3/provisioner/clusters
Create cluster.
|Status Codes:
|——-
|
- 200 OK – Cluster created
- 401 Unauthorized – Unauthorized
- 404 Not Found – Cluster not found
DELETE
/1.3/provisioner/clusters/{cluster}
Delete cluster.
|Parameters:
|——-
|
- cluster (string) – Cluster name.
|Status Codes:
|——-
|
- 200 OK – Cluster deleted
- 401 Unauthorized – Unauthorized
- 404 Not Found – Cluster not found
POST
/1.4/provisioner/clusters/{cluster}
Update cluster.
|Parameters:
|——-
|
- cluster (string) – Cluster name.
|Status Codes:
|——-
|
- 200 OK – Cluster updated
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized
- 404 Not Found – Cluster not found
DELETE
/1.4/volumes/{volume}
Delete volume.
|Parameters:
|——-
|
- volume (string) – Volume name.
|Status Codes:
|——-
|
- 200 OK – Volume deleted
- 401 Unauthorized – Unauthorized
- 404 Not Found – Volume not found
GET
/1.4/volumes/{volume}
Get a volume.
|Parameters:
|——-
|
- volume (string) – Volume name.
|Status Codes:
|——-
|
- 200 OK – Volume
- 401 Unauthorized – Unauthorized
- 409 Conflict – Volume already exists
POST
/1.4/volumes/{volume}/bind
Bind volume.
|Parameters:
|——-
|
- volume (string) – Volume name.
|Status Codes:
|——-
|
- 200 OK – Volume bind
- 401 Unauthorized – Unauthorized
- 404 Not Found – Volume not found
- 409 Conflict – Volume bind already exists
DELETE
/1.4/volumes/{volume}/bind
Unbind volume.
|Parameters:
|——-
|
- volume (string) – Volume name.
|Status Codes:
|——-
|
- 200 OK – Volume unbinded
- 401 Unauthorized – Unauthorized
- 404 Not Found – Volume not found
GET
/1.4/volumeplans
List volume plans.
|Status Codes:
|——-
|
- 200 OK – Volume plans list
- 401 Unauthorized – Unauthorized
POST
/1.6/roles/{rolename}/token
Assigns a role to a team token.
|Parameters:
|——-
|
- role_name (_string) –
|Status Codes:
|——-
|
- 200 OK – Role assigned.
- 401 Unauthorized – Unauthorized.
- 404 Not Found – Role or token not found
DELETE
/1.6/roles/{rolename}/token/{token_id}
Dissociates a role from a team token.
|Parameters:
|——-
|
- role_name (_string) –
- token_id (string) –
|Query Parameters:
|——-
| |
- context (string) –
|Status Codes:
|——-
|
- 200 OK – Role dissociated.
- 401 Unauthorized – Unauthorized.
- 404 Not Found – Role or token not found
GET
/1.6/tokens
List team tokens.
|Status Codes:
|——-
|
- 200 OK – Team tokens list.
- 204 No Content – No content.
- 401 Unauthorized – Unauthorized.
POST
/1.6/tokens
Creates a team token.
|Status Codes:
|——-
|
- 201 Created – Team token created.
- 401 Unauthorized – Unauthorized.
- 409 Conflict – Token with the same ID already exists.
DELETE
/1.6/tokens/{tokenid}
Deletes a team token.
|Parameters:
|——-
|
- token_id (_string) – Token ID.
|Status Codes:
|——-
|
- 200 OK – Team token deleted.
- 401 Unauthorized – Unauthorized.
- 404 Not Found – Team token not found.
PUT
/1.6/tokens/{tokenid}
Updates a team token.
|Parameters:
|——-
|
- token_id (_string) – Token ID.
|Status Codes:
|——-
|
- 200 OK – Team token updated.
- 401 Unauthorized – Unauthorized.
- 404 Not Found – Team token not found.
POST
/1.1/events/{eventid}/cancel
|Parameters:
|——-
|
- eventid (string) –
|Status Codes:
|——-
|
- 204 No Content – Event cancelation requested.
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized.
- 404 Not Found – Event not found
GET
/1.6/events/webhooks
|Status Codes:
|——-
|
- 200 OK – Webhooks list.
- 204 No Content – No content.
POST
/1.6/events/webhooks
|Status Codes:
|——-
|
- 200 OK – Webhook created.
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized.
- 409 Conflict – Webhook already exists.
GET
/1.6/events/webhooks/{name}
|Parameters:
|——-
|
- name (string) – Webhook name.
|Status Codes:
|——-
|
- 200 OK – Webhook.
- 404 Not Found – Not founds.
- 401 Unauthorized – Unauthorized.
PUT
/1.6/events/webhooks/{name}
|Parameters:
|——-
|
- name (string) – Webhook name.
|Status Codes:
|——-
|
- 200 OK – Webhook updated.
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized.
- 404 Not Found – Webhook not found.
DELETE
/1.6/events/webhooks/{name}
|Parameters:
|——-
|
- name (string) – Webhook name.
|Status Codes:
|——-
|
- 200 OK – Webhook created.
- 400 Bad Request – Invalid data
- 401 Unauthorized – Unauthorized.
- 404 Not Found – Webhook not found.
原文: https://docs.tsuru.io/1.6/reference/api.html