> **Source:** https://knowledge.leegality.com/sign-station/api/get-license-usage-stats > **Site:** Leegality Knowledge Base — https://knowledge.leegality.com > **About:** Leegality is a document execution platform covering eSigning, stamps, NeSL, workflows, and REST API integration. > **Navigation:** Every article on this site has a plain-text version at `.txt` (this format). To get an index of all articles with their `.txt` links, read: https://knowledge.leegality.com/llms.txt > **AI Guide:** For instructions on how to navigate this knowledge base as an AI agent, read: https://knowledge.leegality.com/ai-readable.txt --- # GET /api/v1/licenses/{licenseId}/usage-statistics — Get license usage statistics Get current usage statistics for all resources in the active license. Given a license ID, this API returns the current usage counts for various resources such as users, departments, certificates, and documents signed under that license. **Authentication:** `X-Auth-Token` header required on every request. ## Request URL ``` GET https://app1.leegality.com/api/api/v1/licenses/{licenseId}/usage-statistics ``` **Environments:** - Production: `https://app1.leegality.com/api/api/v1/licenses/{licenseId}/usage-statistics` - Sandbox: `https://sandbox.leegality.com/api/api/v1/licenses/{licenseId}/usage-statistics` --- ## Parameters | Name | In | Required | Type | Description | Example | |------|----|----------|------|-------------|---------| | `licenseId` | path | Yes | string | License ID for license lookup | — | --- ## Responses ### 200 — OK | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `code` | string | No | Response code indicating success or failure of the license usage stats request. | `LE_SS_200` | | `message` | string | No | A message providing additional information about the license usage stats request. | `License usage statistics retrieved successfully.` | | `data` | LicenseUsageStatsVO | No | See **LicenseUsageStatsVO** below. | — | #### LicenseUsageStatsVO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `users` | ResourceUsageUsersVO | No | See **ResourceUsageUsersVO** below. | — | | `departments` | ResourceUsageDepartmentsVO | No | See **ResourceUsageDepartmentsVO** below. | — | | `signatures` | ResourceUsageSignaturesVO | No | See **ResourceUsageSignaturesVO** below. | — | | `certificates` | ResourceCertificatesUsageVO | No | See **ResourceCertificatesUsageVO** below. | — | ##### ResourceUsageUsersVO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `current` | integer | No | Current number of active users | `233` | | `limit` | integer | No | Maximum number of users allowed by license | `1000` | ##### ResourceUsageDepartmentsVO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `current` | integer | No | Current number of departments using this license | `23` | | `limit` | integer | No | Maximum number of departments allowed | `1000` | ##### ResourceUsageSignaturesVO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `current` | integer | No | Current number of signatures used under this license. | `23` | | `limit` | integer | No | Maximum number of signatures allowed | `1000` | ##### ResourceCertificatesUsageVO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `current` | integer | No | Current number of certificates | `23` | | `limit` | integer | No | Maximum number of certificates allowed | `1000` | ### 400 — License validation failed | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `code` | string | No | Top-level error code | `LE_ERR_SS_400` | | `errors` | array\ | No | List of error details See **ErrorDetailLicenseUsageStats400VO** below. | — | #### ErrorDetailLicenseUsageStats400VO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `message` | string | No | Detailed error message | `License validation failed for the request.` | | `path` | string | No | API path that generated the error | `/api/v1/licenses/bd82845c-897b-4022-b5f7-679905c1979b/usage-` | | `code` | string | No | Specific error code | `LE_ERR_SS_008` | ### 401 — Unauthorized - Invalid or expired token | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `code` | string | No | Top-level error code | `LE_ERR_SS_401` | | `errors` | array\ | No | List of error details See **ErrorDetailLicenseUsageStats401VO** below. | — | #### ErrorDetailLicenseUsageStats401VO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `message` | string | No | Detailed error message | `Invalid or expired token` | | `path` | string | No | API path that generated the error | `/api/v1/licenses/123456765RESAXCVBN54323456/usage-statistics` | | `code` | string | No | Specific error code | `LE_ERR_SS_303` | ### 403 — Forbidden - Access denied | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `code` | string | No | Top-level error code | `LE_ERR_SS_403` | | `errors` | array\ | No | List of error details See **ErrorDetailLicenseUsageStats403VO** below. | — | #### ErrorDetailLicenseUsageStats403VO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `message` | string | No | Detailed error message | `Access denied for the requested operation.` | | `path` | string | No | API path that generated the error | `/api/v1/licenses/{licenseId}/usage-statistics` | | `code` | string | No | Specific error code | `LE_ERR_SS_007` | ### 500 — Internal server error | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `code` | string | No | Top-level error code | `LE_ERR_SS_500` | | `errors` | array\ | No | List of error details See **ErrorDetailToken500VO** below. | — | #### ErrorDetailToken500VO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `message` | string | No | Detailed error message | `Internal Server Error` | | `path` | string | No | API path that generated the error | `null` | | `code` | string | No | Specific error code | `null` | ### Sample Response (200) ```json { "code": "LE_SS_200", "message": "License usage statistics retrieved successfully.", "data": { "users": { "current": 233, "limit": 1000 }, "departments": { "current": 23, "limit": 1000 }, "signatures": { "current": 23, "limit": 1000 }, "certificates": { "current": 23, "limit": 1000 } } } ```