Page tree

Returns detailed tenants list.

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": 2,
							"criteria": []}}],
			"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

typestring
rpc

Type of communication protocol

tidint
1

Transaction ID. Used to identify the request by both the client and the server

filter

Field
Type
Description
startintA start ID of the tenant to be returned
countintNumber of tenants to be returned

sort

string

Tenant parameter to be sorted with

sortAsc

boolean

true if the order is ascending

criteriaJsonFilter criteria. See the table below

criteria

Field

Type

Description

name

string

Name of criterion. ID means the tenant ID

type

string

Type 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

string

Value of a criterion. 1 : tenant ID=1

values

list <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": 2,
				"name": "Customer 1",
				"uuid": "aaa6da10-97ea-43ac-80f8-6ddd22faeb93",
				"allocated": 4,
				"allocatedDesired": 4,
				"allocatedEc2Instances": 0,
				"allocatedEc2InstancesDesired": 0,
                "allocatedPhysicalServersDesired": 0"
				"labels": [
					{ "id": 2,
					"name": "asdad",
					"position": null } ],
				"email": "",
				"phone": "",
				"website": "",
				"address": "",
				"logo": "/c/tenants/aaa6da10-97ea-43ac-80f8-6ddd22faeb93/tenant-data/d2071b7b-2bc1-4da5-864d-d4f153323e51.png",
				"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,
				"alertErrorCode": null,
				"alertTitle": null,
				"alertDescription": null },
			{ "id": 3,
				"name": "Customer 2",
				"uuid": "e956fc69-b978-41d6-97d4-6e8577600434",
				"allocated": 5,
				"allocatedDesired": 5,
				"allocatedEc2Instances": 0,
				"allocatedEc2InstancesDesired": 0,
				"labels": [],
				"email": "",
				"phone": "",
				"website": "",
				"address": "",
				"logo": "/c/tenants/e956fc69-b978-41d6-97d4-6e8577600434/tenant-data/c5f2898a-6cab-4bfb-a107-192c461f7128.png",
				"showName": true,
				"enabled": false,
				"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": 10 } 
}

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. If allocatedDesired = actual, then either number of sockets is allocated for the tenant or it has not changed

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. If allocatedEc2InstancesDesired = actual, then either number of EC2 instances is allocated for the tenant or it has not changed

allocatedPhysicalServers

int

Number of physical servers allocated for the tenant

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 labels

email

stringContact Email of the tenant

phone

stringContact phone number of the tenant

website

stringURL of the tenant website

address

stringContact address of the tenant

logo

stringA path to the tenant logo image

showName

booleanIf true, it will display the name of the tenant

enabled

booleanIf true, the tenant will be enabled

state

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

status

stringStatus of the tenant. Possible values: NONE, UPDATING

changeStatus

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

alarmState

stringState of the tenant alarms. Possible values: OK, WARNING, ERROR

lockedShared

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

lockedExclusive

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

wasEdited

booleanIndicates whether the tenant was edited

wasDiscoveredOnce

booleanIndicates whether the tenant state was discovered once

progress

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

alarmCounters

arrayNumber of alarms in the tenant

usedVms

intNumber of VMs used by the tenant

usedSockets

intNumber of sockets used by the tenant

usedEc2Instances

intNumber of EC2 instances used by the tenant

usedPhysicalServers

int

Number of physical machines used by the tenant

alertErrorCode

stringError code of the alert

alertTitle

stringTitle of the alert

alertDescription

stringDescription of the alert

total

intNumber of tenant items
  • No labels