### Start Instance Source: https://dashboard.tensordock.com/api/docs/instance-management Starts a stopped virtual machine instance. ```APIDOC ## POST /api/v2/instances/{id}/start ### Description Start a stopped instance. ### Method POST ### Endpoint /api/v2/instances/{id}/start ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the instance to start. ### Response #### Success Response (200) - **data** (object) - Contains instance status information. - **type** (string) - The type of the resource (e.g., "instance"). - **id** (string) - The unique identifier for the instance. - **attributes** (object) - Contains instance attributes. - **status** (string) - The status of the instance, which will be "starting". ### Response Example ```json { "data": { "type": "instance", "id": "550e8400-e29b-41d4-a716-446655440000", "attributes": { "status": "starting" } } } ``` ``` -------------------------------- ### Cloud-Init Configuration for VM Setup Source: https://dashboard.tensordock.com/api/docs/instance-creation Configure initial setup for your virtual machine using the `cloud_init` object. This includes running commands, installing packages, and writing files during the first boot. ```json { "cloud_init": { "runcmd": [ "echo 'Hello World'", "apt-get update", "apt-get install -y nginx" ], "packages": [ "curl", "git" ], "package_update": true, "package_upgrade": false, "write_files": [ { "path": "/etc/motd", "content": "Welcome to your TensorDock instance!", "owner": "root:root", "permissions": "0644" } ] } } ``` -------------------------------- ### Complete Authenticated API Request Example Source: https://dashboard.tensordock.com/api/docs/getting-started This example demonstrates a complete authenticated GET request to retrieve instances, including necessary headers for content type and acceptance. Ensure your token is valid and properly formatted. ```bash curl -X GET "https://dashboard.tensordock.com/api/v2/instances" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### Get Instances Source: https://dashboard.tensordock.com/api/docs/getting-started Retrieve a list of your instances. This is an example of an authenticated GET request. ```APIDOC ## GET /instances ### Description Retrieves a list of all instances associated with the authenticated user. ### Method GET ### Endpoint https://dashboard.tensordock.com/api/v2/instances ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for authentication. - **Content-Type** (string) - Optional - Specifies the request body format (e.g., application/json). - **Accept** (string) - Optional - Specifies the desired response format (e.g., application/json). ### Request Example ```curl curl -X GET "https://dashboard.tensordock.com/api/v2/instances" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ### Response #### Success Response (200) - **data** (object) - Contains the list of instances. - **type** (string) - The type of the data, typically 'list'. - **id** (string) - Identifier for the list, typically 'instances'. - **attributes** (object) - Contains the actual instance data. - **instances** (array) - A list of instance objects. - **type** (string) - The type of the instance, typically 'instance'. - **id** (string) - The unique identifier for the instance. - **attributes** (object) - Contains the attributes of the instance. - **name** (string) - The name of the instance. - **status** (string) - The current status of the instance (e.g., 'running'). - **region** (string) - The region where the instance is deployed. ### Response Example ```json { "data": { "type": "list", "id": "instances", "attributes": { "instances": [ { "type": "instance", "id": "550e8400-e29b-41d4-a716-446655440000", "attributes": { "name": "My Instance", "status": "running", "region": "us-east-1" } } ] } } } ``` ``` -------------------------------- ### Get Instance Source: https://dashboard.tensordock.com/api/docs/instance-management Retrieves detailed information about a specific virtual machine instance. ```APIDOC ## GET /api/v2/instances/{id} ### Description Get details about a specific instance. ### Method GET ### Endpoint /api/v2/instances/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the instance to retrieve. ### Response #### Success Response (200) - **type** (string) - The type of the resource (e.g., "instance"). - **id** (string) - The unique identifier for the instance. - **name** (string) - The name of the instance. - **status** (string) - The current status of the instance. - **ipAddress** (string) - The IP address assigned to the instance. - **portForwards** (array) - A list of port forwarding rules. - **internal_port** (number) - The internal port number. - **external_port** (number) - The external port number. - **resources** (object) - Details about the instance's resources. - **vcpu_count** (number) - The number of virtual CPUs. - **ram_gb** (number) - The amount of RAM in GB. - **storage_gb** (number) - The amount of storage in GB. - **gpus** (object) - Information about allocated GPUs. - **gpu-model-name** (object) - Details for a specific GPU model. - **count** (number) - The number of GPUs of this model. - **v0Name** (string) - The v0 name of the GPU model. - **rateHourly** (number) - The hourly rate for the instance. ### Response Example ```json { "type": "instance", "id": "string", "name": "string", "status": "string", "ipAddress": "string", "portForwards": [ { "internal_port": 80, "external_port": 8080 } ], "resources": { "vcpu_count": 4, "ram_gb": 16, "storage_gb": 100, "gpus": { "nvidia-tesla-t4": { "count": 1, "v0Name": "nvidia-tesla-t4" } } }, "rateHourly": 0.5 } ``` ``` -------------------------------- ### Start a Stopped Instance Source: https://dashboard.tensordock.com/api/docs/instance-management Initiate the startup process for a virtual machine instance that is currently stopped. Requires the instance ID. ```http POST/api/v2/instances/{id}/start ``` -------------------------------- ### Instance Deployment Configuration Source: https://dashboard.tensordock.com/api/docs/fetch-hostnodes Example JSON payload for creating a virtual machine instance, demonstrating how to specify the location ID and desired resources, including GPU configuration. ```json { "data": { "type": "virtualmachine", "attributes": { "location_id": "loc-uuid-12345", "name": "my-instance", "image": "ubuntu2404", "resources": { "vcpu_count": 64, "ram_gb": 256, "storage_gb": 500, "gpus": { "h100-sxm5-80gb": { "count": 4 } } } } } } ``` -------------------------------- ### Get Specific Instance Details Source: https://dashboard.tensordock.com/api/docs/instance-management Retrieve detailed information about a specific virtual machine instance using its ID. Parameters include instance ID. ```http GET/api/v2/instances/{id} ``` -------------------------------- ### Get Hostnode Details Source: https://dashboard.tensordock.com/api/docs/fetch-hostnodes Fetch detailed information about a specific hostnode including available ports and extended resource details. ```APIDOC ## GET /api/v2/hostnodes/{uuid} ### Description Fetch detailed information about a specific hostnode including available ports and extended resource details. ### Method GET ### Endpoint /api/v2/hostnodes/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - The unique identifier of the hostnode (e.g., hn-uuid-12345) ### Response #### Success Response (200) - **data** (object) - Contains the hostnode details. - **id** (string) - The unique identifier of the hostnode. - **location_id** (string) - The unique identifier of the location. - **engine** (string) - The engine used by the hostnode. - **uptime_percentage** (number) - The uptime percentage of the hostnode. - **available_resources** (object) - Details about the available resources. - **gpus** (array) - List of available GPUs. - **v0Name** (string) - The name of the GPU model. - **availableCount** (integer) - The number of available GPUs of this type. - **price_per_hr** (number) - The hourly price for this GPU. - **max_vcpus_per_gpu** (integer) - Maximum vCPUs per GPU. - **max_ram_per_gpu** (integer) - Maximum RAM per GPU in GB. - **max_vcpus** (integer) - Maximum available vCPUs. - **max_ram_gb** (integer) - Maximum available RAM in GB. - **max_storage_gb** (integer) - Maximum available storage in GB. - **available_ports** (array) - List of ports available for port forwarding. - **has_public_ip_available** (boolean) - Indicates if a public IP is available. - **pricing** (object) - Pricing information. - **per_vcpu_hr** (number) - Hourly price per vCPU. - **per_gb_ram_hr** (number) - Hourly price per GB of RAM. - **per_gb_storage_hr** (number) - Hourly price per GB of storage. - **location** (object) - Location details. - **uuid** (string) - The unique identifier of the location. - **city** (string) - The city of the location. - **stateprovince** (string) - The state or province of the location. - **country** (string) - The country of the location. - **has_network_storage** (boolean) - Indicates if network storage is available. - **network_speed_gbps** (number) - Download network speed in Gbps. - **network_speed_upload_gbps** (number) - Upload network speed in Gbps. - **organization** (string) - The unique identifier of the organization. - **organizationName** (string) - The name of the organization. - **tier** (integer) - The data center tier. ### Response Example ```json { "data": { "id": "hostnode-uuid", "location_id": "location-uuid", "engine": "Narwhal", "uptime_percentage": 99.79, "available_resources": { "gpus": [ { "v0Name": "h100-sxm5-80gb", "availableCount": 8, "price_per_hr": 2.2 } ], "max_vcpus_per_gpu": 16, "max_ram_per_gpu": 128, "max_vcpus": 208, "max_ram_gb": 990, "max_storage_gb": 14780, "available_ports": [ 20000, 20001, 20002, 20003, 20004, 20005, 20006, 20007, 20008, 20009 ], "has_public_ip_available": true }, "pricing": { "per_vcpu_hr": 0.0015, "per_gb_ram_hr": 0.0007, "per_gb_storage_hr": 0.00005 }, "location": { "uuid": "location-uuid", "city": "Austin", "stateprovince": "Texas", "country": "United States", "has_network_storage": false, "network_speed_gbps": 10, "network_speed_upload_gbps": 10, "organization": "organization-uuid", "organizationName": "DataCenter Corp", "tier": 3 } } } ``` ``` -------------------------------- ### Location Data Response Structure Source: https://dashboard.tensordock.com/api/docs/fetch-hostnodes Example response structure for the locations endpoint, detailing GPU types, resource limits, pricing, and network features available at each location. ```json { "data": { "locations": [ { "id": "loc-uuid-12345", "city": "Austin", "stateprovince": "Texas", "country": "United States", "tier": 3, "gpus": [ { "v0Name": "h100-sxm5-80gb", "displayName": "H100 SXM5 80GB", "max_count": 8, "price_per_hr": 2.2, "resources": { "max_vcpus": 128, "max_ram_gb": 300, "max_storage_gb": 1000 }, "pricing": { "per_vcpu_hr": 0.003, "per_gb_ram_hr": 0.002, "per_gb_storage_hr": 0.00005 }, "network_features": { "dedicated_ip_available": true, "port_forwarding_available": true, "network_storage_available": false } }, { "v0Name": "geforcertx4090-pcie-24gb", "displayName": "NVIDIA GeForce RTX 4090 PCIe 24GB", "max_count": 4, "price_per_hr": 0.5, "resources": { "max_vcpus": 32, "max_ram_gb": 128, "max_storage_gb": 2000 }, "pricing": { "per_vcpu_hr": 0.003, "per_gb_ram_hr": 0.002, "per_gb_storage_hr": 0.00005 }, "network_features": { "dedicated_ip_available": false, "port_forwarding_available": true, "network_storage_available": false } } ] } ] } } ``` -------------------------------- ### Example API Response Structure Source: https://dashboard.tensordock.com/api/docs/getting-started This JSON structure represents a typical successful API response when retrieving a list of instances. It includes metadata and a list of instance objects, each with its own attributes. ```json { "data": { "type": "list", "id": "instances", "attributes": { "instances": [ { "type": "instance", "id": "550e8400-e29b-41d4-a716-446655440000", "attributes": { "name": "My Instance", "status": "running", "region": "us-east-1" } } ] } } } ``` -------------------------------- ### Get Secret Source: https://dashboard.tensordock.com/api/docs/secrets Retrieve a specific secret by ID. Note: For secrets of type 'SECRET', the value will not be returned. ```APIDOC ## GET /api/v2/secrets/{id} ### Description Retrieve a specific secret by ID. ### Method GET ### Endpoint /api/v2/secrets/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the secret to retrieve. ### Response #### Success Response (200) - **data** (object) - Contains the secret details. - **type** (string) - The type of the secret. - **id** (string) - The unique identifier for the secret. - **name** (string) - The name of the secret. - **value** (string) - The value of the secret (not returned for type 'SECRET'). ### Response Example ```json { "data": { "type": "secret", "id": "string", "name": "string", "value": "string (not returned for type 'SECRET')" } } ``` ``` -------------------------------- ### Get Hostnode Details Source: https://dashboard.tensordock.com/api/docs/fetch-hostnodes Fetch detailed information about a specific hostnode using its UUID. This includes extended resource details and available ports for port forwarding. ```http GET/api/v2/hostnodes/{uuid} ``` ```json { "data": { "id": "hostnode-uuid", "location_id": "location-uuid", "engine": "Narwhal", "uptime_percentage": 99.79, "available_resources": { "gpus": [ { "v0Name": "h100-sxm5-80gb", "availableCount": 8, "price_per_hr": 2.2 } ], "max_vcpus_per_gpu": 16, "max_ram_per_gpu": 128, "max_vcpus": 208, "max_ram_gb": 990, "max_storage_gb": 14780, "available_ports": [ 20000, 20001, 20002, 20003, 20004, 20005, 20006, 20007, 20008, 20009 ], "has_public_ip_available": true }, "pricing": { "per_vcpu_hr": 0.0015, "per_gb_ram_hr": 0.0007, "per_gb_storage_hr": 0.00005 }, "location": { "uuid": "location-uuid", "city": "Austin", "stateprovince": "Texas", "country": "United States", "has_network_storage": false, "network_speed_gbps": 10, "network_speed_upload_gbps": 10, "organization": "organization-uuid", "organizationName": "DataCenter Corp", "tier": 3 } } } ``` -------------------------------- ### Get a Specific Secret Source: https://dashboard.tensordock.com/api/docs/secrets Retrieve a specific secret by its ID. Note that for secrets of type 'SECRET', the 'value' field will not be included in the response. ```http GET/api/v2/secrets/{id} ``` -------------------------------- ### Create Virtual Machine Instance Source: https://dashboard.tensordock.com/api/docs/instance-creation Use this endpoint to create a new virtual machine instance. You can specify deployment options, network configuration, operating system, and resources. ```APIDOC ## POST /api/v2/instances ### Description Creates a virtual machine instance with specified configurations. ### Method POST ### Endpoint /api/v2/instances ### Request Body - **data** (object) - Required - The main object containing instance details. - **type** (string) - Required - Must be 'virtualmachine'. - **attributes** (object) - Required - Attributes of the virtual machine. - **name** (string) - Required - The name of the instance. - **type** (string) - Required - Must be 'virtualmachine'. - **image** (string) - Required - The operating system image (e.g., 'ubuntu2404'). - **resources** (object) - Required - Resources for the instance. - **vcpu_count** (integer) - Required - Number of vCPUs. - **ram_gb** (integer) - Required - Amount of RAM in GB. - **storage_gb** (integer) - Required - Amount of storage in GB. - **gpus** (object) - Required - GPU configuration. - **gpu_type** (string) - Required - The type of GPU (e.g., 'geforcertx4090-pcie-24gb'). - **count** (integer) - Required - Number of GPUs of the specified type. - **location_id** (string) - Optional - The ID of the location for deployment. - **useDedicatedIp** (boolean) - Optional - Whether to use a dedicated public IP address. - **ssh_key** (string) - Required if not using location-based deployment with pre-configured SSH keys - The SSH public key for access. - **cloud_init** (object) - Optional - Configuration for initial setup. - **runcmd** (array of strings) - Optional - Commands to run on first boot. - **packages** (array of strings) - Optional - Packages to install on first boot. - **package_update** (boolean) - Optional - Whether to update package lists on first boot. - **package_upgrade** (boolean) - Optional - Whether to upgrade installed packages on first boot. - **write_files** (array of objects) - Optional - Files to write on first boot. - **path** (string) - Required - The file path. - **content** (string) - Required - The file content. - **owner** (string) - Optional - File owner (default: 'root:root'). - **permissions** (string) - Optional - File permissions (e.g., '0644'). ### Request Example ```json { "data": { "type": "virtualmachine", "attributes": { "name": "my-ubuntu-instance", "type": "virtualmachine", "image": "ubuntu2404", "resources": { "vcpu_count": 4, "ram_gb": 8, "storage_gb": 200, "gpus": { "geforcertx4090-pcie-24gb": { "count": 2 } } }, "location_id": "loc-uuid-12345", "useDedicatedIp": true, "ssh_key": "sshkey placeholder", "cloud_init": { "runcmd": [ "echo 'Hello World'", "apt-get update", "apt-get install -y nginx" ], "packages": [ "curl", "git" ], "package_update": true, "package_upgrade": false, "write_files": [ { "path": "/etc/motd", "content": "Welcome to your TensorDock instance!", "owner": "root:root", "permissions": "0644" } ] } } } } ``` ### Response #### Success Response (200) - **data** (object) - Information about the created instance. - **type** (string) - The type of resource, 'virtualmachine'. - **id** (string) - The unique identifier for the created instance. - **name** (string) - The name of the instance. - **status** (string) - The current status of the instance (e.g., 'running'). #### Response Example ```json { "data": { "type": "virtualmachine", "id": "instance-uuid", "name": "my-ubuntu-instance", "status": "running" } } ``` ``` -------------------------------- ### List All Instances Source: https://dashboard.tensordock.com/api/docs/instance-management Retrieve a list of all virtual machine instances associated with your organization. Requires authentication. ```http GET/api/v2/instances ``` -------------------------------- ### List Instances Source: https://dashboard.tensordock.com/api/docs/instance-management Retrieves a list of all virtual machine instances associated with your organization. ```APIDOC ## GET /api/v2/instances ### Description Get a list of all virtual machine instances. ### Method GET ### Endpoint /api/v2/instances ### Response #### Success Response (200) - **data** (object) - Contains a list of instances. - **instances** (array) - List of instance objects. - **type** (string) - The type of the resource (e.g., "VM"). - **id** (string) - The unique identifier for the instance. - **attributes** (object) - Contains instance attributes. - **name** (string) - The name of the instance. - **status** (string) - The current status of the instance (e.g., "running"). ### Response Example ```json { "data": { "instances": [ { "type": "VM", "id": "550e8400-e29b-41d4-a716-446655440000", "attributes": { "name": "My Instance", "status": "running" } } ] } } ``` ``` -------------------------------- ### Create Virtual Machine Instance Request Source: https://dashboard.tensordock.com/api/docs/instance-creation Use this JSON payload to create a virtual machine instance. Specify resources, image, location, and SSH key. Ensure minimum storage and balance requirements are met. ```json { "data": { "type": "virtualmachine", "attributes": { "name": "my-ubuntu-instance", "type": "virtualmachine", "image": "ubuntu2404", "resources": { "vcpu_count": 4, "ram_gb": 8, "storage_gb": 200, "gpus": { "geforcertx4090-pcie-24gb": { "count": 2 } } }, "location_id": "loc-uuid-12345", "useDedicatedIp": true, "ssh_key": "sshkey placeholder" } } } ``` -------------------------------- ### List Available Hostnodes Source: https://dashboard.tensordock.com/api/docs/fetch-hostnodes Fetch a list of all available hostnodes with their resources, pricing, and location information. Use this when you need to deploy to a specific hostnode. ```APIDOC ## GET /api/v2/hostnodes ### Description Fetches a list of all available hostnodes, including their resources, pricing, and location details. This endpoint is useful for direct placement control and advanced port configuration. ### Method GET ### Endpoint /api/v2/hostnodes ### Parameters #### Query Parameters - **location** (string) - Optional. Filter by location UUID. - **minRamGb** (integer) - Optional. Minimum available RAM in GB. - **minVcpu** (integer) - Optional. Minimum available vCPUs. - **gpu** (string) - Optional. Filter by GPU type (e.g., "h100-sxm5-80gb"). ### Response #### Success Response (200) (Response structure for hostnodes is not detailed in the provided text, but it would typically include details about each hostnode, its resources, pricing, and associated location.) ### Response Example (No example provided in the source text.) ``` -------------------------------- ### List Available Locations API Endpoint Source: https://dashboard.tensordock.com/api/docs/fetch-hostnodes Use this endpoint to fetch all available deployment locations, including their GPU offerings and deployable resources. This is useful for automatic hostnode selection. ```bash GET/api/v2/locations ``` -------------------------------- ### List Available Locations Source: https://dashboard.tensordock.com/api/docs/fetch-hostnodes Fetch all locations with their available GPU configurations and deployable resources. Use this to find the best location for your workload. ```APIDOC ## GET /api/v2/locations ### Description Fetches a list of all available deployment locations, including their GPU offerings and maximum deployable resources. ### Method GET ### Endpoint /api/v2/locations ### Response #### Success Response (200) - **data** (object) - Contains a list of locations. - **locations** (array) - An array of location objects. - **id** (string) - Unique identifier for the location. - **city** (string) - The city of the location. - **stateprovince** (string) - The state or province of the location. - **country** (string) - The country of the location. - **tier** (integer) - The tier of the location. - **gpus** (array) - A list of available GPU configurations at this location. - **v0Name** (string) - The internal name of the GPU. - **displayName** (string) - The user-friendly name of the GPU. - **max_count** (integer) - The maximum number of this GPU type available. - **price_per_hr** (number) - The cost of this GPU per hour. - **resources** (object) - The resource limits for this GPU type. - **max_vcpus** (integer) - Maximum vCPUs available. - **max_ram_gb** (integer) - Maximum RAM in GB available. - **max_storage_gb** (integer) - Maximum storage in GB available. - **pricing** (object) - Additional pricing details. - **per_vcpu_hr** (number) - Cost per vCPU per hour. - **per_gb_ram_hr** (number) - Cost per GB of RAM per hour. - **per_gb_storage_hr** (number) - Cost per GB of storage per hour. - **network_features** (object) - Available network features. - **dedicated_ip_available** (boolean) - Whether dedicated IPs are available. - **port_forwarding_available** (boolean) - Whether port forwarding is available. - **network_storage_available** (boolean) - Whether network storage is available. ### Response Example ```json { "data": { "locations": [ { "id": "loc-uuid-12345", "city": "Austin", "stateprovince": "Texas", "country": "United States", "tier": 3, "gpus": [ { "v0Name": "h100-sxm5-80gb", "displayName": "H100 SXM5 80GB", "max_count": 8, "price_per_hr": 2.2, "resources": { "max_vcpus": 128, "max_ram_gb": 300, "max_storage_gb": 1000 }, "pricing": { "per_vcpu_hr": 0.003, "per_gb_ram_hr": 0.002, "per_gb_storage_hr": 0.00005 }, "network_features": { "dedicated_ip_available": true, "port_forwarding_available": true, "network_storage_available": false } } ] } ] } } ``` ``` -------------------------------- ### Successful Instance Creation Response Source: https://dashboard.tensordock.com/api/docs/instance-creation A successful instance creation request returns this JSON object, including the instance ID and its initial status. ```json { "data": { "type": "virtualmachine", "id": "instance-uuid", "name": "my-ubuntu-instance", "status": "running" } } ``` -------------------------------- ### List Available Hostnodes API Endpoint Source: https://dashboard.tensordock.com/api/docs/fetch-hostnodes Fetch a list of all available hostnodes. This endpoint can be filtered by location, minimum RAM, minimum vCPUs, and GPU type for direct placement control. ```bash GET/api/v2/hostnodes ``` -------------------------------- ### Stop Instance Source: https://dashboard.tensordock.com/api/docs/instance-management Stops a running virtual machine instance. ```APIDOC ## POST /api/v2/instances/{id}/stop ### Description Stop a running instance. ### Method POST ### Endpoint /api/v2/instances/{id}/stop ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the instance to stop. ### Response #### Success Response (200) - **data** (object) - Contains instance status information. - **type** (string) - The type of the resource (e.g., "instance"). - **id** (string) - The unique identifier for the instance. - **attributes** (object) - Contains instance attributes. - **status** (string) - The status of the instance, which will be "stopping". ### Response Example ```json { "data": { "type": "instance", "id": "550e8400-e29b-41d4-a716-446655440000", "attributes": { "status": "stopping" } } } ``` ``` -------------------------------- ### Modify Instance Resources Source: https://dashboard.tensordock.com/api/docs/instance-management Update the resources (CPU, RAM, storage, GPU) of a stopped or stopped-disassociated instance. The instance must be in a 'Stopped' or 'StoppedDisassociated' state. Storage can only be increased. CPU cores must be in steps of 2, RAM in specified increments, and storage in steps of 50GB. ```json { "cpuCores": 8, "ramGb": 32, "diskGb": 200, "gpus": { "gpuV0Name": "geforcertx4090-pcie-24gb", "count": 1 } } ``` -------------------------------- ### Delete Instance Source: https://dashboard.tensordock.com/api/docs/instance-management Deletes a virtual machine instance and all its associated resources. ```APIDOC ## DELETE /api/v2/instances/{id} ### Description Delete an instance and its associated resources. ### Method DELETE ### Endpoint /api/v2/instances/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the instance to delete. ### Response #### Success Response (200) - **data** (object) - Contains a success message. - **type** (string) - The type of the resource (e.g., "success"). - **attributes** (object) - Contains additional attributes. - **message** (string) - Confirmation message indicating successful deletion. ### Response Example ```json { "data": { "type": "success", "attributes": { "message": "Instance deleted successfully" } } } ``` ``` -------------------------------- ### List Hostnodes Source: https://dashboard.tensordock.com/api/docs/fetch-hostnodes Retrieve a list of all available hostnodes. This response includes basic information about each hostnode, such as its ID, location, engine, uptime, and available resources. ```json { "data": { "hostnodes": [ { "id": "hostnode-uuid", "location_id": "location-uuid", "engine": "Narwhal", "uptime_percentage": 99.79, "available_resources": { "gpus": [ { "v0Name": "h100-sxm5-80gb", "availableCount": 8, "price_per_hr": 2.2 } ], "vcpu_count": 208, "ram_gb": 990, "storage_gb": 14780, "has_public_ip_available": true }, "pricing": { "per_vcpu_hr": 0.0015, "per_gb_ram_hr": 0.0007, "per_gb_storage_hr": 0.00005 }, "location": { "uuid": "location-uuid", "city": "Austin", "stateprovince": "Texas", "country": "United States", "has_network_storage": false, "network_speed_gbps": 10, "network_speed_upload_gbps": 10, "organization": "organization-uuid", "organizationName": "DataCenter Corp", "tier": 3 } } ] } } ``` -------------------------------- ### Create Secret Source: https://dashboard.tensordock.com/api/docs/secrets Create a new secret in your organization. Secrets are encrypted at rest and in transit. ```APIDOC ## POST /api/v2/secrets ### Description Create a new secret in your organization. ### Method POST ### Endpoint /api/v2/secrets ### Request Body - **data** (object) - Required - The payload for creating a secret. - **type** (string) - Required - Must be "secret". - **attributes** (object) - Required - Contains the secret's details. - **name** (string) - Required - The name of the secret. - **value** (string) - Required - The value of the secret. - **type** (string) - Required - The type of the secret (e.g., "SSHKEY", "GENERIC"). ### Request Example ```json { "data": { "type": "secret", "attributes": { "name": "string", "value": "string", "type": "SSHKEY" } } } ``` ### Response #### Success Response (200) - **data** (object) - Contains the created secret details. - **type** (string) - The type of the secret. - **id** (string) - The unique identifier for the secret. - **name** (string) - The name of the secret. ### Response Example ```json { "data": { "type": "secret", "id": "string", "name": "string" } } ``` ``` -------------------------------- ### Stop a Running Instance Source: https://dashboard.tensordock.com/api/docs/instance-management Terminate the operation of a running virtual machine instance. Requires the instance ID. ```http POST/api/v2/instances/{id}/stop ``` -------------------------------- ### Delete an Instance Source: https://dashboard.tensordock.com/api/docs/instance-management Permanently remove a virtual machine instance and all its associated resources. Requires the instance ID. ```http DELETE/api/v2/instances/{id} ``` -------------------------------- ### List All Secrets Source: https://dashboard.tensordock.com/api/docs/secrets Retrieve a list of all secrets configured for your organization. This includes their type, ID, and name. The actual values of secrets are not returned in this list. ```http GET/api/v2/secrets ``` -------------------------------- ### Authenticate API Request with Bearer Token Source: https://dashboard.tensordock.com/api/docs/getting-started Use this cURL command to authenticate your API requests by including your Bearer token in the Authorization header. Store API tokens as environment variables and avoid committing them to version control. ```bash curl -X GET "https://dashboard.tensordock.com/api/v2/instances" \ -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### Modify Instance Source: https://dashboard.tensordock.com/api/docs/instance-management Modifies the resources (CPU, RAM, Disk) of a stopped or stopped-disassociated instance. ```APIDOC ## PUT /api/v2/instances/{id}/modify ### Description Modify the resources of a stopped or stopped-disassociated instance. ### Method PUT ### Endpoint /api/v2/instances/{id}/modify ### Requirements - **Instance Status**: Instance must be in 'Stopped' or 'StoppedDisassociated' state. - **Resource Steps**: CPU cores: steps of 2. RAM (GB): 2, 4, 6, 8, 10, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, 512. Storage: steps of 50GB (min 100GB). - **Storage Limitation**: Storage can only be increased, never decreased. ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the instance to modify. ### Request Body - **cpuCores** (number) - Optional - The desired number of CPU cores. - **ramGb** (number) - Optional - The desired amount of RAM in GB. - **diskGb** (number) - Optional - The desired amount of storage in GB. - **gpus** (object) - Optional - GPU configuration. - **gpuV0Name** (string) - The v0 name of the GPU model. - **count** (number) - The number of GPUs to allocate. ### Request Example ```json { "cpuCores": 8, "ramGb": 32, "diskGb": 200, "gpus": { "gpuV0Name": "geforcertx4090-pcie-24gb", "count": 1 } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating successful modification. ### Response Example ```json { "message": "Instance modified successfully" } ``` ``` -------------------------------- ### List Secrets Source: https://dashboard.tensordock.com/api/docs/secrets Retrieve all secrets for your organization. Secrets are encrypted at rest and in transit. SSH keys are used for instance authentication, while SECRET types store sensitive values that are never returned via the API. ```APIDOC ## GET /api/v2/secrets ### Description Retrieve all secrets for your organization. ### Method GET ### Endpoint /api/v2/secrets ### Response #### Success Response (200) - **data** (object) - Contains a list of secrets. - **secrets** (array) - A list of secret objects. - **type** (string) - The type of the secret (e.g., "GENERIC", "SSHKEY"). - **id** (string) - The unique identifier for the secret. - **name** (string) - The name of the secret. ### Response Example ```json { "data": { "secrets": [ { "type": "GENERIC", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "API Key" }, { "type": "SSHKEY", "id": "550e8400-e29b-41d4-a716-446655440001", "name": "Production SSH Key" } ] } } ``` ``` -------------------------------- ### Create a New Secret Source: https://dashboard.tensordock.com/api/docs/secrets Create a new secret, such as an SSH key or a generic sensitive value. The 'value' field is required for secrets of type 'SSHKEY' and 'GENERIC'. For 'SECRET' types, the value is not returned via the API. ```json { "data": { "type": "secret", "attributes": { "name": "string", "value": "string", "type": "SSHKEY" } } } ``` -------------------------------- ### Delete a Secret Source: https://dashboard.tensordock.com/api/docs/secrets Remove a secret from your organization using its ID. This action is irreversible. ```http DELETE/api/v2/secrets/{id} ``` -------------------------------- ### Delete Secret Source: https://dashboard.tensordock.com/api/docs/secrets Delete a secret from your organization. ```APIDOC ## DELETE /api/v2/secrets/{id} ### Description Delete a secret from your organization. ### Method DELETE ### Endpoint /api/v2/secrets/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the secret to delete. ### Response #### Success Response (200) - **data** (object) - Contains a success message. - **type** (string) - Indicates the type of response, e.g., "success". - **message** (string) - A confirmation message, e.g., "Secret deleted successfully". ### Response Example ```json { "data": { "type": "success", "message": "Secret deleted successfully" } } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.