LicensingService.ListLicenseWorkloads
Page through workload usage from one collection frame. Pass expectedSnapshotId from GetLicenseStatus to keep the first page aligned with that report.
LicensingService · Installed Web API. Use the HTTPS origin of your Prokrust installation and credentials authorized for this operation.
POST /prokrust.api.v1alpha1.LicensingService/ListLicenseWorkloads
Request headers
| Header | Value and purpose |
|---|---|
Authorization | Use Bearer $PROKRUST_TOKEN for a Kubernetes caller authorized for this operation. Browser calls use the signed-in session. |
Content-Type | application/json selects ProtoJSON for this unary request. |
Connect-Protocol-Version | 1 selects version 1 of the Connect protocol. |
Request fields
| JSON field | Type | Meaning |
|---|---|---|
scope | LicenseReportScope | Required report scope. Choose NAMESPACE or INSTALLATION explicitly. |
namespace | string | Required for namespace scope. Leave empty for installation scope. |
pageSize | uint32 | Zero defaults to 100; maximum 500. |
pageToken | string | Opaque token bound to scope, namespace, snapshot, ConfigMap resourceVersion and offset. Changed reports reject the page rather than mixing frames. |
expectedSnapshotId | string | Optional first-page binding to a preceding GetLicenseStatus response. A different snapshot rejects with Aborted. |
Example request
Set PROKRUST_URL to the installation’s HTTPS origin and PROKRUST_TOKEN to your caller token. Replace the sample values with values from your installation.
curl --fail-with-body --silent --show-error \
-H "Authorization: Bearer $PROKRUST_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Connect-Protocol-Version: 1' \
"$PROKRUST_URL/prokrust.api.v1alpha1.LicensingService/ListLicenseWorkloads" \
--data-binary @- <<'JSON'
{
"scope": "LICENSE_REPORT_SCOPE_NAMESPACE",
"namespace": "analytics",
"pageSize": 25,
"expectedSnapshotId": "59f75909-275c-54c4-8887-8e6bb6f0a3d9"
}
JSON
Response fields
| JSON field | Type | Meaning |
|---|---|---|
workloads | list of LicenseWorkloadUsage | Workload-level capacity observations included in this report page. |
nextPageToken | string | Opaque continuation for the next page. Stop when it is empty. |
snapshotId | string | Opaque collection-frame identifier. Use it to bind status and workload pages to the same snapshot. |
generatedAtUnixSeconds | uint64 | Report collection time in seconds since the Unix epoch. |
collectionSuccess | bool | Whether the controller completed this collection frame successfully. |
stale | bool | True when the collected data is too old, inconsistent in time, or from a failed collection. |
scope | LicenseReportScope | Scope of the collection frame that supplied this page. |
namespace | string | Workspace for a namespace report. Empty for an installation-wide report. |
Example response
{
"workloads": [
{
"namespace": "analytics",
"kind": "TrainingRun",
"name": "train-values",
"uid": "91c90b29-d618-5dbf-bc4b-391c5aababcd",
"class": "LICENSE_WORKLOAD_CLASS_TRAINING",
"reserved": {
"cpuMillis": "2000"
},
"allocated": {
"cpuMillis": "1000"
},
"runningWorkers": 1
}
],
"scope": "LICENSE_REPORT_SCOPE_NAMESPACE",
"namespace": "analytics",
"snapshotId": "59f75909-275c-54c4-8887-8e6bb6f0a3d9",
"collectionSuccess": true,
"generatedAtUnixSeconds": "1778580000"
}