Page tree

Returns detailed tenant info.

Endpoint

https://<Director_IP_address>:4443/c/router

Request Example

curl
curl --request POST \
	--url https://<Director_IP_address>:4443/c/router \
	--header "content-type: application/json" \
	--cookie @cookies.txt \
	--data "{
			"action": "MultitenancyManagement",
			"method": "getTenants",
			"data": [{
					"filter":{
							"start": 0,
							"count": 1000,
							"criteria": [{
										"name": "ID",
										"type": "EQ",
										"value": "1"}]}
			}],
			"type": "rpc",
			"tid":1}"

Request Fields

Field
Type
Value(s)
Description
actionstring
 MultitenancyManagement
The action that is invoked
methodstring
 getTenants
The method that is invoked
dataarray
Filter parameters. See the filter table below
typestringrpcType of communication protocol
tidint
1
Transaction ID. Used to identify the request by both the client and the server

filter

Field
Type
Description

start

intA start ID of the tenant to be returned

count

intNumber of tenants to be returned

sort

string

Tenant parameter to be sorted with

sortAsc

boolean

true if the order is ascending

criteria

JsonFilter criteria. See the table below

criteria

Field

Type

Description

name

stringName of criterion. ID means the tenant ID

type

stringType of the criterion. Possible values: AND, OR, EQ (equal), NEQ (not equal), LIKE (case sensitive), IN, BETWEEN, NOT_NULL, ILIKE, GT, GTE, LT, LTE

value

stringValue of a criterion. 1 : tenant ID=1
valueslist <string>Attribute values. Used for the IN, BETWEEN values of the type field

Response Sample

{
	"action": "MultitenancyManagement",
	"method": "getTenants",
	"tid": "1",
	"type": "rpc",
	"message": null,
	"where": null,
	"cause": null,
	"data":
		{"children":
				[{"id": 1,
				"name": "test name",
				"uuid": "3a16f608-2a2a-4fe7-94b5-91068725bced",
				"allocated": 3,
				"allocatedDesired": 3,
				"allocatedEc2Instances": 0,
				"allocatedEc2InstancesDesired": 0,
                "allocatedPhysicalServersDesired": 0,
				"labels": [],
				"email": "email@email.com",
				"phone": "12345",
				"website": "www.nakivo.com",
				"address": "Some address",
				"logo": null,
				"showName": true,
				"enabled": true,
				"state": "OK",
				"status": "NONE",
				"changeStatus": "NONE",
				"alarmState": "OK",
				"lockedShared": false,
				"lockedExclusive": false,
				"wasEdited": false,
				"wasDiscoveredOnce": true,
				"progress": 0,
				"alarmCounters": [0,0,0,0],
				"usedVms": 0,
				"usedSockets": 0,
				"usedEc2Instances": 0,
                "usedPhysicalServers ": 0,
				"alertErrorCode": null,
				"alertTitle": null,
				"alertDescription": null}],
		"total":1}}
}

Response Fields

Field
Value
Description
messagestringMessage if the request failed
wherestringReference to the method where the problem occurred
causestringCause of failure
data
arrayTenant items. See the children table below

children

Field
Value
Description

id

longID of the tenant

name

stringName of the tenant

uuid

stringUUid of the corresponding session

allocated

intSockets allocated for the tenant

allocatedDesired

intNumber of sockets to be allocated to the tenant at some point. It is saved in the database but not yet applied to the physical tenant

allocatedEc2Instances

intNumber of EC2 instances allocated for the tenant

allocatedEc2InstancesDesired

intNumber of EC2 instances to be allocated to the tenant at some point. It is saved in the database but not yet applied to the physical tenant

allocatedPhysicalServers

int

Number of allocated physical servers

allocatedPhysicalServersDesired

int

Number of physical machines to be allocated to the tenant at some point. It is saved in the database but not yet applied to the physical tenant

labels

arrayTenant's labels

email

string

Contact Email of the tenant

phone

string

Contact phone number of the tenant

website

string

URL of the tenant website

address

string

Contact address of the tenant

logo

string

A path to the tenant logo image

showName

boolean

If true, it will display the name of the tenant

enabled

boolean

If true, the tenant will be enabled

state

string

A state of the tenant.  Possible values: OK, WARNING, INACCESSIBLE, ERROR

status

string

Status of the tenant. Possible values: NONE, UPDATING

changeStatus

string

Defines the pending change in the tenant’s state.  Possible values: NONE, CREATE_PENDING, CHANGE_PENDING

alarmState

string

State of the tenant’s alarms. Possible values: OK, WARNING, ERROR

lockedShared

boolean

true if a shared lock is set for the tenant. false otherwise

lockedExclusive

boolean

true if an exclusive lock is set for the tenant. false otherwise

wasEdited

boolean

Indicates whether the tenant was edited

wasDiscoveredOnce

boolean

Indicates whether the tenant’s state was discovered once

progress

int

A value from 0 to 100. For a newly created tenant, the value is set to 0

alarmCounters

array

Number of alarms in the tenant

usedVms

int

Number of VMs used by the tenant

usedSockets

int

Number of sockets used by the tenant

usedEc2Instances

int

Number of EC2 instances used by the tenant

usedPhysicalServers

int

Number of physical machines used by the tenant

alertErrorCode

string

An error code of the alert

alertTitle

string

A title of the alert

alertDescription

string

A description of the alert

total

int

Number of tenant items

  • No labels