API Reference: Tenant
Endpoint Tenant
Get Tenant
Recupera i dettagli di uno specifico tenant.
Endpoint: GET /tenant/{tenantId}
Parametri:
| Nome | Tipo | Posizione | Obbligatorio | Descrizione |
|---|---|---|---|---|
| tenantId | string | path | Sì | Identificatore univoco del tenant |
Risposta:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"displayName": "My Company",
"createdAt": "2024-01-15T10:30:00Z",
"plan": "professional"
}
Aggiorna Tenant
Aggiorna le impostazioni del tenant, come il nome visualizzato.
Endpoint: PUT /tenant/{tenantId}
Parametri:
| Nome | Tipo | Posizione | Obbligatorio | Descrizione |
|---|---|---|---|---|
| tenantId | string | path | Sì | Identificatore univoco del tenant |
Request Body:
{
"displayName": "New Company Name"
}
Risposta: Restituisce l’oggetto tenant aggiornato.
Statistiche Tenant
Recupera le statistiche di utilizzo di un tenant.
Endpoint: GET /tenant/{tenantId}/statistics
Parametri:
| Nome | Tipo | Posizione | Obbligatorio | Descrizione |
|---|---|---|---|---|
| tenantId | string | path | Sì | Identificatore univoco del tenant |
Risposta:
{
"processCount": 15,
"datasetCount": 8,
"userCount": 5,
"storageUsedBytes": 1073741824
}
Endpoint Utenti Tenant
Lista Utenti Tenant
Recupera tutti gli utenti che hanno accesso a un tenant.
Endpoint: GET /tenant/{tenantId}/users
Parametri:
| Nome | Tipo | Posizione | Obbligatorio | Descrizione |
|---|---|---|---|---|
| tenantId | string | path | Sì | Identificatore univoco del tenant |
Risposta:
[
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"createdAt": "2024-01-15T10:30:00Z",
"lastLoginAt": "2024-03-01T14:00:00Z",
"tenantId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isActiveInTenant": true,
"isAdminInTenant": false,
"isDeveloperInTenant": false,
"organizationId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"isActiveInOrganization": true,
"isAdminInOrganization": false
}
]
Aggiungi Utente al Tenant
Aggiungi un nuovo utente a un tenant. L’utente viene creato se non esiste già, oppure aggiunto al tenant se possiede già un account. L’ID dell’utente viene restituito nella risposta.
Endpoint: POST /tenant/{tenantId}/users
Parametri:
| Nome | Tipo | Posizione | Obbligatorio | Descrizione |
|---|---|---|---|---|
| tenantId | string | path | Sì | Identificatore univoco del tenant |
Request Body:
{
"email": "newuser@example.com",
"firstName": "John",
"lastName": "Doe",
"isAdminInTenant": false,
"isActiveInTenant": true,
"isDeveloperInTenant": false
}
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
| string | Sì | Indirizzo email dell’utente | |
| firstName | string | No | Nome dell’utente |
| lastName | string | No | Cognome dell’utente |
| isAdminInTenant | boolean | No | Se l’utente ha permessi admin nel tenant |
| isActiveInTenant | boolean | No | Se l’utente è attivo nel tenant |
| isDeveloperInTenant | boolean | No | Se l’utente ha accesso developer nel tenant |
Risposta:
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"message": "Utente aggiunto al tenant."
}
Aggiorna Utente Tenant
Aggiorna i permessi di un utente all’interno di un tenant.
Endpoint: PUT /tenant/{tenantId}/users
Request Body:
{
"userId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"tenantId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isAdminInTenant": true,
"isActiveInTenant": true,
"isDeveloperInTenant": false
}
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
| userId | string | Sì | Identificatore univoco dell’utente |
| tenantId | string | Sì | Identificatore univoco del tenant |
| isAdminInTenant | boolean | No | L’utente ha permessi admin |
| isActiveInTenant | boolean | No | L’utente è attivo nel tenant |
| isDeveloperInTenant | boolean | No | L’utente ha accesso developer |
Risposta:
{
"message": "Impostazioni utente del tenant aggiornate."
}
Rimuovi Utente dal Tenant
Rimuove l’accesso di un utente a un tenant.
Endpoint: DELETE /tenant/{tenantId}/users
Request Body:
{
"userId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"tenantId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
| userId | string | Sì | Identificatore univoco dell’utente da rimuovere |
| tenantId | string | Sì | Identificatore univoco del tenant |
Risposta:
{
"message": "Utente rimosso dal tenant."
}