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 /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": "6172bb3d-e843-46bb-93a3-334505974ad9",
		"accountName" : "Example Account 1",
		"enabled" : true,
		"dateCreated" : "2021-03-02T15:15:46.538411",
		"customers": [{
			"tenantId": "a3c6c788-3bc4-4942-e17f-08d8c461185e",
			"tenantName": "Example Customer 1",
			"enabled" : true,
			"dateCreated" : "2021-03-04T16:15:46.686411",
			"roles": {
				"customer.user.acd": 19,
				"customer.user.crm": 12,
				"customer.user.pbx": 25,
				"customer.user.supervisorl1": 1,
				"customer.user.supervisorl2": 14,
				"customer.user.uc": 17,
				"customer.user.uc.essential": 5,
				"customer.user.uc.remote": 22
			}
		}, {
			"tenantId": "d5985c89-73ad-4956-1f51-08d8c20cd51c",
			"tenantName": "Example Customer 2",
			"enabled" : true,
			"dateCreated" : "2021-03-05T17:21:36.533411",
			"roles": {
				"customer.user.pbx": 2,
				"customer.user.supervisorl1": 1,
				"customer.user.uc.remote": 1
			}
		}]
	},
	"status": "success",
	"timestamp": "2019-01-01T10:00:00.2890319Z"
}

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"
}