### Start Instance Source: https://api-docs.virakcloud.com/index Starts a stopped virtual machine instance. ```APIDOC ## POST /zone/{zoneId}/instance/{instanceId}/start ### Description Starts a stopped virtual machine instance. ### Method POST ### Endpoint /zone/{zoneId}/instance/{instanceId}/start ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone containing the instance. - **instanceId** (string) - Required - The ID of the instance to start. ### Response #### Success Response (200) - **status** (string) - The updated status of the instance (e.g., 'Starting'). #### Response Example { "status": "Starting" } ``` -------------------------------- ### Example Request and Response Source: https://api-docs.virakcloud.com/index Provides an example of a cURL request and its expected response for interacting with the API. ```APIDOC ## Code Snippet (Collapsed) ### Curl ```bash curl -X GET "https://virakcloud.com/api/some-endpoint?enabled=true&key=example_key&value=example_value" ``` ### Response ```json { "message": "Success!", "data": {} } ``` ### Error Handling ```json { "error": "Invalid parameter provided." } ``` ``` -------------------------------- ### Start Kubernetes Cluster Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Starts a Kubernetes cluster that is currently in a stopped state. ```APIDOC ## Start Kubernetes Cluster ### Description Start a stopped Kubernetes cluster. ### Method POST ### Endpoint /zone/{zone_id}/kubernetes/{cluster_id}/start ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone containing the cluster. - **cluster_id** (string) - Required - The ID of the cluster to start. ### Response #### Success Response (200 OK) - **success** (boolean) - Indicates if the start request was successful. - **status** (string) - The new status of the cluster (e.g., Starting). - **message** (string) - A message describing the status. #### Response Example ```json { "success": true, "status": "Starting", "message": "Cluster is starting" } ``` ``` -------------------------------- ### Start Instance using cURL Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Powers on a stopped virtual machine instance. This operation is a POST request to the instance's start endpoint and requires an authorization token. ```bash # Start instance curl -X POST https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-002/start \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Start Kubernetes Cluster Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Initiates the startup process for a stopped Kubernetes cluster. Requires the zone ID and cluster ID. Returns a success message and the new status. ```bash # Start cluster curl -X POST https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/kubernetes/k8s-001/start \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Kubernetes Cluster Actions Source: https://api-docs.virakcloud.com/index Endpoints for performing actions on Kubernetes clusters such as starting, stopping, and scaling. ```APIDOC ## Start Kubernetes Cluster ### Description Starts a stopped Kubernetes cluster. ### Method POST ### Endpoint `/zone/{zoneId}/kubernetes/{clusterId}/start` ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone the cluster is in. - **clusterId** (string) - Required - The ID of the Kubernetes cluster to start. ### Response #### Success Response (200) - **id** (string) - The ID of the cluster. - **status** (string) - The new status of the cluster (e.g., Starting). #### Response Example ```json { "id": "cls-12345", "status": "Starting" } ``` ``` ```APIDOC ## Stop Kubernetes Cluster ### Description Stops a running Kubernetes cluster. ### Method POST ### Endpoint `/zone/{zoneId}/kubernetes/{clusterId}/stop` ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone the cluster is in. - **clusterId** (string) - Required - The ID of the Kubernetes cluster to stop. ### Response #### Success Response (200) - **id** (string) - The ID of the cluster. - **status** (string) - The new status of the cluster (e.g., Stopping). #### Response Example ```json { "id": "cls-12345", "status": "Stopping" } ``` ``` ```APIDOC ## Scale Kubernetes Cluster ### Description Adjusts the number of nodes in a Kubernetes cluster. ### Method POST ### Endpoint `/zone/{zoneId}/kubernetes/{clusterId}/scale` ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone the cluster is in. - **clusterId** (string) - Required - The ID of the Kubernetes cluster to scale. #### Request Body - **scale** (integer) - Required - The desired number of nodes for the cluster. ### Request Example ```json { "scale": 5 } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the cluster. - **status** (string) - The status of the scaling operation (e.g., Scaling). #### Response Example ```json { "id": "cls-12345", "status": "Scaling" } ``` ``` -------------------------------- ### Get Instance Details Source: https://api-docs.virakcloud.com/index Retrieves detailed information about a specific instance, including its configuration, status, and associated resources. ```APIDOC ## GET /zone/{zoneId}/instance/{instanceId} ### Description Retrieves detailed information about a specific instance. ### Method GET ### Endpoint /zone/{zoneId}/instance/{instanceId} ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone containing the instance. - **instanceId** (string) - Required - The ID of the instance to retrieve details for. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the instance. - **name** (string) - The name of the instance. - **status** (string) - The current status of the instance. - **zoneId** (string) - The ID of the zone. - **serviceOfferingId** (string) - The ID of the service offering. - **vmImageId** (string) - The ID of the VM image. - **volumes** (array) - A list of attached volumes. - **metadata** (object) - Custom key-value data associated with the instance. #### Response Example { "id": "inst-1234abcd", "name": "my-web-server", "status": "Running", "zoneId": "zone-abcdef12", "serviceOfferingId": "so-1234abcd", "vmImageId": "img-abcdef12", "volumes": [ { "id": "vol-abcdef12", "name": "boot-volume", "size": 50, "type": "SSD" } ], "metadata": { "environment": "production", "app_version": "1.2.0" } } ``` -------------------------------- ### GET /zone/{zoneId}/instance Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieve all virtual machine instances in a specific zone. ```APIDOC ## List Instances Retrieve all virtual machine instances in a specific zone. ### Method GET ### Endpoint /zone/{zoneId}/instance ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone to list instances from. #### Headers - **Authorization** (string) - Required - Bearer YOUR_SECRET_TOKEN ### Request Example ```bash curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **data** (array) - List of virtual machine instances. - **id** (string) - Unique identifier for the instance. - **name** (string) - Name of the instance. - **status** (string) - Current status of the instance (e.g., Running, Stopped). - **ip_address** (string) - Private IP address of the instance. - **public_ip** (string) - Public IP address of the instance. - **cpu** (integer) - Number of CPU cores allocated. - **memory** (integer) - Amount of memory allocated (MB). - **disk** (integer) - Size of the disk allocated (GB). #### Response Example ```json { "data": [ { "id": "vm-001", "name": "web-server-01", "status": "Running", "ip_address": "10.0.1.5", "public_ip": "203.0.113.10", "cpu": 4, "memory": 8192, "disk": 100 } ] } ``` ``` -------------------------------- ### Retrieve Customer Resource Quotas for a Zone via Virak Cloud API Source: https://context7.com/context7/api-docs_virakcloud/llms.txt This example demonstrates how to fetch resource allocation and usage statistics for a specific zone. It uses `curl` with authentication and returns a JSON object detailing quotas for various resources like memory, CPU, and disk. ```bash # Check resource limits and usage curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/resources \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' # Response with quotas { "instance_resource_collected": { "memory": { "collected": 0, "total": 40960 }, "cpunumber": { "collected": 0, "total": 40 }, "datavolume": { "collected": 10, "total": 200 }, "vmlimit": { "collected": 0, "total": 20 } } } ``` -------------------------------- ### GET /zone/{zone_id}/instance/{instance_id} Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieve detailed information about a specific virtual machine instance. ```APIDOC ## Get Instance Details ### Description Retrieve detailed information about a specific instance. ### Method GET ### Endpoint `/zone/{zone_id}/instance/{instance_id}` ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone where the instance is located. - **instance_id** (string) - Required - The ID of the instance to retrieve. ### Request Example ```bash curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-002 \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the instance. - **name** (string) - The name of the instance. - **status** (string) - The current status of the instance (e.g., Running, Starting, Stopped). - **ip_address** (string) - The private IP address of the instance. - **public_ip** (string) - The public IP address of the instance. - **cpu** (integer) - The number of CPU cores allocated to the instance. - **memory** (integer) - The amount of memory (in MB) allocated to the instance. - **disk** (integer) - The size of the primary disk (in GB). - **created_at** (string) - The timestamp when the instance was created. - **zone_id** (string) - The ID of the zone the instance belongs to. #### Response Example ```json { "id": "vm-002", "name": "api-server-01", "status": "Running", "ip_address": "10.0.1.6", "public_ip": "203.0.113.11", "cpu": 4, "memory": 8192, "disk": 100, "created_at": "2025-10-13T10:00:00Z", "zone_id": "01F8MECHZX3TBDSZ7XRADM79XE" } ``` ``` -------------------------------- ### GET /zone/{zone_id}/instance/{instance_id}/metrics Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieve performance metrics for CPU, memory, and network usage of an instance. ```APIDOC ## Get Instance Metrics ### Description Retrieve performance metrics for CPU, memory, and network usage. ### Method GET ### Endpoint `/zone/{zone_id}/instance/{instance_id}/metrics` ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone where the instance is located. - **instance_id** (string) - Required - The ID of the instance to get metrics for. ### Request Example ```bash curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-001/metrics \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **cpu_usage** (float) - Percentage of CPU utilization. - **memory_usage** (float) - Percentage of memory utilization. - **network_in** (integer) - Incoming network traffic in bytes. - **network_out** (integer) - Outgoing network traffic in bytes. - **disk_read** (integer) - Disk read operations in bytes. - **disk_write** (integer) - Disk write operations in bytes. #### Response Example ```json { "cpu_usage": 45.2, "memory_usage": 62.5, "network_in": 1024000, "network_out": 512000, "disk_read": 204800, "disk_write": 102400 } ``` ``` -------------------------------- ### GET /zones Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieve all available data center zones with their active status and locations. ```APIDOC ## List Available Zones Retrieve all available data center zones with their active status and locations. ### Method GET ### Endpoint /zones ### Parameters #### Headers - **Authorization** (string) - Required - Bearer YOUR_SECRET_TOKEN ### Request Example ```bash curl https://public-api.virakcloud.com/zones \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **data** (array) - List of available zones. - **id** (string) - Unique identifier for the zone. - **name** (string) - Name of the zone (e.g., US-East-1). - **location** (string) - Physical location of the zone (e.g., New York). - **active** (boolean) - Indicates if the zone is currently active. #### Response Example ```json { "data": [ { "id": "01F8MECHZX3TBDSZ7XRADM79XE", "name": "US-East-1", "location": "New York", "active": true }, { "id": "01F8MECHZX3TBDSZ7XRADM79XF", "name": "EU-West-1", "location": "Frankfurt", "active": true } ] } ``` ``` -------------------------------- ### Get Instance Details using cURL Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieves detailed information about a specific virtual machine instance using its ID. This command requires an API token for authorization and specifies the zone and instance ID in the URL. ```bash # Get instance by ID curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-002 \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Example API Response - Event Data Source: https://context7.com/context7/api-docs_virakcloud/llms.txt This JSON structure represents a typical response from the Virak Cloud API, containing a list of events. Each event object details an action, its resource, status, and creation timestamp. This data is useful for monitoring and auditing. ```json { "data": [ { "id": "evt-001", "type": "instance.created", "resource_id": "vm-001", "resource_type": "Instance", "status": "Success", "message": "Instance created successfully", "created_at": "2025-10-13T10:00:00Z" }, { "id": "evt-002", "type": "network.firewall.rule.added", "resource_id": "net-001", "resource_type": "Network", "status": "Success", "message": "Firewall rule added", "created_at": "2025-10-13T11:30:00Z" } ] } ``` -------------------------------- ### List Virtual Machine Instances in a Zone via Virak Cloud API Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Shows how to retrieve a list of all virtual machine instances within a specific zone. This `curl` GET request requires the zone ID and Bearer token authentication, returning a JSON array with details for each instance. ```bash # Get all instances in zone curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' # Response with instance details { "data": [ { "id": "vm-001", "name": "web-server-01", "status": "Running", "ip_address": "10.0.1.5", "public_ip": "203.0.113.10", "cpu": 4, "memory": 8192, "disk": 100 } ] } ``` -------------------------------- ### List Network Instances (curl) Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieves a list of all instances connected to a specific network. This GET request requires an Authorization header and returns instance details including ID, name, and IP address. ```bash # List connected instances curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/network/net-001/instance \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### List Instance Volumes using cURL Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieves a list of all data volumes available in a specific zone, including their status and attachment information. This GET request to the instance volumes endpoint requires an authorization token. ```bash # List volumes curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/volumes \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Get Object Storage Bucket Details Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Fetches detailed information about a specific object storage bucket. Requires the zone ID and bucket ID. Returns comprehensive details including size, object count, and creation timestamp. ```bash # Get bucket details curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/object-storage/buckets/bucket-001 \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Authenticate with Virak Cloud API using Bearer Token Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Demonstrates how to authenticate API requests using a Bearer token. This is a prerequisite for accessing all API endpoints. The example uses `curl` and shows the expected JSON response format for successful authentication (implicitly via accessing a protected resource like zones). ```bash # Generate token from dashboard, then use in all requests curl https://public-api.virakcloud.com/zones \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' # Response format { "data": [...] } ``` -------------------------------- ### POST /zone/{zone_id}/instance/{instance_id}/start Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Power on a stopped virtual machine instance. ```APIDOC ## Start Instance ### Description Power on a stopped virtual machine instance. ### Method POST ### Endpoint `/zone/{zone_id}/instance/{instance_id}/start` ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone where the instance is located. - **instance_id** (string) - Required - The ID of the instance to start. ### Request Example ```bash curl -X POST https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-002/start \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **status** (string) - The new status of the instance (e.g., Starting). - **message** (string) - A confirmation message. #### Response Example ```json { "success": true, "status": "Starting", "message": "Instance is starting" } ``` ``` -------------------------------- ### GET /user/ssh-key Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Get all SSH keys associated with the authenticated user account. ```APIDOC ## List User SSH Keys Get all SSH keys associated with the authenticated user account. ### Method GET ### Endpoint /user/ssh-key ### Parameters #### Headers - **Authorization** (string) - Required - Bearer YOUR_SECRET_TOKEN ### Request Example ```bash curl https://public-api.virakcloud.com/user/ssh-key \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **data** (array) - List of SSH keys. - **id** (string) - Unique identifier for the SSH key. - **name** (string) - Name of the SSH key. - **fingerprint** (string) - Fingerprint of the public key. - **public_key** (string) - The public key string. #### Response Example ```json { "data": [ { "id": "key-123", "name": "production-key", "fingerprint": "SHA256: sooner later", "public_key": "ssh-rsa AAAAB3NzaC1yc2E..." } ] } ``` ``` -------------------------------- ### GET /zone/{zone_id}/instance/volumes Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Get all data volumes in a zone that can be attached to instances. ```APIDOC ## List Instance Volumes ### Description Get all data volumes in a zone that can be attached to instances. ### Method GET ### Endpoint `/zone/{zone_id}/instance/volumes` ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone to list volumes from. ### Request Example ```bash curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/volumes \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **data** (array) - A list of volume objects. - **id** (string) - The unique identifier of the volume. - **name** (string) - The name of the volume. - **size** (integer) - The size of the volume in GB. - **status** (string) - The current status of the volume (e.g., Ready, Attaching). - **attached_to** (string|null) - The ID of the instance the volume is attached to, or null if not attached. #### Response Example ```json { "data": [ { "id": "vol-001", "name": "data-volume-01", "size": 100, "status": "Ready", "attached_to": null } ] } ``` ``` -------------------------------- ### POST /zone/{zone_id}/instance/{instance_id}/snapshot Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Create a point-in-time backup of an instance volume. ```APIDOC ## Create Instance Snapshot ### Description Create a point-in-time backup of an instance volume. ### Method POST ### Endpoint `/zone/{zone_id}/instance/{instance_id}/snapshot` ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone where the instance is located. - **instance_id** (string) - Required - The ID of the instance to snapshot. #### Request Body - **name** (string) - Required - The name for the snapshot. - **description** (string) - Optional - A description for the snapshot. ### Request Example ```bash curl -X POST https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-001/snapshot \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "name": "before-upgrade-snapshot", "description": "Backup before system upgrade" }' ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the snapshot. - **name** (string) - The name of the snapshot. - **status** (string) - The current status of the snapshot creation (e.g., Creating). - **created_at** (string) - The timestamp when the snapshot creation was initiated. #### Response Example ```json { "id": "snap-001", "name": "before-upgrade-snapshot", "status": "Creating", "created_at": "2025-10-13T12:00:00Z" } ``` ``` -------------------------------- ### Create Instance Source: https://api-docs.virakcloud.com/index Provisions a new virtual machine instance in a specified zone with the given configuration. ```APIDOC ## POST /zone/{zoneId}/instance ### Description Creates a new virtual machine instance in a specified zone. ### Method POST ### Endpoint /zone/{zoneId}/instance ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone where the instance will be created. #### Request Body - **name** (string) - Required - The desired name for the new instance. - **serviceOfferingId** (string) - Required - The ID of the service offering to use for the instance. - **vmImageId** (string) - Required - The ID of the VM image to use for the instance. - **volumeId** (string) - Optional - The ID of an existing volume to attach to the instance. - **metadata** (object) - Optional - Key-value pairs for custom metadata. ### Request Example { "name": "new-app-server", "serviceOfferingId": "so-abcdef12", "vmImageId": "img-1234abcd", "metadata": { "environment": "production" } } ### Response #### Success Response (201) - **id** (string) - The unique identifier of the newly created instance. - **name** (string) - The name of the instance. - **status** (string) - The initial status of the instance. - **zoneId** (string) - The ID of the zone where the instance was created. #### Response Example { "id": "inst-fedcba98", "name": "new-app-server", "status": "Starting", "zoneId": "zone-abcdef12" } ``` -------------------------------- ### GET /zone/{zone_id}/kubernetes Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieves a list of all Kubernetes clusters available within a specific zone. This endpoint is used to get an overview of managed Kubernetes services. ```APIDOC ## List Kubernetes Clusters Retrieve all Kubernetes clusters in a zone. ### Method GET ### Endpoint /zone/{zone_id}/kubernetes ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone. ### Response #### Success Response (200) - **data** (array) - A list of Kubernetes cluster objects. (Note: The exact structure of the cluster objects is not detailed in the provided text, but would typically include cluster name, status, version, etc.) #### Response Example ```json { "data": [ // Array of Kubernetes cluster objects ] } ``` ``` -------------------------------- ### Create a New Virtual Machine Instance in Virak Cloud API Source: https://context7.com/context7/api-docs_virakcloud/llms.txt This `curl` POST request demonstrates how to provision a new virtual machine instance with a specified configuration. It requires the zone ID, Bearer token authentication, and a JSON payload containing instance details like name, service offering, image, and network. ```bash # Create new instance curl -X POST https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "name": "api-server-01", "service_offering_id": "so-medium-001", "vm_image_id": "img-ubuntu-2204", "ssh_key_ids": ["key-123"], "network_id": "net-001" }' ``` -------------------------------- ### POST /zone/{zoneId}/instance Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Provision a new virtual machine instance with specified configuration. ```APIDOC ## Create Instance Provision a new virtual machine instance with specified configuration. ### Method POST ### Endpoint /zone/{zoneId}/instance ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone where the instance will be created. #### Headers - **Authorization** (string) - Required - Bearer YOUR_SECRET_TOKEN - **Content-Type** (string) - Required - application/json #### Request Body - **name** (string) - Required - The desired name for the new instance. - **service_offering_id** (string) - Required - The ID of the service offering (e.g., VM size). - **vm_image_id** (string) - Required - The ID of the virtual machine image to use. - **ssh_key_ids** (array of strings) - Required - A list of SSH key IDs to associate with the instance. - **network_id** (string) - Required - The ID of the network to connect the instance to. ### Request Example ```json { "name": "api-server-01", "service_offering_id": "so-medium-001", "vm_image_id": "img-ubuntu-2204", "ssh_key_ids": ["key-123"], "network_id": "net-001" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the newly created instance. - **name** (string) - The name of the instance. - **status** (string) - The initial status of the instance (e.g., Provisioning). - **cpu** (integer) - Number of CPU cores. - **memory** (integer) - Memory allocated (MB). - **disk** (integer) - Disk size (GB). #### Response Example ```json { "id": "vm-002", "name": "api-server-01", "status": "Provisioning", "cpu": 2, "memory": 4096, "disk": 50 } ``` ``` -------------------------------- ### Get Instance Metrics using cURL Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieves performance metrics (CPU, memory, network, disk usage) for a specific virtual machine instance. This GET request to the instance's metrics endpoint requires an authorization token. ```bash # Get instance metrics curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-001/metrics \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Get Network Details Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieves detailed information about a specific network. ```APIDOC ## GET /zone/{zone_id}/network/{network_id} ### Description Retrieves detailed information about a specific network. ### Method GET ### Endpoint `/zone/{zone_id}/network/{network_id}` ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone containing the network. - **network_id** (string) - Required - The ID of the network to retrieve details for. ### Request Example ```bash curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/network/net-001 \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **id** (string) - The network ID. - **name** (string) - The network name. - **type** (string) - The network type (L2 or L3). - **cidr** (string) - The CIDR block (for L3 networks). - **gateway** (string) - The gateway IP address (for L3 networks). - **status** (string) - The network status. - **created_at** (string) - The timestamp when the network was created. #### Response Example ```json { "id": "net-001", "name": "app-network", "type": "L3", "cidr": "10.10.0.0/24", "gateway": "10.10.0.1", "status": "Ready", "created_at": "2025-10-13T09:00:00Z" } ``` ``` -------------------------------- ### GET /zone/{zoneId} Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Check which services are available in a specific zone. ```APIDOC ## Get Zone Active Services Check which services are available in a specific zone. ### Method GET ### Endpoint /zone/{zoneId} ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone to query. #### Headers - **Authorization** (string) - Required - Bearer YOUR_SECRET_TOKEN ### Request Example ```bash curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **Instance** (boolean) - Availability of Instance service. - **DataVolume** (boolean) - Availability of DataVolume service. - **Network** (boolean) - Availability of Network service. - **ObjectStorage** (boolean) - Availability of ObjectStorage service. - **K8s** (boolean) - Availability of Kubernetes service. #### Response Example ```json { "Instance": true, "DataVolume": true, "Network": true, "ObjectStorage": true, "K8s": false } ``` ``` -------------------------------- ### Get Kubernetes Cluster Details Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieves detailed information about a specific Kubernetes cluster. ```APIDOC ## Get Kubernetes Cluster Details ### Description Retrieve detailed information about a specific cluster. ### Method GET ### Endpoint /zone/{zone_id}/kubernetes/{cluster_id} ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone containing the cluster. - **cluster_id** (string) - Required - The ID of the cluster to retrieve details for. ### Response #### Success Response (200 OK) - **id** (string) - The ID of the cluster. - **name** (string) - The name of the cluster. - **version** (string) - The Kubernetes version. - **status** (string) - The current status of the cluster. - **node_count** (integer) - The number of nodes. - **endpoint** (string) - The API endpoint for the cluster. - **created_at** (string) - The timestamp when the cluster was created. #### Response Example ```json { "id": "k8s-001", "name": "production-cluster", "version": "1.28.0", "status": "Running", "node_count": 3, "endpoint": "https://k8s-001.virakcloud.com", "created_at": "2025-09-01T10:00:00Z" } ``` ``` -------------------------------- ### Create Snapshot Source: https://api-docs.virakcloud.com/index Creates a point-in-time snapshot of an instance's volume. ```APIDOC ## POST /zone/{zoneId}/instance/{instanceId}/snapshot ### Description Creates a point-in-time snapshot of an instance's volume. ### Method POST ### Endpoint /zone/{zoneId}/instance/{instanceId}/snapshot ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone containing the instance. - **instanceId** (string) - Required - The ID of the instance to create a snapshot for. #### Request Body - **snapshotName** (string) - Required - The name for the new snapshot. ### Request Example { "snapshotName": "my-app-backup-20231027" } ### Response #### Success Response (201) - **snapshotId** (string) - The unique identifier of the created snapshot. - **snapshotName** (string) - The name of the created snapshot. - **createdAt** (string) - The timestamp when the snapshot was created. #### Response Example { "snapshotId": "snap-abcdef12", "snapshotName": "my-app-backup-20231027", "createdAt": "2023-10-27T10:00:00Z" } ``` -------------------------------- ### POST /zone/{zone_id}/instance/{instance_id}/reboot Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Restart a running virtual machine instance. ```APIDOC ## Reboot Instance ### Description Restart a running virtual machine instance. ### Method POST ### Endpoint `/zone/{zone_id}/instance/{instance_id}/reboot` ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone where the instance is located. - **instance_id** (string) - Required - The ID of the instance to reboot. ### Request Example ```bash curl -X POST https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-002/reboot \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A confirmation message. #### Response Example ```json { "success": true, "message": "Instance is rebooting" } ``` ``` -------------------------------- ### GET /zone/{zoneId}/resources Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Retrieve resource allocation and usage statistics for a zone. ```APIDOC ## Get Customer Resource Quotas Retrieve resource allocation and usage statistics for a zone. ### Method GET ### Endpoint /zone/{zoneId}/resources ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone to query. #### Headers - **Authorization** (string) - Required - Bearer YOUR_SECRET_TOKEN ### Request Example ```bash curl https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/resources \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **instance_resource_collected** (object) - Resource usage and limits for instances. - **memory** (object) - Memory usage and limit. - **collected** (integer) - Currently used memory (MB). - **total** (integer) - Total available memory (MB). - **cpunumber** (object) - CPU core usage and limit. - **collected** (integer) - Currently used CPU cores. - **total** (integer) - Total available CPU cores. - **datavolume** (object) - Data volume usage and limit. - **collected** (integer) - Currently used data volume (GB). - **total** (integer) - Total available data volume (GB). - **vmlimit** (object) - Virtual machine limit. - **collected** (integer) - Currently active VMs. - **total** (integer) - Maximum allowed VMs. #### Response Example ```json { "instance_resource_collected": { "memory": { "collected": 0, "total": 40960 }, "cpunumber": { "collected": 0, "total": 40 }, "datavolume": { "collected": 10, "total": 200 }, "vmlimit": { "collected": 0, "total": 20 } } } ``` ``` -------------------------------- ### List Instances Source: https://api-docs.virakcloud.com/index Retrieves a list of all instances provisioned in a specified zone for the authenticated user. ```APIDOC ## GET /zone/{zoneId}/instance ### Description Lists all instances in a specified zone for the authenticated user. ### Method GET ### Endpoint /zone/{zoneId}/instance ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone to list instances from. ### Response #### Success Response (200) - **instances** (array) - A list of instance objects. - **id** (string) - The unique identifier of the instance. - **name** (string) - The name of the instance. - **status** (string) - The current status of the instance (e.g., 'Running', 'Stopped'). - **zoneId** (string) - The ID of the zone where the instance is located. - **serviceOfferingId** (string) - The ID of the service offering. - **vmImageId** (string) - The ID of the VM image used. #### Response Example { "instances": [ { "id": "inst-1234abcd", "name": "my-web-server", "status": "Running", "zoneId": "zone-abcdef12", "serviceOfferingId": "so-1234abcd", "vmImageId": "img-abcdef12" } ] } ``` -------------------------------- ### Create Instance Snapshot using cURL Source: https://context7.com/context7/api-docs_virakcloud/llms.txt Creates a point-in-time backup of an instance's volume. This POST request to the instance's snapshot endpoint requires an authorization token and a JSON payload with snapshot name and description. ```bash # Create snapshot curl -X POST https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-001/snapshot \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "name": "before-upgrade-snapshot", "description": "Backup before system upgrade" }' ```