### Instance Management - List VM Images and Service Offerings Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Get available VM images and their compatible service offerings. Requires `instance:metrics` ability. ```APIDOC ## GET /zone/{zoneId}/instance/vm-image-service-offerings ### Description Get available VM images and their compatible service offerings. ### Method GET ### Endpoint /zone/{zoneId}/instance/vm-image-service-offerings ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone to retrieve images and offerings from. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-image-service-offerings \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` ### Response #### Success Response (200 OK) - **data** (array) - A list of VM images and their compatible service offerings. - **id** (string) - The unique identifier for the VM image. - **type** (string) - The type of the VM image (e.g., TEMPLATE). - **name** (string) - The name of the VM image. - **is_available** (boolean) - Indicates if the VM image is available. - **ready_to_use_app** (boolean) - Indicates if the VM image is ready to use with an application. - **ready_to_use_app_name** (string) - The name of the application. - **ready_to_use_app_version** (string) - The version of the application. - **os_type** (string) - The operating system type (e.g., linux). - **os_name** (string) - The operating system name (e.g., Ubuntu). - **os_version** (string) - The operating system version (e.g., 22.04). - **hardware_requirement** (object) - Hardware requirements for the VM image. - **cpunumber** (integer) - Number of CPUs. - **cpuspeed** (integer) - CPU speed. - **memory** (integer) - Memory in MB. - **rootdisksize** (integer) - Root disk size in GB. - **category** (string) - The category of the VM image (e.g., GENERAL). #### Response Example ```json { "data": [ { "id": "vm_image_id_1", "type": "TEMPLATE", "name": "Ubuntu 22.04 LTS", "is_available": true, "ready_to_use_app": true, "ready_to_use_app_name": "Docker", "ready_to_use_app_version": "24.0", "os_type": "linux", "os_name": "Ubuntu", "os_version": "22.04", "hardware_requirement": { "cpunumber": 1, "cpuspeed": 1000, "memory": 1024, "rootdisksize": 25 }, "category": "GENERAL" } ] } ``` ``` -------------------------------- ### List VM Images and Service Offerings Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Get a list of available virtual machine images and their compatible service offerings within a specific zone. This endpoint requires the 'instance:metrics' ability. The response details VM image properties like OS type, version, and hardware requirements, along with associated service offering configurations. ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/vm-image-service-offerings \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### Get Wallet Information - Bash Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieves the user's wallet balance, currency, credit limit, and available balance. This endpoint requires the `user:finance:wallet` ability. The response is a JSON object detailing the financial status. ```bash curl -X GET https://public-api.virakcloud.com/user/finance/wallet \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" # Response { "data": { "balance": 1000000, "currency": "IRR", "credit_limit": 500000, "available_balance": 1500000 } } ``` -------------------------------- ### Datacenter Management - Get Zone Active Services Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Check which services are available in a specific zone. Requires `zone:show` ability. ```APIDOC ## GET /zone/{zoneId} ### Description 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 check. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` ### Response #### Success Response (200 OK) - **Instance** (boolean) - Indicates if Instance service is available. - **DataVolume** (boolean) - Indicates if DataVolume service is available. - **Network** (boolean) - Indicates if Network service is available. - **ObjectStorage** (boolean) - Indicates if ObjectStorage service is available. - **K8s** (boolean) - Indicates if Kubernetes service is available. #### Response Example ```json { "Instance": true, "DataVolume": true, "Network": true, "ObjectStorage": true, "K8s": false } ``` ``` -------------------------------- ### Get Zone Active Services Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Check the availability of various services (Instance, DataVolume, Network, ObjectStorage, K8s) within a specific datacenter zone. This requires the 'zone:show' ability. The response is a JSON object indicating the availability of each service. ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### Get User Profile Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieves the profile information for the currently authenticated user. This operation requires the `user:profile` permission. The response includes user details such as ID, name, email, and phone number. ```bash curl -X GET https://public-api.virakcloud.com/user/profile \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### Get HAProxy Statistics using cURL Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Fetches live HAProxy statistics for a load balancer. This operation requires appropriate network abilities. The response includes the last updated timestamp and a list of current rules. ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/network/01H9ZCNF46W6C1EM45T21B6M0G/ha/stat \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### Instance Management - List Instances Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieve all virtual machine instances in a zone. Requires `instance:list` ability. ```APIDOC ## GET /zone/{zoneId}/instance ### Description Retrieve all virtual machine instances in a zone. ### Method GET ### Endpoint /zone/{zoneId}/instance ### Parameters #### Path Parameters - **zoneId** (string) - Required - The ID of the zone to list instances from. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` ### Response #### Success Response (200 OK) - **data** (array) - A list of virtual machine instances. - **id** (string) - The unique identifier for the instance. - **name** (string) - The name of the instance. - **created** (boolean) - Indicates if the instance was created successfully. - **template_id** (string|null) - The ID of the VM template used. - **vm_image** (object) - Details about the VM image. - **id** (string) - The unique identifier for the VM image. - **type** (string) - The type of the VM image (e.g., TEMPLATE). - **name** (string) - The name of the VM image. - **is_available** (boolean) - Indicates if the VM image is available. - **os_type** (string) - The operating system type (e.g., linux). - **os_name** (string) - The operating system name (e.g., Ubuntu). - **os_version** (string) - The operating system version (e.g., 22.04). - **hardware_requirement** (object) - Hardware requirements for the VM image. - **cpunumber** (integer) - Number of CPUs. - **cpuspeed** (integer) - CPU speed. - **memory** (integer) - Memory in MB. - **rootdisksize** (integer) - Root disk size in GB. - **zone** (object) - Details about the zone the instance is in. - **id** (string) - The zone ID. - **name** (string) - The zone name. - **location** (string) - The zone location. - **service_offering** (object) - Details about the service offering. - **id** (string) - The service offering ID. - **name** (string) - The service offering name. - **hardware** (object) - Hardware specifications for the service offering. - **cpu_core** (integer) - Number of CPU cores. - **memory_mb** (integer) - Memory in MB. - **cpu_speed_MHz** (integer) - CPU speed in MHz. - **root_disk_size_gB** (integer) - Root disk size in GB. - **network_rate** (integer) - Network rate. - **disk_iops** (integer) - Disk IOPS. - **hourly_price** (object) - Hourly pricing information. - **up** (integer) - Price for UP. - **down** (integer) - Price for DOWN. - **status** (string) - The current status of the instance (e.g., Running). - **instance_status** (string) - The instance status. - **password** (string) - The instance password (if applicable). - **username** (string) - The instance username. - **created_at** (integer) - Timestamp of creation. - **updated_at** (integer) - Timestamp of last update. #### Response Example ```json { "data": [ { "id": "01H9ZCNF46W6C1EM45T21B6M0I", "name": "web-server-01", "created": true, "template_id": null, "vm_image": { "id": "01H9ZCNF46W6C1EM45T21B6M0H", "type": "TEMPLATE", "name": "Ubuntu 22.04 LTS", "is_available": true, "os_type": "linux", "os_name": "Ubuntu", "os_version": "22.04", "hardware_requirement": { "cpunumber": 1, "cpuspeed": 500, "memory": 512, "rootdisksize": 25 } }, "zone": { "id": "01F8MECHZX3TBDSZ7XRADM79XE", "name": "alborz-1", "location": "Tehran" }, "service_offering": { "id": "01H9ZCNF46W6C1EM45T21B6M0G", "name": "small-1", "hardware": { "cpu_core": 1, "memory_mb": 512, "cpu_speed_MHz": 1000, "root_disk_size_gB": 30, "network_rate": 200, "disk_iops": 2500 }, "hourly_price": { "up": 1000, "down": 800 } }, "status": "Running", "instance_status": "Running", "password": "generatedPassword123", "username": "root", "created_at": 1234567890, "updated_at": 1234567890 } ] } ``` ``` -------------------------------- ### List Kubernetes Service Offerings Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieves a list of available Kubernetes node service offerings. This operation requires the `kubernetes:service-offerings:list` permission. The response includes details about each offering, such as name, pricing, and hardware specifications. ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/kubernetes/service-offerings \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### POST /zone/{zone_id}/instance/{instance_id}/rebuild Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Rebuilds an existing instance with a new VM image. Requires the `instance:rebuild` ability. ```APIDOC ## POST /zone/{zone_id}/instance/{instance_id}/rebuild ### Description Rebuilds an existing instance with a new VM image. Requires `instance:rebuild` ability. ### Method POST ### Endpoint /zone/{zone_id}/instance/{instance_id}/rebuild ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone where the instance resides. - **instance_id** (string) - Required - The ID of the instance to rebuild. #### Request Body - **vm_image_id** (string) - Required - The ID of the new VM image to use for rebuilding. ### Request Example ```json { "vm_image_id": "01H9ZCNF46W6C1EM45T21B6M0H" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the rebuild operation was successful. #### Response Example ```json { "data": { "success": true } } ``` ``` -------------------------------- ### List Volume Service Offerings using cURL Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieves a list of available volume service offerings for data volumes. This operation requires the `instance:volume:service-offering:list` ability. The response includes details like size, price, and name for each offering. ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/volumes/service-offering \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### List Expenses - Bash Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Fetches the user's expense history. Access to this endpoint requires the `user:finance:expenses` ability. The response provides a list of expense records, including product details, amount, and description. ```bash curl -X GET https://public-api.virakcloud.com/user/finance/expenses \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" # Response { "data": [ { "id": "01H9ZCNF46W6C1EM45T21B6M0E", "product_type": "instance", "product_id": "01H9ZCNF46W6C1EM45T21B6M0I", "amount": 5000, "description": "Instance hourly charge", "created_at": 1234567890 } ] } ``` -------------------------------- ### List Financial Documents - Bash Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Fetches a list of financial documents, such as invoices, with pagination support. The `user:finance:documents` ability is required. The response includes document details and pagination metadata. ```bash curl -X GET https://public-api.virakcloud.com/user/finance/documents \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" # Response { "data": [ { "id": "01H9ZCNF46W6C1EM45T21B6M0D", "type": "invoice", "amount": 50000, "status": "paid", "created_at": 1234567890 } ], "meta": { "current_page": 1, "total": 50 } } ``` -------------------------------- ### List Virtual Machine Instances in a Zone Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieve a list of all virtual machine instances deployed within a specified datacenter zone. This operation requires the 'instance:list' ability. The response provides detailed information about each instance, including its ID, name, status, VM image, and service offering. ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### List Available Token Abilities Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieves a comprehensive list of all available abilities that can be assigned to API tokens. This operation requires the `user:token-abilities:list` permission. The response is an array of strings, each representing a distinct permission. ```bash curl -X GET https://public-api.virakcloud.com/user/token-abilities \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### List Network Offerings using cURL Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieves a list of available network service offerings. This operation requires the `network:service-offering:list` ability. The response includes details such as ID, name, pricing, and network type. ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/network/service-offering \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### Kubernetes Service Offerings API Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieve a list of available Kubernetes node service offerings. This endpoint requires the `kubernetes:service-offerings:list` ability. ```APIDOC ## GET /zone/{zone_id}/kubernetes/service-offerings ### Description Get available Kubernetes node service offerings. Requires `kubernetes:service-offerings:list` ability. ### Method GET ### Endpoint /zone/{zone_id}/kubernetes/service-offerings ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone to list service offerings for. ### Request Example ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/kubernetes/service-offerings \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` ### Response #### Success Response (200) - **data** (array) - A list of Kubernetes service offerings. - **id** (string) - The unique identifier for the service offering. - **name** (string) - The name of the service offering. - **is_public** (boolean) - Indicates if the offering is public. - **is_available** (boolean) - Indicates if the offering is currently available. - **hourly_price** (object) - The hourly price of the offering. - **up** (integer) - Price for the 'up' component. - **down** (integer) - Price for the 'down' component. - **hourly_price_no_discount** (object) - The hourly price without discounts. - **up** (integer) - Price for the 'up' component. - **down** (integer) - Price for the 'down' component. - **description** (string|null) - A description of the service offering. - **hardware** (object) - Hardware specifications of the offering. - **cpu_core** (integer) - Number of CPU cores. - **memory_mb** (integer) - Memory in MB. - **cpu_speed_MHz** (integer) - CPU speed in MHz. - **root_disk_size_gB** (integer) - Root disk size in GB. - **network_rate** (integer) - Network rate. - **disk_iops** (integer) - Disk IOPS. #### Response Example ```json { "data": [ { "id": "01hytvspdx8rzae97ba2qc8fvs", "name": "n04-04-050-980-v3", "is_public": true, "is_available": true, "hourly_price": { "up": 10000, "down": 8000 }, "hourly_price_no_discount": { "up": 10000, "down": 8000 }, "description": null, "hardware": { "cpu_core": 4, "memory_mb": 4096, "cpu_speed_MHz": 2300, "root_disk_size_gB": 50, "network_rate": 980, "disk_iops": 2500 } } ] } ``` ``` -------------------------------- ### Event Management Source: https://context7.com/virak-cloud/public-api-docs/llms.txt APIs for retrieving DNS-related events and general system events. ```APIDOC ## GET /dns/events ### Description Get DNS-related events. ### Method GET ### Endpoint /dns/events ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET https://public-api.virakcloud.com/dns/events \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` ### Response #### Success Response (200) - **data** (array) - An array of DNS event objects. - **id** (string) - The unique identifier for the event. - **type** (string) - The type of the DNS event. - **domain** (string) - The domain associated with the event. - **message** (string) - A message describing the event. - **created_at** (integer) - The timestamp when the event occurred. #### Response Example ```json { "data": [ { "id": "01H9ZCNF46W6C1EM45T21B6M0V", "type": "domain_created", "domain": "example.com", "message": "Domain created successfully", "created_at": 1234567890 } ] } ``` ## GET /events ### Description Get general system events. ### Method GET ### Endpoint /events ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET https://public-api.virakcloud.com/events \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` ### Response #### Success Response (200) - **data** (array) - An array of general event objects. - **id** (string) - The unique identifier for the event. - **type** (string) - The type of the event. - **resource_type** (string) - The type of resource the event relates to. - **resource_id** (string) - The identifier of the resource. - **message** (string) - A message describing the event. - **created_at** (integer) - The timestamp when the event occurred. - **meta** (object) - Pagination metadata. - **current_page** (integer) - The current page number. - **per_page** (integer) - The number of items per page. - **total** (integer) - The total number of items. #### Response Example ```json { "data": [ { "id": "01H9ZCNF46W6C1EM45T21B6M0W", "type": "system", "resource_type": "instance", "resource_id": "01H9ZCNF46W6C1EM45T21B6M0I", "message": "Instance started successfully", "created_at": 1234567890 } ], "meta": { "current_page": 1, "per_page": 20, "total": 150 } } ``` ``` -------------------------------- ### List General Events - Bash Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Fetches general system events. This endpoint requires the `event:list` ability. The response includes an array of event objects with details like type, resource information, message, and timestamp, along with pagination metadata. ```bash curl -X GET https://public-api.virakcloud.com/events \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" # Response { "data": [ { "id": "01H9ZCNF46W6C1EM45T21B6M0W", "type": "system", "resource_type": "instance", "resource_id": "01H9ZCNF46W6C1EM45T21B6M0I", "message": "Instance started successfully", "created_at": 1234567890 } ], "meta": { "current_page": 1, "per_page": 20, "total": 150 } } ``` -------------------------------- ### Volume Management API Source: https://context7.com/virak-cloud/public-api-docs/llms.txt APIs for managing data volumes, including listing available service offerings, listing existing volumes, and creating new volumes. ```APIDOC ## GET /zone/{zone_id}/instance/volumes/service-offering ### Description Retrieves a list of available volume service offerings for data volumes. Requires `instance:volume:service-offering:list` ability. ### Method GET ### Endpoint /zone/{zone_id}/instance/volumes/service-offering ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone to list service offerings from. ### Response #### Success Response (200) - **size** (string) - The size of the volume offering. - **price** (string) - The price of the volume offering. - **name** (string) - The name of the service offering. - **description** (string) - A description of the service offering. - **is_public** (boolean) - Indicates if the offering is public. - **is_featured** (boolean) - Indicates if the offering is featured. #### Response Example ```json { "data": [ { "size": "0", "price": "200", "name": "CustomeDiskOfferingAlborz", "description": "Customizable disk offering", "is_public": true, "is_featured": false } ] } ``` ## GET /zone/{zone_id}/instance/volumes ### Description Retrieves a list of all data volumes within a specified zone. Requires `instance:volume:list` ability. ### Method GET ### Endpoint /zone/{zone_id}/instance/volumes ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone to list volumes from. ### Response #### Success Response (200) - **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., 'available'). #### Response Example ```json { "data": [ { "id": "01H9ZCNF46W6C1EM45T21B6M0V", "name": "volume-1", "size": 50, "status": "available" } ] } ``` ## POST /zone/{zone_id}/instance/volumes ### Description Creates a new data volume. Requires `instance:volume:create` ability. ### Method POST ### Endpoint /zone/{zone_id}/instance/volumes ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone where the volume will be created. #### Request Body - **service_offering_id** (string) - Required - The ID of the service offering for the volume. - **size** (integer) - Required - The size of the volume in GB. - **name** (string) - Required - The name for the new volume. ### Request Example ```json { "service_offering_id": "01H9ZCNF46W6C1EM45T21B6M0G", "size": 50, "name": "my-volume" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the newly created volume. - **name** (string) - The name of the new volume. - **size** (integer) - The size of the new volume in GB. - **status** (string) - The initial status of the volume (e.g., 'CREATING'). #### Response Example ```json { "data": { "id": "01H9ZCNF46W6C1EM45T21B6M0V", "name": "my-volume", "size": 50, "status": "CREATING" } } ``` ``` -------------------------------- ### Datacenter Management - List Available Zones Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieve all available datacenter zones. Requires `zone:list` ability. ```APIDOC ## GET /zones ### Description Retrieve all available datacenter zones. ### Method GET ### Endpoint /zones ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET https://public-api.virakcloud.com/zones \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` ### Response #### Success Response (200 OK) - **data** (array) - A list of datacenter zones. - **id** (string) - The unique identifier for the zone. - **name** (string) - The name of the zone. - **location** (string) - The geographical location of the zone. - **active** (boolean) - Indicates if the zone is active. #### Response Example ```json { "data": [ { "id": "01F8MECHZX3TBDSZ7XRADM79XE", "name": "alborz-1", "location": "Tehran", "active": true }, { "id": "01F8MECHZX3TBDSZ7XRADM79XF", "name": "shahriar-1", "location": "Shahriar", "active": true } ] } ``` ``` -------------------------------- ### List API Tokens Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Fetches all API tokens associated with the authenticated user. This operation requires the `user:token:list` permission. The response details each token's ID, name, associated abilities, and timestamps for creation and last usage. ```bash curl -X GET https://public-api.virakcloud.com/user/token \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### List Volumes using cURL Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieves all data volumes within a specified zone. This operation requires the `instance:volume:list` ability. The response contains a list of volumes, each with an ID, name, size, and status. ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/volumes \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### Create Volume using cURL Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Creates a new data volume. This operation requires the `instance:volume:create` ability. The request body must specify the `service_offering_id`, `size`, and `name` for the new volume. ```bash curl -X POST https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/volumes \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "service_offering_id": "01H9ZCNF46W6C1EM45T21B6M0G", "size": 50, "name": "my-volume" }' ``` -------------------------------- ### Create DNS Domain Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Adds a new DNS domain to your account. This operation requires the `dns:domain:create` permission. A valid domain name must be provided in the request body. The response indicates success or provides error details for invalid input. ```bash curl -X POST https://public-api.virakcloud.com/dns/domains \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "domain": "example.com" }' ``` -------------------------------- ### Rebuild Instance using cURL Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Rebuilds an existing instance with a new VM image. This operation requires the `instance:rebuild` ability. The request body must include the `vm_image_id` of the new image. ```bash curl -X POST https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/instance/01H9ZCNF46W6C1EM45T21B6M0I/rebuild \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "vm_image_id": "01H9ZCNF46W6C1EM45T21B6M0H" }' ``` -------------------------------- ### List DNS Domains Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieves a list of all configured DNS domains. This operation requires the `dns:domain:list` permission. The response provides domain names, their status, and associated DNS information including nameservers. ```bash curl -X GET https://public-api.virakcloud.com/dns/domains \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### Network Management API Source: https://context7.com/virak-cloud/public-api-docs/llms.txt APIs for managing network resources, including listing network offerings, port forwarding rules, and HAProxy statistics. ```APIDOC ## GET /zone/{zone_id}/network/service-offering ### Description Retrieves a list of available network service offerings. Requires `network:service-offering:list` ability. ### Method GET ### Endpoint /zone/{zone_id}/network/service-offering ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone to list network offerings from. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the network offering. - **name** (string) - The name of the network offering. - **displayname** (string) - The display name of the network offering. - **displayname_fa** (string) - The Persian display name of the network offering. - **hourly_started_price** (integer) - The hourly price for the network offering. - **traffic_transfer_overprice** (integer) - Overprice for traffic transfer. - **traffic_transfer_plan** (integer) - Traffic transfer plan limit. - **networkrate** (integer) - The network rate. - **type** (string) - The type of network offering (e.g., 'L2', 'Isolated'). - **description** (string) - A description of the network offering. - **internet_protocol** (string) - The supported internet protocol (e.g., 'IPv4', 'DualStack'). #### Response Example ```json { "data": [ { "id": "offering_id_1", "name": "OfferingL2", "displayname": "Layer 2 Network", "displayname_fa": "شبکه لایه ۲", "hourly_started_price": 5000, "traffic_transfer_overprice": 0, "traffic_transfer_plan": 500, "networkrate": 100, "type": "L2", "description": "L2 network offering", "internet_protocol": "IPv4" }, { "id": "offering_id_2", "name": "OfferingIsolated", "displayname": "Isolated Network", "displayname_fa": "شبکه ایزوله", "hourly_started_price": 8000, "traffic_transfer_overprice": 2000, "traffic_transfer_plan": 800, "networkrate": 200, "type": "Isolated", "description": "Isolated network offering", "internet_protocol": "DualStack" } ] } ``` ## GET /zone/{zone_id}/network/{network_id}/port-forward/{public_ip_id} ### Description Retrieves a list of port forwarding rules associated with a specific network and public IP address. Requires appropriate network abilities. ### Method GET ### Endpoint /zone/{zone_id}/network/{network_id}/port-forward/{public_ip_id} ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone. - **network_id** (string) - Required - The ID of the network. - **public_ip_id** (string) - Required - The ID of the public IP address. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the port forwarding rule. - **instance_ipaddress** (string) - The private IP address of the instance. - **network_public_ip** (object) - Details of the public IP address. - **id** (string) - Public IP ID. - **network_id** (string) - Network ID associated with the public IP. - **ipaddress** (string) - The public IP address. - **is_sourcenat** (boolean) - Indicates if source NAT is enabled. - **network** (object) - Details of the network. - **id** (string) - Network ID. - **name** (string) - Network name. - **status** (string) - Network status. - **ip_config** (object) - IPv4 configuration. - **gateway** (string) - IPv4 gateway. - **netmask** (string) - IPv4 netmask. - **ip_config_v6** (object) - IPv6 configuration. - **gateway_v6** (string) - IPv6 gateway. - **netmask_v6** (string) - IPv6 netmask. - **protocol** (string) - The protocol used (e.g., 'TCP'). - **port_start_public** (integer) - The starting public port. - **port_end_public** (integer) - The ending public port. - **port_start_private** (integer) - The starting private port. - **port_end_private** (integer) - The ending private port. - **status** (string) - The status of the port forwarding rule. - **created_at** (string) - The timestamp when the rule was created. #### Response Example ```json { "data": [ { "id": "01jz0pkxe7phb41cchw1hpk6dt", "instance_ipaddress": "192.168.1.103", "network_public_ip": { "id": "01jz0m8znysysxak6vhk8zfy9m", "network_id": "01jz0m6cwk2m7jz67x5krjwgct", "ipaddress": "193.246.200.17", "is_sourcenat": true }, "network": { "id": "01jz0m6cwk2m7jz67x5krjwgct", "name": "test-network", "status": "Implementing", "ip_config": { "gateway": "192.168.1.1", "netmask": "255.255.255.0" }, "ip_config_v6": { "gateway_v6": "2a04:acc0:18:61d8::1", "netmask_v6": "2a04:acc0:18:61d8::/64" } }, "protocol": "TCP", "port_start_public": 80, "port_end_public": 80, "port_start_private": 8080, "port_end_private": 8080, "status": "Active", "created_at": "2025-06-30T15:17:16.000000Z" } ] } ``` ## GET /zone/{zone_id}/network/{network_id}/ha/stat ### Description Retrieves live HAProxy statistics for a load balancer. Requires appropriate network abilities. ### Method GET ### Endpoint /zone/{zone_id}/network/{network_id}/ha/stat ### Parameters #### Path Parameters - **zone_id** (string) - Required - The ID of the zone. - **network_id** (string) - Required - The ID of the network associated with the HAProxy. ### Response #### Success Response (200) - **updated_at** (integer) - The Unix timestamp when the statistics were last updated. - **rules** (array) - A list of HAProxy rules (empty in this example). #### Response Example ```json { "data": { "updated_at": 1752566580, "rules": [] } } ``` ``` -------------------------------- ### List Object Storage Events Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Fetches object storage events with pagination support. This operation requires the `object_storage:event:list` permission. You can filter events by type, time range (`from`, `to`), and specify the page number for retrieval. ```bash curl -X GET https://public-api.virakcloud.com/zone/01F8MECHZX3TBDSZ7XRADM79XE/object-storage/events \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "type": "customer", "from": 1707653422, "to": 1707653999, "page": 1 }' ``` -------------------------------- ### List Payments - Bash Source: https://context7.com/virak-cloud/public-api-docs/llms.txt Retrieves the user's payment history. This endpoint requires the `user:finance:payments` ability. The response contains an array of payment objects, each with details like amount, method, status, and creation timestamp. ```bash curl -X GET https://public-api.virakcloud.com/user/finance/payments \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" # Response { "data": [ { "id": "01H9ZCNF46W6C1EM45T21B6M0P", "amount": 100000, "method": "bank_transfer", "status": "completed", "created_at": 1234567890 } ] } ```