Tenant
A Tenant is the partition of a Startup’s data that belongs to one Customer.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
placement | string | Where the Tenant sits in an address: path or host. | |
apiVersion | string | The API version an unversioned call with this Tenant’s keys answers at; set at creation, moved only by pin. |
Object
{
"$id": "https: //api.sb/ petpantry.shop/ tenants/ tenant_1",
"$type": "Tenant",
"placement": "path",
"apiVersion": "v2"
}Relationships
- A Tenant admits many People: a Person joins a Customer’s Tenant as a member, and one Person can join many Tenants.
admits, inversejoins. - A Tenant has many API Keys: every call it signs reads and writes only that Customer’s records.
apiKeys, inversereaches. - A Tenant’s hostnames are many Domains: a Tenant answers on the names its Customer connects; each such Domain serves one Tenant.
hostnames, inverseserves. - A Tenant is owned by one Customer: each Customer has one Tenant: the partition of the Startup’s data that no other Customer reads.
ownedBy, inverseowns. - A Tenant is provisioned by many Member Directories: a Member Directory fills and empties Roles in one Tenant as people join and leave the Customer.
provisionedBy, inverseprovisions. - A Tenant signs in via many SSO Connections: a Tenant’s people sign in through its SSO Connections; the Customer’s admin owns each one.
signsInVia, inverseserves. - A Tenant verifies many Domains: a Tenant proves control of its Customer’s email domain, so sign-ins on that domain follow the Tenant’s policy.
verifies, inverseverifiedBy.
Verbs
createCreates a Tenant.POST /{namespace}/tenantsgetReturns one Tenant by id.GET /{namespace}/tenants/{id}listReturns Tenants, newest first, one page at a time.GET /{namespace}/tenantsupdateChanges the given properties of a Tenant.PATCH /{namespace}/tenants/{id}deleteDeletes a Tenant; its history is kept.DELETE /{namespace}/tenants/{id}inviteInvite asks a Person to join a Customer’s Tenant, and resizes the Subscription when the Offer prices per member.POST /{namespace}/tenants/{tenant}/invitepinPin moves a Tenant’s keys to another API version, or to `latest`, once a call with its test key passes there.POST /{namespace}/tenants/{tenant}/pinprovisionProvision creates a Customer’s Tenant in a Startup’s App, holding that Customer’s records apart from every other.POST /{namespace}/tenants/provisionrequestSetupRequestSetup sends a Customer’s admin a link to connect their own sign-in, directory or verified domain to the Tenant.POST /{namespace}/tenants/{tenant}/requestSetup
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Tenant.create | Yes | Yes | Yes | No |
Tenant.get | Yes | Yes | Yes | Yes |
Tenant.list | Yes | Yes | Yes | Yes |
Tenant.update | Yes | Yes | Yes | No |
Tenant.delete | Yes | Yes | Yes | No |
Tenant.invite | Yes | Yes | Yes | No |
Tenant.pin | Yes | Yes | Yes | No |
Tenant.provision | Yes | Yes | Yes | No |
Tenant.requestSetup | Yes | Yes | Yes | No |
Call it
Provision the latest tenant with a customer.Example
A recruiting agency's Tenant in a candidate-tracking SaaS holds its 40,000 candidates, its API keys, and its usage. No other Customer reads it.