OrgsUser MACs

countOrgUserMacs

GET
/api/v1/orgs/{org_id}/usermacs/count

Count by Distinct Attributes of User MACs

Authorization

Authorization<token>

Preferred authentication method for automation and integrations. Send the API token in the HTTP Authorization header.

Format: Authorization: Token {apitoken}

Notes:

  • An API token generated for a specific admin has the same privileges as that admin
  • An API token is automatically removed if it is not used for more than 90 days
  • SSO admins cannot generate admin API tokens. Use organization API tokens when scoped Org/Site privileges are needed.

In: header

Path Parameters

org_id*string
Formatuuid

Query Parameters

distinct*string

Attribute to count by. enum: mac, name, labels, org_id

Value in

  • "mac"
  • "name"
  • "labels"
  • "org_id"
limit?integer

Maximum number of results to return per page

Range0 <= value
Default100
start?string

Lower bound of the time range, as an epoch timestamp in seconds or a relative value such as -1d or -1w

end?string

Upper bound of the time range, as an epoch timestamp in seconds or a relative value such as -1d, -2h, or now

Response Body

curl -X GET "https://example.com/api/v1/orgs/000000ab-00ab-00ab-00ab-0000000000ab/usermacs/count?distinct=org_id"
{  "end": 1723651268,  "limit": 10,  "results": [    {      "id": "111cafd2-ba1b-5169-bfcb-9cdf1d473ddb",      "labels": [        "flor1",        "bld4"      ],      "mac": "921b638445cd",      "name": "Printer2",      "notes": "mac address refers to Canon printers",      "radius_group": "VIP",      "site_ids": [        "4ac1dcf4-9d8b-7211-65c4-057819f0862b",        "52f4347e-3e4b-186c-21ca-ad5b70eb23d6"      ],      "vlan": "30"    },    {      "id": "abecafd2-ba1b-5169-bfcb-9cdf1d473123",      "labels": [        "blgd-cupe",        "old"      ],      "mac": "921b638445ce",      "name": "os mac",      "notes": "mac devices",      "radius_group": "rg-1",      "vlan": "vlan-2"    }  ],  "start": 1723651267,  "total": 2}