Need help to undertand Wazo Rest API

Hi All,

I am learning Wazo Platform. Already installed Wazo Platform with WebUI on VirtualBox running Debian 11. My host is Ubuntu 24.04.1 LTS.

I have configured the Wazo Platform through WebUI. Currently able to do voice and video call between two soft phone, also voice and video call from Fanvil doorbell to soft phone.

So far so good. With this progress, I am started to exploring Wazo Platform Rest API. Using API console and curl, I tried some of the API messages. However there are few things that I need help to get around my head. I want to understand the platform better.

I wish experience users could help me with below questions. Hope you don’t mind with the long questions:

  1. Comparing user creation between these two endpoints: POST /users/register and POST /users,
    a. What is the purpose (or the difference) between the the two endpoints?
    b. Does POST /users/register endpoint is actually used for creating tenant?

    I created a user using both endpoints, here’s the observation:

   After created user with endpoint /users:
   * Able to retrieved the created user on get user list (endpoint: /users)
   * Able to generate token with the created user
   
   After created user with endpoint /users/register:
   * Created user doesn't appear on get user list (endpoint: /users)
   * Created user appear on get tenant list (endpoint: /tenants)
   * Created user appear on web-ui/Global Settings/tenants
   * Able to generate token with the created user
  1. What is domain names in tenant creation (endpoint: POST /tenants)? The API described: A list containing human readeable unique domain names, associated with a specific tenant.
    a. If domain name is ip address/network domain name, why a tenant may have multiple domain names?
    b. If not, please elaborate what is the domain name on this endpoint body?

  2. What’s the proper practice to create new tenant: new tenant has ‘master’ uuid as parent or new tenant has its own uuid as parent?
    a. Please elaborate why the chosen practice is better, e.g: pro and cons between the two practice
    b. In what scenario we want new tenant has ‘master’ as parent?
    c. In what scenario we want new tenant use its own uuid as parent?

  3. I noticed Wazo Platform support many devices (with plugin). I have Fanvil i66 doorbell which is not listed on the supported device. I tested to created user and line for the doorbell without adding the doorbell to the devices list. I made a call to soft phone and it worked flawlessly. Working for both voice call and video call.
    a. Any specific purpose of adding the doorbell to device list?
    b. Is it acceptable practice to register the doorbell as user instead of device? any contra if I do this?

  1. /users/register is meant to be used as a standalone user creation process. Where a user could use a website to create a user for himself. /users is used by an administrator creating accounts for users they know. The /users/register will also create a new tenant for that user since it’s probably going to be the administrator of a new tenant on your system. Also note that these are authentication users, this does not create a “telephony” user. Creating a user using the /confd/1.1/users API will result in the creation of an authentication user AND a telephony user simultaneously.
  2. The domain names are used to generate URL or match incoming requests based on the domain name. A business in Canada could own wazo.io and wazo.ca.
  3. Only one tenant should be the master tenant. It’s a system tenant for inter-service communication. You should create your own tenant below the master tenant (tenants are organized in a tree structure)
  4. Creating a plugin would allow you to use the autoprovisioning feature instead of configuring the doorbell manually. This can be useful if you have many devices of that type to configure. You can either create a user for the doorbell or add a second line to a “real” user and make that second line the doorbell. I think using a dedicated user makes sense in most cases

Thanks pcm! Appreciated your time to answer my questions. It’s quite clear now. Will mark this thread as solved