Accept or change reserved capacity lending
const url = 'https://example.com/apis/nodus.dev/v1/namespaces/example/workspaces/example/sharing';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"action":"example","agreed":true,"generation":1,"policy":{"minimumReady":1,"ownerWindows":[{"days":[1],"end":"example","start":"example"}],"readyBy":"example","timeZone":"example"},"retentionAgreed":true,"retentionDigest":"example","termsDigest":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/apis/nodus.dev/v1/namespaces/example/workspaces/example/sharing \ --header 'Content-Type: application/json' \ --data '{ "action": "example", "agreed": true, "generation": 1, "policy": { "minimumReady": 1, "ownerWindows": [ { "days": [ 1 ], "end": "example", "start": "example" } ], "readyBy": "example", "timeZone": "example" }, "retentionAgreed": true, "retentionDigest": "example", "termsDigest": "example" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The project.
The object’s name.
Query Parameters
Section titled “ Query Parameters ”Header Parameters
Section titled “ Header Parameters ”Request Bodyrequired
Section titled “ Request Bodyrequired ”WorkspaceSharingRequest accepts or revokes permission, or changes availability under existing permission.
object
Action is Accept, Revoke or Policy. Revoke keeps the reservation and its base charge.
Agreed explicitly confirms acceptance of the lending terms.
Generation is the sharing generation reviewed by the caller.
CapacityLendingPolicy controls when idle capacity may be offered under existing consent.
object
MinimumReady is the number of qualified idle units reserved across the same project, pool and hardware.
OwnerWindows reserves recurring owner availability without stopping active owner work.
CapacityOwnerWindow reserves availability for the owner; it never stops active owner work.
object
Days uses ISO weekdays, Monday=1 through Sunday=7, in the policy’s time zone.
End is the local HH:MM time when availability ends; a value at or before Start is on the next day.
Start is the local HH:MM time when owner availability begins.
ReadyBy requests owner availability at one absolute time.
TimeZone is an IANA zone; UTC is used when no windows are configured and this field is empty.
RetentionAgreed separately accepts the continuing base charge when first retaining capacity.
RetentionDigest binds first retention to the reviewed capacity and continuing base charge.
TermsDigest is the reviewed lending-terms digest required for acceptance.
Example generated
{ "action": "example", "agreed": true, "generation": 1, "policy": { "minimumReady": 1, "ownerWindows": [ { "days": [ 1 ], "end": "example", "start": "example" } ], "readyBy": "example", "timeZone": "example" }, "retentionAgreed": true, "retentionDigest": "example", "termsDigest": "example"}Responses
Section titled “ Responses ”OK
WorkspaceSharing describes permission, policy and readiness of retained reserved capacity.
object
Accepting permits compatible borrower placement when the capacity is idle and qualified.
BaseHourlyUSD continues across owner use, idle time, lending and ordinary handoffs.
PoolSharingConsent is the immutable agreement snapshot and its revocation record.
object
AcceptedBy identifies the human who accepted.
AcceptedTime is when acceptance committed.
AllHosts records Pool-wide permission for current and future enrolled hosts.
ID identifies the immutable acceptance.
Nodes lists exact host identities when AllHosts is false; otherwise it is empty.
RevokedTime is when new lending was withdrawn.
PoolSharingTerms is the published agreement accepted independently of private Pool routing.
object
AgreementURL contains the full agreement shown before acceptance.
Compensation is Credits. Earnings are non-cash Nodus credits.
CustomerHourlyUSD is a fixed whole-host rate; empty when Pricing supplies hardware rates.
OwnerShareBasisPoints is the owner’s share of the settled compute charge, excluding taxes and storage.
PoolSharingPricing prices a whole host from the accepted pricebook snapshot.
object
CPUShapes is the accepted website CPU configuration card; larger hosts use the lowest proportional rate.
PoolSharingCPUPrice is one static website CPU and memory configuration.
object
HourlyUSD is the configuration’s static hourly borrower charge.
MemoryMiB is the configuration’s guest memory capacity.
VCPUMillis is the configuration’s CPU capacity in millicores.
GPUs maps canonical accelerator and physical device count to a whole-host hourly rate.
object
object
Version identifies the source pricebook.
ReclaimNoticeSeconds is the maximum checkpoint notice before borrowed work is stopped.
Revision identifies the published agreement.
TermsDigest binds acceptance to these exact terms.
EarnedCreditsUSD is the net settled lending credit attributed to this capacity.
Generation fences changes to the current sharing agreement.
CapacityLendingPolicy controls when idle capacity may be offered under existing consent.
object
MinimumReady is the number of qualified idle units reserved across the same project, pool and hardware.
OwnerWindows reserves recurring owner availability without stopping active owner work.
CapacityOwnerWindow reserves availability for the owner; it never stops active owner work.
object
Days uses ISO weekdays, Monday=1 through Sunday=7, in the policy’s time zone.
End is the local HH:MM time when availability ends; a value at or before Start is on the next day.
Start is the local HH:MM time when owner availability begins.
ReadyBy requests owner availability at one absolute time.
TimeZone is an IANA zone; UTC is used when no windows are configured and this field is empty.
CapacityReadiness describes evidence-backed owner handback progress. Estimates are omitted until enough completed handoffs of compatible capacity exist; they are observations rather than an instant-return promise.
object
Generation identifies the current runtime handoff and increases when its tenant environment changes.
Missed records that owner readiness was not established by RequestedTime.
P50Seconds is the observed median owner-return duration for compatible capacity.
P90Seconds is the observed ninetieth-percentile owner-return duration for compatible capacity.
RequestedTime is the readiness target of the current owner request or availability window.
Stage is the current preparation, lending, reclaim or owner-readiness stage.
ReservationEpoch identifies the reservation term covered by this agreement.
Retained is true only after explicit acceptance of continuous reservation billing.
RetentionDigest binds the original running capacity and the displayed continuing base charge.
PoolSharingTerms is the published agreement accepted independently of private Pool routing.
object
AgreementURL contains the full agreement shown before acceptance.
Compensation is Credits. Earnings are non-cash Nodus credits.
CustomerHourlyUSD is a fixed whole-host rate; empty when Pricing supplies hardware rates.
OwnerShareBasisPoints is the owner’s share of the settled compute charge, excluding taxes and storage.
PoolSharingPricing prices a whole host from the accepted pricebook snapshot.
object
CPUShapes is the accepted website CPU configuration card; larger hosts use the lowest proportional rate.
PoolSharingCPUPrice is one static website CPU and memory configuration.
object
HourlyUSD is the configuration’s static hourly borrower charge.
MemoryMiB is the configuration’s guest memory capacity.
VCPUMillis is the configuration’s CPU capacity in millicores.
GPUs maps canonical accelerator and physical device count to a whole-host hourly rate.
object
object
Version identifies the source pricebook.
ReclaimNoticeSeconds is the maximum checkpoint notice before borrowed work is stopped.
Revision identifies the published agreement.
TermsDigest binds acceptance to the displayed lending terms.
Example generated
{ "accepting": true, "apiVersion": "example", "baseHourlyUSD": "example", "consent": { "acceptedBy": "example", "acceptedTime": "example", "allHosts": true, "id": "example", "nodes": [ "example" ], "revokedTime": "example", "terms": { "agreementURL": "example", "compensation": "example", "customerHourlyUSD": "example", "ownerShareBasisPoints": 1, "pricing": { "cpuShapes": [ { "hourlyUSD": "example", "memoryMiB": 1, "vcpuMillis": 1 } ], "gpus": { "additionalProperty": { "additionalProperty": "example" } }, "version": "example" }, "reclaimNoticeSeconds": 1, "revision": "example" }, "termsDigest": "example" }, "earnedCreditsUSD": "example", "generation": 1, "kind": "example", "policy": { "minimumReady": 1, "ownerWindows": [ { "days": [ 1 ], "end": "example", "start": "example" } ], "readyBy": "example", "timeZone": "example" }, "readiness": { "generation": 1, "missed": true, "p50Seconds": 1, "p90Seconds": 1, "requestedTime": "example", "stage": "example" }, "reservationEpoch": 1, "retained": true, "retentionDigest": "example", "terms": { "agreementURL": "example", "compensation": "example", "customerHourlyUSD": "example", "ownerShareBasisPoints": 1, "pricing": { "cpuShapes": [ { "hourlyUSD": "example", "memoryMiB": 1, "vcpuMillis": 1 } ], "gpus": { "additionalProperty": { "additionalProperty": "example" } }, "version": "example" }, "reclaimNoticeSeconds": 1, "revision": "example" }, "termsDigest": "example"}default
Section titled “ default ”An error: a metav1.Status whose reason is a registered code.
Status is the error body of every API response: a Kubernetes metav1.Status (so kubectl and client-go understand it) plus three top-level extensions that those clients ignore (ADR-028).
object
object
object
Docs is the URL of the code’s docs page.
Fix says what to do next, for example a CLI command or the field to change.
object
object
RequestID identifies the request in logs and support tickets.
Example generated
{ "apiVersion": "example", "code": 1, "details": { "causes": [ { "field": "example", "message": "example", "reason": "example" } ], "group": "example", "kind": "example", "name": "example", "retryAfterSeconds": 1, "uid": "example" }, "docs": "example", "fix": "example", "kind": "example", "message": "example", "metadata": { "continue": "example", "remainingItemCount": 1, "resourceVersion": "example", "selfLink": "example", "shardInfo": { "selector": "example" } }, "reason": "example", "requestId": "example", "status": "example"}