Skip to content

docs(grafana): add gpuWorkloadHistory deep-link endpoint (#824)#103

Open
SekiXu wants to merge 1 commit into
developfrom
feat/824-gpu-workload-history-backend
Open

docs(grafana): add gpuWorkloadHistory deep-link endpoint (#824)#103
SekiXu wants to merge 1 commit into
developfrom
feat/824-gpu-workload-history-backend

Conversation

@SekiXu

@SekiXu SekiXu commented Jun 29, 2026

Copy link
Copy Markdown

What type of PR is this?

Docs — OpenAPI spec (document a new endpoint).

Which issue(s) this PR fixes?

Backend track of bigstack-oss/cubecos#824 and bigstack-oss/cubecos#825. Documents the endpoint implemented in cube-cos-api (companion PR on branch feat/824-gpu-workload-history-backend).

What this PR does?

Adds the OpenAPI definition for GET /api/v1/datacenters/{dataCenter}/grafana/gpuWorkloadHistory/{hostname}, which returns the Device dashboard (UID i-device) deep-links for a physical node's GPU Utilization (panel 50) and VRAM (panel 51).

  • New path /api/v1/datacenters/{dataCenter}/grafana/gpuWorkloadHistory/{hostname} (tag Grafana, operationId getGrafanaGpuWorkloadHistory), mirroring the existing /grafana/hosts/{hostname} entry.
  • New response schema GetGpuWorkloadHistoryLinksResponse with data: { gpuUtilizationUrl, vramUrl, enabled }.

Example 200 response:

{
  "code": 200,
  "data": {
    "gpuUtilizationUrl": "http://example-data-center/grafana/d/i-device/device?orgId=1&var-GPU_HOST=example-node-0&from=now-3h&to=now&viewPanel=50",
    "vramUrl": "http://example-data-center/grafana/d/i-device/device?orgId=1&var-GPU_HOST=example-node-0&from=now-3h&to=now&viewPanel=51",
    "enabled": true
  },
  "msg": "fetch gpu workload history links successfully",
  "status": "ok"
}

Test results (optional)

  • yq -o=json -I=4 docs.yaml converts cleanly (validated in the cube-cos-api build container); task generateApiDocs regenerates docs.json with the new endpoint present.
  • Endpoint smoke-verified against the live API on test node sky150 (companion cube-cos-api PR): valid node → both URLs + enabled:true; non-existent hostname → enabled:false.

🤖 Generated with Claude Code

Document GET /api/v1/datacenters/{dataCenter}/grafana/gpuWorkloadHistory/{hostname}
returning the device dashboard (UID i-device) deep-links for GPU
Utilization (panel 50) and VRAM (panel 51), filtered by var-GPU_HOST.
Adds the GetGpuWorkloadHistoryLinksResponse schema.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@SekiXu SekiXu requested review from a team as code owners June 29, 2026 09:53
@SekiXu SekiXu self-assigned this Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant