Key concepts

Tenants

A tenant is a group of users who share a common access with specific privileges to the software instance. In Qualy's context, it's a company, institution, or franchisee.


Multi-tenancy

A multi-tenant system represents an architecture where a single instance of software serves multiple users or tenants (such as businesses or customers), each of whom operates independently within the same system. This allows Qualy to the segregate the data of multiple tenants.

In essence, this allows us to keep our customer's data and interactions isolated and secure from other customers.

Tenant ID

In a multi-tenant system like Qualy, the Tenant ID plays a pivotal role in distinguishing and identifying each tenant accessing the system. For security and proper data segregation, it is essential that every request made to the system contains the X-TENANT-ID header.

Example of including the Tenant ID header in API requests:

const makeRequest = async () => {
  const requestConfig = {
    method: 'GET',
    headers: {
      'X-TENANT-ID': 'eu1-unique-tenant-id-here',
      'Authorization': 'ApiKey pk_prod_api-key-here'
    },
  };

  try {
    const response = await fetch('https://api.qualyhq.com/v1/users/user', requestConfig);

    if (response.ok) {
      const data = await response.json();

      console.log(data);
    } else {
      throw new Error(`Request failed with status: ${response.status}`);
    }
  } catch (error) {
    console.error(error);
  }
};

makeRequest();

Requests without Tenant ID

Requests without a valid X-TENANT-ID header will throw an error.

You can also use the header x-tenant-id (in lowercase).

Retrieve the Tenant ID

To retrieve your account's Tenant ID:

  1. Open Qualy's Dashboard
  2. Click on the Settings icon on the top-right corner.
  3. Click on API keys & webhooks.
  4. Copy the Tenant ID displayed.
Previous
Terminology