Skip to main content

Platform Management

Background

The Platform Management API is designed for Account (Tenant)-level administration and management tasks of Poly Lens Accounts (Tenants). It provides insight into Account configurations, Account-level details, and deployment structure.

Common use cases include retrieving the following information:

  • Account (Tenant) name
  • Number of Account (Tenant) members
  • Total device count
  • Room and site data
Reminder

The API Playground is scoped to your authenticated user's Poly Lens access.

Most Poly Lens API queries require a tenantId parameter to scope the response.You can retrieve the tenantId for accessible tenants using the tenants query. It returns all tenants your user has Account Member permissions for (e.g., management or admin permissions).

The following query returns the following:

  • id: The unique identifier of the Account (Tenant)
  • name: The Account (Tenant) display name
  • memberCount: Number of users with Poly Lens cloud access
  • deviceCount: Number of devices assigned
  • total: Number of rooms configured
Note

memberCount reflects users with administrative access to the Poly Lens cloud. Users with access limited to Poly Lens Apps are not included in this count.

Query Account (Tenant) Information Using tenants

Test this query in the GraphQL Playground

query tenantInfo {
tenants {
id
name
memberCount
deviceCount
roomData {
total
}
}
}

Sample Response

{
"data": {
"tenants": [
{
"id": "695xxxxx-bxxx-4xxx-axxx-109xxxxxxxxx",
"name": "DFossDemo",
"memberCount": 5,
"deviceCount": 295,
"roomData": {
"total": 149
}
}
]
}
}

Now that we have the Account (Tenant) id, we can run a query to return details for users associated with a single Account (Tenant).

In Poly Lens, roles are used to define user permissions within an Account (Tenant). Users with Account Management access will have one of the following roles:

  • admin
  • it-admin
  • user
Note

These roles are listed as: Admin, Device Manager, and Guest in the Poly Lens cloud.

Users with access to Poly Lens Apps are assigned a device_user role. A user can have both Account Member (management access) and Device User (Poly Lens App User) roles assigned.

When you're passing these roles into the Poly Lens API, you need to use one of the following:

  • admin (Admin)
  • it-admin (Device Manager)
  • user (Guest)
  • device_user (Poly Lens App Users).

In this query, we need to pass two arguments into UserSearchParams grants:

  1. roles: One of the roles listed above
  2. resourceId: The tenant id

We'll target Account (Tenant) Admins in this users query example.

Query Account (Tenant) Admins Using users

Test this query in the GraphQL Playground

query tenantAdmins($params: UserSearchParams!) {
users(params: $params) {
count
edges {
node {
user_id
email
email_verified
last_ip
logins_count
last_login
}
}
}
}

Variables

{
"params": {
"grants": [
{
"roles": "admin",
"resourceId": "695xxxxx-bxxx-4xxx-axxx-109xxxxxxxxx"
}
]
}
}

Sample Output

{
"data": {
"users": {
"count": 6, //total number of users with admin role
"edges": [
{
"node": {
"user_id": "apple|00xxxx.1xxxxxxxxxxxxxxxxx6.xxx1", //indicates SSO Auth Provider used
"email": "daniel.f.reed@hp.com",
"email_verified": true,
"last_ip": "8x.1xx.1xx.1xx",
"logins_count": 21383,
"last_login": "Fri Apr 18 2025 15:21:45 GMT+0000 (Coordinated Universal Time)"
},
{
"node": {
"user_id": "google-oauth2|11xxxxxxxxxxxxxxxxx26", //indicates SSO Auth Provider used
"email": "drdev@gmail.com",
"email_verified": true,
"last_ip": "7x.2xx.1xx.1xx",
"logins_count": 11,
"last_login": "Thu Feb 20 2025 19:16:41 GMT+0000 (Coordinated Universal Time)"
}
}
}
}
]
}
}
}

If you have questions about usage, authentication, or integration with the Poly Lens APIs, contact us.