Request Compute Grant Approval

Consolidated approval request endpoint. Orchestrates approval-session heartbeat, grants listing, credits / campaign-budget preflight and optional compute-status probe so the CLI can drop its multi-endpoint wrapper.

POST
/v1/compute-grants/request-approval

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body

Body shape for the consolidated POST /compute-grants/request-approval.

FLY-382 P4. Mirrors the orchestration previously fanned out by the CLI: heartbeat → grants listing → credits/campaign preflight → optional status probe. The CLI now POSTs once and returns the server's payload verbatim.

acquire_node_id?string|null
approval_session_id?string|null
budget_source*Budget Source
compute_budget_id?string|null
grant_action?Grant Action
Default"create"
lease_control_token?string|null
provider?string|null
purpose*Purpose
region?string|null
requested_sku*Requested Sku
suggested_hard_cap_cents?Suggested Hard Cap Cents
Default0
target_compute_grant_id?string|null

Response Body

Successful Response

application/json
  1. response
acquire_node_id?string|null
approval_session*
approval_session_id*Approval Session Id
budget_source*Budget Source
Value in"user""root"
compute_budget_id?string|null
compute_grant_id*Compute Grant Id
compute_status?|null
grant_action*Grant Action
Value in"create""top_up"
grants*array<>
message*Message
purpose*Purpose
region*string|null
requested_sku*Requested Sku
status*Status
[key: string]?any
Example Request
curl -X POST 'https://flywheel.paradigma.inc/api/v1/compute-grants/request-approval' \  -H 'Content-Type: application/json' \  -d '{  "budget_source": "string",  "purpose": "string",  "requested_sku": "string"}'
Example Response
{  "acquire_node_id": "string",  "approval_session": {},  "approval_session_id": "string",  "budget_source": "user",  "compute_budget_id": "string",  "compute_grant_id": "string",  "compute_status": {    "active_lease_id": "string",    "budget_remaining_cents": 0,    "budget_source": "string",    "compute_grant_id": "string",    "cumulative_spend_cents": 0,    "grant_cents": 0,    "hard_cap_cents": 0,    "leases": [      {        "activated_at": "string",        "auto_shutdown_at": "string",        "budget_grace_deadline_at": "string",        "connection_allowed_for_current_user": true,        "created_at": "string",        "error": "string",        "has_ssh_private_key": true,        "instance_status": "string",        "last_heartbeat_at": "string",        "lease_id": "string",        "offer_id": "string",        "owned_by_current_user": true,        "price_cents_per_hour": 0,        "provider": "string",        "region": "string",        "release_reason": "string",        "released_at": "string",        "ssh_host": "string",        "ssh_port": 0,        "ssh_user": "string",        "status": "string",        "total_charged_cents": 0,        "usage_role_for_current_user": "owner"      }    ],    "next_retry_after_seconds": 0,    "recommended_next_action": "string",    "remaining_cents": 0,    "resume_offer_id": "string",    "resume_region": "string",    "root_compute_budget_id": "string",    "spent_cents": 0  },  "grant_action": "create",  "grants": [    {}  ],  "message": "string",  "purpose": "string",  "region": "string",  "requested_sku": "string",  "status": "already_approved"}