API ReferenceMetrics
Sample and persist sandbox resource metrics
Not a read despite the shape: the sample is recorded as a usage event and, for auto-scaling profiles, the resize recommendation is persisted against the sandbox.
Authorization
bearerAuth AuthorizationBearer <token>
A RemoteHost API key (rh_sk_...) or a user session token.
In: header
Path Parameters
sandboxId*string
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/sandboxes/string/metrics/sample"{ "allocation": { "vcpu": 0, "memoryGb": 0, "diskGb": 0 }, "autoscaleAction": "none", "autoscaleReason": "string", "pendingAllocation": { "vcpu": 0, "memoryGb": 0, "diskGb": 0 }, "pressure": { "cpu": 0, "memory": 0, "disk": 0 }, "recommendation": { "vcpu": 0, "memoryGb": 0, "diskGb": 0 }, "sample": { "cpuPercent": 0, "memoryTotalGb": 0, "memoryUsedGb": 0, "diskTotalGb": 0, "diskUsedGb": 0, "diskUsedBytes": 0, "diskAvailableBytes": 0, "swapTotalGb": 0, "swapUsedGb": 0, "memoryPressure": { "someAvg10": 0, "someAvg60": 0, "fullAvg10": 0, "fullAvg60": 0 }, "cpuPressure": { "someAvg10": 0, "someAvg60": 0 } }, "memoryWarning": { "level": "none", "reason": "string", "suggestedShape": { "vcpu": 0, "memoryGb": 0, "diskGb": 0 } }, "sampledAt": "string"}