This is the /application/v2/tenant API reference with examples for the HTTP REST API for listing, creating and deleting tenants, which can further be used to deploy applications.
A tenant is property or product within an organization. Each tenant can have several applications deployed to multiple environments and regions. The response format is JSON.
The current API version is 2. The API port is 19071 - use
vespa-model-inspect service configserver
to find config server hosts - example:
http://myconfigserver.mydomain.com:19071/application/v2/tenant/
Entities:
Tenant |
The tenant name is required for all operations. Tenant names may only contain word characters, underscore and dash: [a-zA-Z_0-9-]. |
---|
HTTP request | application/v2/tenant operation | Description |
---|---|---|
GET |
List tenant information. |
|
List tenants |
A list of tenant names handled by this server. /application/v2/tenant/ Example response:
|
|
Get tenant |
Get the tenant - a message with the tenant name. /application/v2/tenant/[tenant name] Example response:
|
|
PUT |
Create a new tenant. |
|
Create tenant |
Creates a new tenant with tenant name. /application/v2/tenant/[tenant name] Response: A message with the tenant name of the tenant created - example:
Note:
This operation is asynchronous,
it will eventually propagate to all config servers.
|
|
DELETE |
Delete a tenant. |
|
Delete tenant |
Deletes a tenant with tenant name. /application/v2/tenant/[tenant name] Response: A message with the tenant name of the tenant deleted - example:
Note:
This operation is asynchronous,
it will eventually propagate to all config servers.
|
None.
Non-exhaustive list of status codes. Any additional info is included in the body of the return call, JSON-formatted.
Code | Description |
---|---|
400 | Bad request. Client error. The error message should indicate the cause. |
404 | Not found. For example using a session id that does not exist. |
405 | Method not implemented. E.g. using GET where only POST or PUT is allowed. |
500 | Internal server error. Generic error. The error message should indicate the cause. |
Responses are in JSON format, with the following fields:
Field | Description |
---|---|
message | An info/error message. |