Grouping by VM_ID fails in GraphQL
therobotcarlson
PROOP
20 hours ago
Trying to run a cost analysis of Sandboxes and finding that I get this error when trying to use groupBy for VM_ID:
{
"errors": [
{
"message": "Problem processing request",
"traceId": "6483433362090148044"
}
],
"data": null
}
Here's the full request:
query SandboxUsageInvestigation(
$projectId: String!
$startDate: DateTime!
$endDate: DateTime!
$measurements: [MetricMeasurement!]!
$groupBy: [MetricTag!]
) {
usage(
projectId: $projectId
startDate: $startDate
endDate: $endDate
measurements: $measurements
groupBy: $groupBy
includeDeleted: true
) {
measurement
value
tags {
projectId
serviceId
environmentId
deploymentId
}
}
}
{
"projectId": "<my project id>",
"startDate": "2026-11-04T21:00:00Z",
"endDate": "2026-11-04T22:00:00Z",
"measurements": [
"MEMORY_USAGE_GB"
],
"groupBy": [
"VM_ID"
]
}
Could not link sandboxes for some reason, so I linked a different service.
1 Replies
Status changed to Awaiting Railway Response Railway • about 20 hours ago
an hour ago
There isn’t currently a way to pull historical usage or cost broken down by individual Sandbox through the public API. Grouping the usage query by VM_ID won’t provide that breakdown. I’m sorry it returns a generic error instead of explaining this clearly.
Status changed to Awaiting User Response Railway • about 1 hour ago