forked from trema/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Tenants
kazuya edited this page Jan 6, 2012
·
5 revisions
List summary of tenants.
GET /tenants
- 200 : OK
- 500 : Internal error. (Failed to retrieve details of the specified tenant.)
[
{
"id" : "tenant1",
"description" : "description for tenant1"
},
{
"id" : "tenant2",
"description" : "description for tenant2"
}
]
Create a new tenant.
POST /tenants
- id : a unique id of the tenant (option). 'id' is automatically assigned if it is not specified.
- description : description of the creating tenant (option)
{
"id": "tenant_created_via_rest_if",
"description": "description here"
}
- 200 : OK
- 404 : Not found the specified tenant.
- 500 : Internal error. (Failed to retrieve details of the specified tenant.)
{
"id" : "tenant_created_via_rest_if",
"description" : "description here"
}
Show details of a tenant identified by tenant_id.
- tenant_id : a unique id of the tenant (required).
GET /tenants/:tenant_id
- 200 : OK
- 404 : Not found the specified tenant.
- 500 : Internal error. (Failed to retrieve detail of the specified tenant.)
{
"networks" : [
{
"id" : "slice1",
"description" : "description for slice1"
},
{
"id" : "slice2",
"description" : "description for slice2"
}
},
"description" : "description here"
]
Update details of tenant identified by tenant_id.
- tenant_id : a unique id of the tenant (required).
PUT /tenants/:tenant_id
- description : description of the creating tenant (option).
{
"description" : "new description here"
}
- 202 : Succeeded.
- 404 : Not found the specified tenant.
- 422 : The specified parameters are unacceptable.
- 500 : Internal error. (Failed to modify the specified tenant.)
Remove the tenant identified by tenant_id.
- tenant_id : a unique id of the tenant (required).
DELETE /tenants/:tenant_id
- 202 : Succeeded.
- 404 : Not found the specified tenant or network.
- 500 : Internal error. (Failed to destroy the specified tenant.)