{
  "opencollection": "1.0.0",
  "info": {
    "name": "OpenRelay Account VMs API",
    "version": "0.1.0"
  },
  "items": [
    {
      "info": {
        "name": "VMs",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List an org's VMs (cursor-paginated)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.openrelay.inc/v1/orgs/:orgId/vms",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query"
              },
              {
                "name": "cursor",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List an org's VMs (cursor-paginated)"
        },
        {
          "info": {
            "name": "Create a VM",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.openrelay.inc/v1/orgs/:orgId/vms/create",
            "params": [
              {
                "name": "orgId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Create a VM"
        },
        {
          "info": {
            "name": "Get a VM by id",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.openrelay.inc/v1/vms/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get a VM by id"
        },
        {
          "info": {
            "name": "Live burn rate, session cost so far, and org runway for a VM",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.openrelay.inc/v1/vms/:id/burn",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Every VM bills at one bundled hourly rate (per-GPU catalog price times GPU count for GPU VMs, a flat size rate for CPU VMs); disk is included, never billed separately. The rate is locked when the usage session opens, so this endpoint reads it from the open usage record when one exists (rateSource=locked) and only falls back to the current catalog when nothing is accruing (rateSource=catalog).\n"
        },
        {
          "info": {
            "name": "Get a VM with its GPU/node/template info and price",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.openrelay.inc/v1/vms/:id/detail",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get a VM with its GPU/node/template info and price"
        },
        {
          "info": {
            "name": "Reboot a VM",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.openrelay.inc/v1/vms/:id/reboot",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Beta: the reboot request is validated and accepted, but the in-guest reboot is not yet executed by the data plane."
        },
        {
          "info": {
            "name": "Resize a stopped VM's disk",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.openrelay.inc/v1/vms/:id/resize-disk",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Beta: the new disk size is validated and recorded, but the disk is not yet resized on the node."
        },
        {
          "info": {
            "name": "Restart a VM",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.openrelay.inc/v1/vms/:id/restart",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Restart a VM"
        },
        {
          "info": {
            "name": "SSH keys attached to a VM + the org's keys",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.openrelay.inc/v1/vms/:id/ssh-keys",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "SSH keys attached to a VM + the org's keys"
        },
        {
          "info": {
            "name": "Attach an org SSH key to a VM",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.openrelay.inc/v1/vms/:id/ssh-keys",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Attach an org SSH key to a VM"
        },
        {
          "info": {
            "name": "Stop a VM",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.openrelay.inc/v1/vms/:id/stop",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Stop a VM"
        },
        {
          "info": {
            "name": "Get a VM's embedded Telegram link",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.openrelay.inc/v1/vms/:id/telegram-link",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get a VM's embedded Telegram link"
        },
        {
          "info": {
            "name": "Terminate a VM",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.openrelay.inc/v1/vms/:id/terminate",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Terminate a VM"
        },
        {
          "info": {
            "name": "Set a VM's endpoint visibility",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.openrelay.inc/v1/vms/:id/visibility",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Set a VM's endpoint visibility"
        }
      ]
    }
  ],
  "bundled": true
}