TensorDock

API Documentation

Learn how to integrate with our API to manage your virtual machines and resources.

Instance Management

Endpoints for managing virtual machine instances

List Instances
Get a list of all virtual machine instances
GET/api/v2/instances

Response

{
  "data": {
    "instances": [
      {
        "type": "VM",
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "attributes": {
          "name": "My Instance",
          "status": "running"
        }
      }
    ]
  }
}
Get Instance
Get details about a specific instance
GET/api/v2/instances/{id}

Parameters

  • id - The ID of the instance to retrieve

Response

{
  "type": "instance",
  "id": "string",
  "name": "string",
  "status": "string",
  "ipAddress": "string",
  "portForwards": [
    {
      "internal_port": "number",
      "external_port": "number"
    }
  ]
}
Start Instance
Start a stopped instance
POST/api/v2/instances/{id}/start

Parameters

  • id - The ID of the instance to start

Response

{
  "data": {
    "type": "instance",
    "id": "string",
    "attributes": {
      "status": "starting"
    }
  }
}
Stop Instance
Stop a running instance
POST/api/v2/instances/{id}/stop

Parameters

  • id - The ID of the instance to stop

Response

{
  "data": {
    "type": "instance",
    "id": "string",
    "attributes": {
      "status": "stopping"
    }
  }
}
Delete Instance
Delete an instance and its associated resources
DELETE/api/v2/instances/{id}

Parameters

  • id - The ID of the instance to delete

Response

{
  "data": {
    "type": "success",
    "attributes": {
      "message": "Instance deleted successfully"
    }
  }
}