socialweb.computer

Request and provide VMs on an atproto compute market.

lexicons and xrpc

lexicon

com.fedfork.exec.ops.listVms

query HTTP GET /xrpc/com.fedfork.exec.ops.listVms

A bidder answers its ComputeVM objects in a fixed projection: name, deletionTimestamp, spec vm.cpus, requester.did, contract.receipt.uri, status phase and lostReason. Read only (GET). Served only when the host has an ops read secret configured (else 404); requires it as Authorization: Bearer.

definitions: #vm #vmStatus #vmSpec #vmShape #vmRequester #vmContract #vmReceipt #meta

output

encoding application/json

fieldtypedescription
items *array of #vm

errors

errordescription
AuthenticationRequired401: the ops read secret is missing or wrong.
Unavailable503: the bidder's objects are not readable yet.
ReadFailed502: the read failed; the host's log has the detail.

#vm object

fieldtypedescription
metadata *#meta
spec *#vmSpec
status *#vmStatus

#vmStatus object

fieldtypedescription
phasestring
lostReasonstring

#vmSpec object

fieldtypedescription
vm *#vmShape
requester *#vmRequester
contract#vmContract

#vmShape object

fieldtypedescription
cpus *integer

#vmRequester object

fieldtypedescription
did *string did

#vmContract object

fieldtypedescription
receipt *#vmReceipt

#vmReceipt object

fieldtypedescription
uri *string at-uri

#meta object

fieldtypedescription
name *string
deletionTimestampstring datetime

used in

no page of these docs names it yet.

raw schema: lexicons/com/fedfork/exec/ops/listVms.json
{
  "lexicon": 1,
  "id": "com.fedfork.exec.ops.listVms",
  "defs": {
    "main": {
      "type": "query",
      "description": "A bidder answers its ComputeVM objects in a fixed projection: name, deletionTimestamp, spec vm.cpus, requester.did, contract.receipt.uri, status phase and lostReason. Read only (GET). Served only when the host has an ops read secret configured (else 404); requires it as Authorization: Bearer.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "items"
          ],
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "ref",
                "ref": "#vm"
              }
            }
          }
        }
      },
      "errors": [
        {
          "name": "AuthenticationRequired",
          "description": "401: the ops read secret is missing or wrong."
        },
        {
          "name": "Unavailable",
          "description": "503: the bidder's objects are not readable yet."
        },
        {
          "name": "ReadFailed",
          "description": "502: the read failed; the host's log has the detail."
        }
      ]
    },
    "vm": {
      "type": "object",
      "required": [
        "metadata",
        "spec",
        "status"
      ],
      "properties": {
        "metadata": {
          "type": "ref",
          "ref": "#meta"
        },
        "spec": {
          "type": "ref",
          "ref": "#vmSpec"
        },
        "status": {
          "type": "ref",
          "ref": "#vmStatus"
        }
      }
    },
    "vmStatus": {
      "type": "object",
      "properties": {
        "phase": {
          "type": "string"
        },
        "lostReason": {
          "type": "string"
        }
      }
    },
    "vmSpec": {
      "type": "object",
      "required": [
        "vm",
        "requester"
      ],
      "properties": {
        "vm": {
          "type": "ref",
          "ref": "#vmShape"
        },
        "requester": {
          "type": "ref",
          "ref": "#vmRequester"
        },
        "contract": {
          "type": "ref",
          "ref": "#vmContract"
        }
      }
    },
    "vmShape": {
      "type": "object",
      "required": [
        "cpus"
      ],
      "properties": {
        "cpus": {
          "type": "integer"
        }
      }
    },
    "vmRequester": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        }
      }
    },
    "vmContract": {
      "type": "object",
      "required": [
        "receipt"
      ],
      "properties": {
        "receipt": {
          "type": "ref",
          "ref": "#vmReceipt"
        }
      }
    },
    "vmReceipt": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri"
        }
      }
    },
    "meta": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "deletionTimestamp": {
          "type": "string",
          "format": "datetime"
        }
      }
    }
  }
}