Skip to content

License Usage

Reference for the license_usage endpoints of the Surfmeter API.

Surfmeter API – License Usage v1

The Surfmeter API lets you manage clients, users, capabilities, measurements, and organization-wide settings programmatically.


Servers

Description URL
https://surfmeter-server.{host}/client_admin_api/v1 https://surfmeter-server.{host}/client_admin_api/v1

License Usage


GET /license_usage

Input parameters

Parameter In Type Default Nullable Description
ApiKeyAuth header string N/A No API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.
end_time query string No ISO-8601 timestamp restricting the report to measurements on or before this point in time. Parsed with Ruby's Time.parse so most common formats are accepted.
extended query boolean No When true, returns the extended monthly breakdown including license units and per-subject distribution. When false or omitted, returns the simple monthly unique-client count.
start_time query string No ISO-8601 timestamp restricting the report to measurements on or after this point in time. Parsed with Ruby's Time.parse so most common formats are accepted.

Response 200 OK

{
    "monthly_usage": [
        {
            "month": "string",
            "license_units": 0,
            "unique_clients": 0,
            "breakdown_by_subject_count": {}
        }
    ],
    "total_units": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "description": "Response for extended license usage index action with license units",
    "type": "object",
    "required": [
        "monthly_usage",
        "total_units"
    ],
    "properties": {
        "monthly_usage": {
            "type": "array",
            "items": {
                "type": "object",
                "required": [
                    "month",
                    "license_units",
                    "unique_clients",
                    "breakdown_by_subject_count"
                ],
                "properties": {
                    "month": {
                        "type": "string",
                        "description": "Month in YYYY-MM format"
                    },
                    "license_units": {
                        "type": "integer",
                        "description": "Total license units consumed in this month"
                    },
                    "unique_clients": {
                        "type": "integer",
                        "description": "Number of unique clients in this month"
                    },
                    "breakdown_by_subject_count": {
                        "type": "object",
                        "description": "Breakdown by number of subjects measured per client",
                        "additionalProperties": {
                            "type": "object",
                            "required": [
                                "clients",
                                "units"
                            ],
                            "properties": {
                                "clients": {
                                    "type": "integer",
                                    "description": "Number of clients with this subject count"
                                },
                                "units": {
                                    "type": "integer",
                                    "description": "License units consumed by clients with this subject count"
                                }
                            }
                        }
                    }
                }
            }
        },
        "total_units": {
            "type": "integer",
            "description": "Total license units across all months"
        }
    }
}

Schemas

LicenseUsageExtendedIndexResponse

Name Type
monthly_usage Array<Properties: month, license_units, unique_clients, breakdown_by_subject_count>
total_units integer

Security schemes

Name Type Scheme Description
ApiKeyAuth apiKey API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.