Tenant API

With the Tenant API you can control your Weavy tenants from your own code. The API sits on top of the Tenant Dashboard and facilitates a number of tasks.

Introduction

The API is a JSON API with the following guiding principles:

Authentication

In order to make authorized calls to the Weavy Management API, your application must first obtain a access token. Once you have an access token, you can issue authorized requests to the API.

Method Path Description
POST /identity/connect/token Request an access token from the authorization server’s token endpoint.

Assets

The Assets API has methods for managing assets (templates, logos etc.).

Method Path Description
POST /api/assets Uploads a new asset. Use multipart/form-data for the request format and single file upload.
GET /api/assets Gets all assets.
DELETE /api/assets Deletes a asset.

Builds

The Build API has methods for managing the builds that you deploy or use to upgrade your tenants.

Method Path Description
POST /api/builds Uploads a new build. Use multipart/form-data for the request format and single file upload.
GET /api/builds Gets all builds.
DELETE /api/builds Deletes a build.
PUT /api/builds/default Sets the default build.
DELETE /api/builds/default Clears the default build.

Logs

The Logs API has methods for enumerating and downloading the logs for the Tenant SDK.

Method Path Description
GET /api/logs Lists log files.
GET /api/logs/{name} Gets a log file and its content.

Operations

The Operations API has methods for retrieving the current state for long running operations.

Method Path Description
GET /api/operations/{id} Gets the operation with the given id.

Tenants

Use the Tenants API for manipulating Weavy tenants.

Method Path Description
GET /api/tenants Search for tenants.
GET /api/tenants/{id} Gets the tenant with the specified id.
GET /api/tenants/{name}/get Gets the tenant with the specified name.
PATCH /api/tenants/{id} Updates metadata about a tenant.
POST /api/tenants Create a tenant by deploying a build.
GET /api/tenants/{id}/appsettings Gets the appSettings in Azure for an tenant.
PUT /api/tenants/{id}/appsettings Sets the appSettings in Azure for a tenant.
POST /api/tenants/{id}/upgrade Ugrade a tenant by deploying a new build to it.
POST /api/tenants/{id}/backup Backs up the database for a tenant.
GET /api/tenants/{id}/stats Gets statistics about a tenant.
POST /api/tenants/{id}/delete Deletes a tenant along with all related Azure resources.
POST /api/tenants/{id}/start Starts a tenant in Azure.
POST /api/tenants/{id}/stop Stops an tenant in Azure.
GET /api/tenants/{name}/available Gets a value indicating if the tenant name is available or taken.
GET /api/tenants/{licenseKey}/profile Returns the publishing profile in XML format for the tenant with the supplied license key. See: https://docs.microsoft.com/en-us/visualstudio/deployment/tutorial-import-publish-settings-azure?view=vs-2019

Version

The Versions API has methods for retrieving information about the current version of the Deployment API.

Method Path Description
GET /api/version Gets the current api version as {major}.{minor}.{patch}.