Reseller Metrics

Reseller Metrics #

Returns license usage metrics for each customer from a Reseller Account. For details on the customer metrics that can be returned, refer to the Customers section.

Request #

GET /v1.0/accounts/{ACCOUNT_TENANT_ID}/metrics

Example #

This request will return the license usage metrics for the specified reseller.

Request #

GET https://api.na.myreports.cloud/api/v1.0/accounts/{ACCOUNT_TENANT_ID}/metrics HTTP/1.1
Authorization: Bearer {TOKEN}

Response #

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: xx
{
	"data": {
		"accountTenantId": "00000000-0000-0000-0000-000000000000",
		"accountName" : "Example Account 1",
		"enabled" : true,
		"dateCreated" : "2021-03-02T15:15:46.538411",
		"pbxProfiles": [{
			"id": "TeamsPbxProvisionerProfile_00000000-0000-0000-0000-000000000000",
			"pbxType": "Teams"
		}, {
			"id": "KazooPbxProvisionerProfile_00000000-0000-0000-0000-000000000000",
			"pbxType": "Kazoo",
			"instanceId": "00000000000000000000000000000000"
		}],
		"customers": [{
			"tenantId": "00000000-0000-0000-0000-000000000000",
			"tenantName": "Example Customer 1",
			"enabled" : true,
			"dateCreated" : "2021-03-04T16:15:46.686411",
			"tenantProfileType": "TenantProfileType_analytics",
			"pbxs": [{
				"id": "00000000-0000-0000-0000-000000000000",
				"pbxType": "~.pbx.kazoo.name.~",
				"instanceId": "00000000000000000000000000000000",
				"name": "Dev - Kazoo",
				"enabled": true,
				"monitorSubAccounts": false
			}, {
				"id": "00000000-0000-0000-0000-000000000000",
				"pbxType": "Teams",
				"instanceId": "00000000-0000-0000-0000-000000000000",
				"name": "Teams",
				"enabled": true,
				"monitorSubAccounts": false
			}],
			"roles": {
				"customer.billables.admin": 1,
				"customer.device.admin": 1,
				"customer.device.readonly": 1,
				"customer.directories.manage": 1,
				"customer.settings": 1,
				"customer.user": 1,
				"customer.user.acd": 2,
				"customer.user.crm": 1,
				"customer.user.pbx": 19,
				"customer.user.supervisorl4": 1,
				"customer.user.uc": 1,
				"customer.user.uc.essential": 4,
				"customer.user.uc.microsoftteams": 16,
				"customer.user.uc.softphone": 1,
				"customer.voice.admin": 1,
				"customer.voice.apps": 1,
				"customer.workspace.admin": 1,
				"onboarding.admin": 1,
				"pbx.agentcontrol": 1,
				"pbx.silentmonitor": 1,
				"recording.observer": 1,
				"user.admin": 1,
				"webhooks.admin": 1,
				"cloudClient": 1,
				"communalDeviceHardware": 4
			}
		}, {
			"tenantId": "00000000-0000-0000-0000-000000000000",
			"tenantName": "Example Customer 2",
			"enabled" : true,
			"dateCreated" : "2021-03-05T17:21:36.533411",
			"tenantProfileType": "TenantProfileType_analytics",
			"pbxs": [{
				"id": "00000000-0000-0000-0000-000000000000",
				"pbxType": "~.pbx.kazoo.name.~",
				"instanceId": "00000000000000000000000000000000",
				"name": "Dev - Kazoo",
				"enabled": true,
				"monitorSubAccounts": false
			}],
			"roles": {
				"customer.user.pbx": 2,
				"customer.user.supervisorl1": 1,
				"customer.user.uc.remote": 1
			}
		}]
	},
	"status": "success",
	"timestamp": "2019-01-01T10:00:00.2890319Z"
}
Information Circle info
The role summary counts for each customer will not include any users where the 'isParent' is set to false. This means support engineers that are configured on the customer's account will not be included in the Metrics summary.

Errors #

Unauthorized #

When the token is not provided, invalid or expired

HTTP/1.1 401 Unauthorized

Bad Request (1) #

When the provided tenant id is not in the correct format

HTTP/1.1 400 Bad Request
Date: Thu, 06 Feb 2020 12:45:27 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 149
{
	"error":400,
	"message":"The value '<tenant id>' is not valid.",
	"status":"error",
	"timestamp":"2020-02-06T12:45:27.5903465Z"
}

Not Found #

When there are no Accounts that have a matching tenant id

HTTP/1.1 404 Not Found
Date: Thu, 06 Feb 2020 12:46:58 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 95
{
	"error":404,
	"message":"Not Found",
	"status":"error",
	"timestamp":"2020-02-06T12:46:58.7669535Z"
}