Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ export default defineConfig({
],
collapsed: true,
},
{
text: 'وب سرویس ها',
link: '/fa/guides/web-services'
},
{
text: 'گزارش تغییرات',
link: '/fa/guides/changelogs'
Expand Down Expand Up @@ -448,6 +452,10 @@ export default defineConfig({
],
collapsed: true
},
{
text: 'Web Services',
link: '/en/guides/web-services'
},
{
text: 'Changelog',
link: '/en/guides/changelogs'
Expand Down
4 changes: 2 additions & 2 deletions docs/en/guides/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ After logging into the [panel](https://panel.virakcloud.com/), you can view the
/>

## Account Charge
On the right side of the panel, you can view your panel's charge balance. If you need to increase your panel's charge balance, you can make a deposit in this section.
On the left side of the panel, you can view your panel's charge balance. If you need to increase your panel's charge balance, you can make a deposit in this section.

<DarkModeImage
dark-src="/images/guides/en/dark/increase-inventory.webp"
Expand All @@ -23,7 +23,7 @@ On the right side of the panel, you can view your panel's charge balance. If you
/>

## Sidebar Links
As shown in the image below, you can see the main dashboard on the right side of the panel, which includes the following:
As shown in the image below, you can see the main dashboard on the left side of the panel, which includes the following:

1. Cloud Infrastructure Hosting
2. Domain Hosting
Expand Down
76 changes: 76 additions & 0 deletions docs/en/guides/web-services.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Web Services & Tokens

The Virak Cloud Web Services allows developers to integrate with our platform programmatically.
You can use the API to manage instances, networks, storage, and more.


## 1. Authentication

All requests to the Web Services require authentication using an **API token**.
Include your token in the `Authorization` header:

```http
Authorization: Bearer YOUR_TOKEN
```

> ⚠️ For security reasons, the token value is shown **only once** when it is created.


## 2. API Tokens List

<DarkModeImage
dark-src="/images/guides/en/dark/public-api/tokens-list.webp"
light-src="/images/guides/en/light/public-api/tokens-list.webp"
alt="Web Services - Token List"
/>

On the **Tokens** page, you will see all tokens you have generated.
The list contains the following information:

| Name | Last Used | Expiration Date | Abilities |
| -------------- | ---------------- | --------------- | ----------------------------------------------------------- |
| My First Token | 2025-08-05 14:22 | 2025-12-31 | `dns:domain:list, instance:create, kubernetes:cluster:list` |
| Backup Token | 2025-08-07 09:10 | Never | `object_storage:bucket:create, network:firewall:ipv4:list` |


* **Name** – The label you assigned to the token when creating it.
* **Last Used** – The last time this token was used in an API request.
* **Expiration Date** – The date when the token becomes invalid.
* **Abilities** – The set of actions the token can perform.


## 3. Creating a Token

<DarkModeImage
dark-src="/images/guides/en/dark/public-api/create-token.webp"
light-src="/images/guides/en/light/public-api/create-token.webp"
alt="Web Services - Token List"
/>

To create a new API token:

1. From the left sidebar, select **Web Service**.
2. On the **Web Service** page, click **Create Token**.
3. Provide a **Name**, select an **Expiration Date**, and choose **Scopes**.
4. After creating, copy the token and store it securely — it will not be shown again.


### Example API Request – Create Token

```bash
curl --request GET \
--get "http://public-api.virakcloud.com/api/external/zones" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
```


## 4. Full API Reference

For the complete API documentation (including all endpoints and parameters),
visit the **Web Services Reference**:

<div style="text-align: left;">
<a href="https://api-docs.virakcloud.com">https://api-docs.virakcloud.com</a>
</div>
78 changes: 78 additions & 0 deletions docs/fa/guides/web-services.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@

# وب سرویس و توکن‌ها

وب سرویس ویراک کلود این امکان را به توسعه‌دهندگان می‌دهد که به‌صورت برنامه‌نویسی شده با پلتفرم تعامل کنند.
با استفاده از این API می‌توانید ماشین‌ها، شبکه‌ها، فضای ذخیره‌سازی و سایر سرویس‌ها را مدیریت کنید.


## ۱. احراز هویت

تمام درخواست‌ها به وب سرویس نیاز به **توکن API** دارند.
توکن باید در هدر `Authorization` ارسال شود:

```http
Authorization: Bearer YOUR_TOKEN
```

> ⚠️ به دلایل امنیتی، مقدار توکن فقط **یک‌بار** هنگام ساخت نمایش داده می‌شود.


## ۲. لیست توکن‌ها

<DarkModeImage
dark-src="/images/guides/fa/dark/public-api/tokens-list.webp"
light-src="/images/guides/fa/light/public-api/tokens-list.webp"
alt="Web Services - Token List"
/>

در صفحه **توکن‌ها** می‌توانید لیست تمام توکن‌های ایجاد شده را مشاهده کنید.
اطلاعات هر توکن شامل موارد زیر است:

| نام | آخرین زمان استفاده | تاریخ انقضا | توانایی ها |
| -------------- | ------------------- | --------------- | ----------------------------------------------------------- |
| My First Token | 1404/03/05 14:22 | 1404/10/10 | `dns:domain:list, instance:create, kubernetes:cluster:list` |
| Backup Token | 1404/05/23 09:10 | 1404/12/05 | `object_storage:bucket:create, network:firewall:ipv4:list` |

* **نام توکن** – نامی که هنگام ساخت وارد کرده‌اید.
* **آخرین استفاده** – آخرین زمانی که توکن در درخواست API استفاده شده است.
* **تاریخ انقضا** – زمانی که توکن منقضی می‌شود و دیگر معتبر نیست.
* **توانایی‌ها** – مجموعه اقداماتی که توکن مجاز به انجام آن‌هاست.

---

## ۳. ساخت توکن جدید

<DarkModeImage
dark-src="/images/guides/fa/dark/public-api/create-token.webp"
light-src="/images/guides/fa/light/public-api/create-token.webp"
alt="Web Services - Create New Token"
/>

برای ایجاد یک توکن جدید:

1. از منوی کناری، گزینه **وب‌سرویس** را انتخاب کنید.
2. در صفحه **وب‌سرویس**، روی **ایجاد توکن** کلیک کنید.
3. نام، تاریخ انقضا و دسترسی‌های مورد نیاز را مشخص کنید.
4. پس از ساخت، مقدار توکن را کپی و در محل امن ذخیره کنید — مجدداً نمایش داده نخواهد شد.



### نمونه درخواست API – ساخت توکن

```bash
curl --request GET \
--get "https://public-api.virakcloud.com/api/external/zones" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
```


## ۴. مرجع کامل API

برای مشاهده مستندات کامل (شامل تمام اندپوینت‌ها و پارامترها)،
به لینک زیر مراجعه کنید:

<div style="text-align: left;">
<a href="https://api-docs.virakcloud.com">https://api-docs.virakcloud.com</a>
</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.