Replace server metric access grants
PUT
Replaces the VPS's metrics access list. Send empty arrays to remove all explicit grants.
Access: User session: workspace admin or owner. API keys aren't supported.
- Both arrays are required, with at most 100 unique grants in total.
- Members and active keys must belong to this workspace. Keys need
vm:read; invalid targets return404and leave the old list unchanged. - Owner/admin session access is retained. Revocations apply to the next request, including cached readings.
header
AuthorizationBearer <token>Send Authorization: Bearer <token>. A token is an API key (lb_live_…, scoped, for programs) or a session (lb_sess_…, from signup or login, for people). See Authentication above.
id*stringThe resource id.
X-Org-ID?stringSessions only: act on this organization (you must be a member). Default: your first organization.
application/json- body
user_ids*array<>Items
items <= 100api_key_ids*array<>Items
items <= 100The committed replacement grants
application/json- response
vm_id*stringuser_ids*array<string>Items
items <= 100api_key_ids*array<string>Items
items <= 100curl -X PUT 'https://layerbeat.com/v1/vms/string/metrics/access' \ -H 'Content-Type: application/json' \ -d '{ "user_ids": [ "usr_abc123" ], "api_key_ids": [ "key_abc123" ]}'{ "vm_id": "vm_abc123", "user_ids": [ "usr_abc123" ], "api_key_ids": [ "key_abc123" ]}