Skip to content

Accept or change reserved capacity lending

POST
/apis/nodus.dev/v1/namespaces/{namespace}/workspaces/{name}/sharing
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" }'
namespace
required
string

The project.

name
required
string

The object’s name.

dryRun
string
fieldValidation
string
fieldManager
string
Idempotency-Key
string
If-Match
string
Media type application/json

WorkspaceSharingRequest accepts or revokes permission, or changes availability under existing permission.

object
action
required

Action is Accept, Revoke or Policy. Revoke keeps the reservation and its base charge.

string
agreed

Agreed explicitly confirms acceptance of the lending terms.

boolean
generation
required

Generation is the sharing generation reviewed by the caller.

integer format: int64
policy

CapacityLendingPolicy controls when idle capacity may be offered under existing consent.

object
minimumReady

MinimumReady is the number of qualified idle units reserved across the same project, pool and hardware.

integer format: int32
ownerWindows

OwnerWindows reserves recurring owner availability without stopping active owner work.

Array<object>
nullable

CapacityOwnerWindow reserves availability for the owner; it never stops active owner work.

object
days
required

Days uses ISO weekdays, Monday=1 through Sunday=7, in the policy’s time zone.

Array<integer>
nullable
end
required

End is the local HH:MM time when availability ends; a value at or before Start is on the next day.

string
start
required

Start is the local HH:MM time when owner availability begins.

string
readyBy

ReadyBy requests owner availability at one absolute time.

string
timeZone

TimeZone is an IANA zone; UTC is used when no windows are configured and this field is empty.

string
retentionAgreed

RetentionAgreed separately accepts the continuing base charge when first retaining capacity.

boolean
retentionDigest

RetentionDigest binds first retention to the reviewed capacity and continuing base charge.

string
termsDigest

TermsDigest is the reviewed lending-terms digest required for acceptance.

string
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"
}

OK

Media type application/json

WorkspaceSharing describes permission, policy and readiness of retained reserved capacity.

object
accepting
required

Accepting permits compatible borrower placement when the capacity is idle and qualified.

boolean
apiVersion
string
baseHourlyUSD
required

BaseHourlyUSD continues across owner use, idle time, lending and ordinary handoffs.

string
consent

PoolSharingConsent is the immutable agreement snapshot and its revocation record.

object
acceptedBy
required

AcceptedBy identifies the human who accepted.

string
acceptedTime
required

AcceptedTime is when acceptance committed.

string
allHosts

AllHosts records Pool-wide permission for current and future enrolled hosts.

boolean
id
required

ID identifies the immutable acceptance.

string
nodes
required

Nodes lists exact host identities when AllHosts is false; otherwise it is empty.

Array<string>
nullable
revokedTime

RevokedTime is when new lending was withdrawn.

string
terms
required

PoolSharingTerms is the published agreement accepted independently of private Pool routing.

object
agreementURL
required

AgreementURL contains the full agreement shown before acceptance.

string
compensation
required

Compensation is Credits. Earnings are non-cash Nodus credits.

string
customerHourlyUSD
required

CustomerHourlyUSD is a fixed whole-host rate; empty when Pricing supplies hardware rates.

string
ownerShareBasisPoints
required

OwnerShareBasisPoints is the owner’s share of the settled compute charge, excluding taxes and storage.

integer format: int32
pricing

PoolSharingPricing prices a whole host from the accepted pricebook snapshot.

object
cpuShapes
required

CPUShapes is the accepted website CPU configuration card; larger hosts use the lowest proportional rate.

Array<object>
nullable

PoolSharingCPUPrice is one static website CPU and memory configuration.

object
hourlyUSD
required

HourlyUSD is the configuration’s static hourly borrower charge.

string
memoryMiB
required

MemoryMiB is the configuration’s guest memory capacity.

integer format: int64
vcpuMillis
required

VCPUMillis is the configuration’s CPU capacity in millicores.

integer format: int64
gpus
required

GPUs maps canonical accelerator and physical device count to a whole-host hourly rate.

object
key
additional properties
object
key
additional properties
string
version
required

Version identifies the source pricebook.

string
reclaimNoticeSeconds
required

ReclaimNoticeSeconds is the maximum checkpoint notice before borrowed work is stopped.

integer format: int32
revision
required

Revision identifies the published agreement.

string
termsDigest
required

TermsDigest binds acceptance to these exact terms.

string
earnedCreditsUSD
required

EarnedCreditsUSD is the net settled lending credit attributed to this capacity.

string
generation
required

Generation fences changes to the current sharing agreement.

integer format: int64
kind
string
policy
required

CapacityLendingPolicy controls when idle capacity may be offered under existing consent.

object
minimumReady

MinimumReady is the number of qualified idle units reserved across the same project, pool and hardware.

integer format: int32
ownerWindows

OwnerWindows reserves recurring owner availability without stopping active owner work.

Array<object>
nullable

CapacityOwnerWindow reserves availability for the owner; it never stops active owner work.

object
days
required

Days uses ISO weekdays, Monday=1 through Sunday=7, in the policy’s time zone.

Array<integer>
nullable
end
required

End is the local HH:MM time when availability ends; a value at or before Start is on the next day.

string
start
required

Start is the local HH:MM time when owner availability begins.

string
readyBy

ReadyBy requests owner availability at one absolute time.

string
timeZone

TimeZone is an IANA zone; UTC is used when no windows are configured and this field is empty.

string
readiness
required

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
required

Generation identifies the current runtime handoff and increases when its tenant environment changes.

integer format: int64
missed

Missed records that owner readiness was not established by RequestedTime.

boolean
p50Seconds

P50Seconds is the observed median owner-return duration for compatible capacity.

integer format: int64
p90Seconds

P90Seconds is the observed ninetieth-percentile owner-return duration for compatible capacity.

integer format: int64
requestedTime

RequestedTime is the readiness target of the current owner request or availability window.

string
stage
required

Stage is the current preparation, lending, reclaim or owner-readiness stage.

string
reservationEpoch
required

ReservationEpoch identifies the reservation term covered by this agreement.

integer format: int64
retained
required

Retained is true only after explicit acceptance of continuous reservation billing.

boolean
retentionDigest

RetentionDigest binds the original running capacity and the displayed continuing base charge.

string
terms

PoolSharingTerms is the published agreement accepted independently of private Pool routing.

object
agreementURL
required

AgreementURL contains the full agreement shown before acceptance.

string
compensation
required

Compensation is Credits. Earnings are non-cash Nodus credits.

string
customerHourlyUSD
required

CustomerHourlyUSD is a fixed whole-host rate; empty when Pricing supplies hardware rates.

string
ownerShareBasisPoints
required

OwnerShareBasisPoints is the owner’s share of the settled compute charge, excluding taxes and storage.

integer format: int32
pricing

PoolSharingPricing prices a whole host from the accepted pricebook snapshot.

object
cpuShapes
required

CPUShapes is the accepted website CPU configuration card; larger hosts use the lowest proportional rate.

Array<object>
nullable

PoolSharingCPUPrice is one static website CPU and memory configuration.

object
hourlyUSD
required

HourlyUSD is the configuration’s static hourly borrower charge.

string
memoryMiB
required

MemoryMiB is the configuration’s guest memory capacity.

integer format: int64
vcpuMillis
required

VCPUMillis is the configuration’s CPU capacity in millicores.

integer format: int64
gpus
required

GPUs maps canonical accelerator and physical device count to a whole-host hourly rate.

object
key
additional properties
object
key
additional properties
string
version
required

Version identifies the source pricebook.

string
reclaimNoticeSeconds
required

ReclaimNoticeSeconds is the maximum checkpoint notice before borrowed work is stopped.

integer format: int32
revision
required

Revision identifies the published agreement.

string
termsDigest

TermsDigest binds acceptance to the displayed lending terms.

string
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"
}

An error: a metav1.Status whose reason is a registered code.

Media type application/json

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
apiVersion
string
code
integer format: int32
details
object
causes
Array<object>
nullable
object
field
string
message
string
reason
string
group
string
kind
string
name
string
retryAfterSeconds
integer format: int32
uid
string
docs

Docs is the URL of the code’s docs page.

string
fix

Fix says what to do next, for example a CLI command or the field to change.

string
kind
string
message
string
metadata
object
continue
string
remainingItemCount
integer format: int64
resourceVersion
string
selfLink
string
shardInfo
object
selector
required
string
reason
string
requestId

RequestID identifies the request in logs and support tickets.

string
status
string
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"
}