Skip to content

Commit c488bb9

Browse files
authored
Merge pull request #21 from virak-cloud/dev2master
Dev2master
2 parents fe4afb3 + b3b60d7 commit c488bb9

12 files changed

Lines changed: 164 additions & 2 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ export default defineConfig({
284284
],
285285
collapsed: true,
286286
},
287+
{
288+
text: 'وب سرویس ها',
289+
link: '/fa/guides/web-services'
290+
},
287291
{
288292
text: 'گزارش تغییرات',
289293
link: '/fa/guides/changelogs'
@@ -448,6 +452,10 @@ export default defineConfig({
448452
],
449453
collapsed: true
450454
},
455+
{
456+
text: 'Web Services',
457+
link: '/en/guides/web-services'
458+
},
451459
{
452460
text: 'Changelog',
453461
link: '/en/guides/changelogs'

docs/en/guides/dashboard.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ After logging into the [panel](https://panel.virakcloud.com/), you can view the
1414
/>
1515

1616
## Account Charge
17-
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.
17+
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.
1818

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

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

2828
1. Cloud Infrastructure Hosting
2929
2. Domain Hosting

docs/en/guides/web-services.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Web Services & Tokens
2+
3+
The Virak Cloud Web Services allows developers to integrate with our platform programmatically.
4+
You can use the API to manage instances, networks, storage, and more.
5+
6+
7+
## 1. Authentication
8+
9+
All requests to the Web Services require authentication using an **API token**.
10+
Include your token in the `Authorization` header:
11+
12+
```http
13+
Authorization: Bearer YOUR_TOKEN
14+
```
15+
16+
> ⚠️ For security reasons, the token value is shown **only once** when it is created.
17+
18+
19+
## 2. API Tokens List
20+
21+
<DarkModeImage
22+
dark-src="/images/guides/en/dark/public-api/tokens-list.webp"
23+
light-src="/images/guides/en/light/public-api/tokens-list.webp"
24+
alt="Web Services - Token List"
25+
/>
26+
27+
On the **Tokens** page, you will see all tokens you have generated.
28+
The list contains the following information:
29+
30+
| Name | Last Used | Expiration Date | Abilities |
31+
| -------------- | ---------------- | --------------- | ----------------------------------------------------------- |
32+
| My First Token | 2025-08-05 14:22 | 2025-12-31 | `dns:domain:list, instance:create, kubernetes:cluster:list` |
33+
| Backup Token | 2025-08-07 09:10 | Never | `object_storage:bucket:create, network:firewall:ipv4:list` |
34+
35+
36+
* **Name** – The label you assigned to the token when creating it.
37+
* **Last Used** – The last time this token was used in an API request.
38+
* **Expiration Date** – The date when the token becomes invalid.
39+
* **Abilities** – The set of actions the token can perform.
40+
41+
42+
## 3. Creating a Token
43+
44+
<DarkModeImage
45+
dark-src="/images/guides/en/dark/public-api/create-token.webp"
46+
light-src="/images/guides/en/light/public-api/create-token.webp"
47+
alt="Web Services - Token List"
48+
/>
49+
50+
To create a new API token:
51+
52+
1. From the left sidebar, select **Web Service**.
53+
2. On the **Web Service** page, click **Create Token**.
54+
3. Provide a **Name**, select an **Expiration Date**, and choose **Scopes**.
55+
4. After creating, copy the token and store it securely — it will not be shown again.
56+
57+
58+
### Example API Request – Create Token
59+
60+
```bash
61+
curl --request GET \
62+
--get "http://public-api.virakcloud.com/api/external/zones" \
63+
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
64+
--header "Content-Type: application/json" \
65+
--header "Accept: application/json"
66+
```
67+
68+
69+
## 4. Full API Reference
70+
71+
For the complete API documentation (including all endpoints and parameters),
72+
visit the **Web Services Reference**:
73+
74+
<div style="text-align: left;">
75+
<a href="https://api-docs.virakcloud.com">https://api-docs.virakcloud.com</a>
76+
</div>

docs/fa/guides/web-services.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
2+
# وب سرویس و توکن‌ها
3+
4+
وب سرویس ویراک کلود این امکان را به توسعه‌دهندگان می‌دهد که به‌صورت برنامه‌نویسی شده با پلتفرم تعامل کنند.
5+
با استفاده از این API می‌توانید ماشین‌ها، شبکه‌ها، فضای ذخیره‌سازی و سایر سرویس‌ها را مدیریت کنید.
6+
7+
8+
## ۱. احراز هویت
9+
10+
تمام درخواست‌ها به وب سرویس نیاز به **توکن API** دارند.
11+
توکن باید در هدر `Authorization` ارسال شود:
12+
13+
```http
14+
Authorization: Bearer YOUR_TOKEN
15+
```
16+
17+
> ⚠️ به دلایل امنیتی، مقدار توکن فقط **یک‌بار** هنگام ساخت نمایش داده می‌شود.
18+
19+
20+
## ۲. لیست توکن‌ها
21+
22+
<DarkModeImage
23+
dark-src="/images/guides/fa/dark/public-api/tokens-list.webp"
24+
light-src="/images/guides/fa/light/public-api/tokens-list.webp"
25+
alt="Web Services - Token List"
26+
/>
27+
28+
در صفحه **توکن‌ها** می‌توانید لیست تمام توکن‌های ایجاد شده را مشاهده کنید.
29+
اطلاعات هر توکن شامل موارد زیر است:
30+
31+
| نام | آخرین زمان استفاده | تاریخ انقضا | توانایی ها |
32+
| -------------- | ------------------- | --------------- | ----------------------------------------------------------- |
33+
| My First Token | 1404/03/05 14:22 | 1404/10/10 | `dns:domain:list, instance:create, kubernetes:cluster:list` |
34+
| Backup Token | 1404/05/23 09:10 | 1404/12/05 | `object_storage:bucket:create, network:firewall:ipv4:list` |
35+
36+
* **نام توکن** – نامی که هنگام ساخت وارد کرده‌اید.
37+
* **آخرین استفاده** – آخرین زمانی که توکن در درخواست API استفاده شده است.
38+
* **تاریخ انقضا** – زمانی که توکن منقضی می‌شود و دیگر معتبر نیست.
39+
* **توانایی‌ها** – مجموعه اقداماتی که توکن مجاز به انجام آن‌هاست.
40+
41+
---
42+
43+
## ۳. ساخت توکن جدید
44+
45+
<DarkModeImage
46+
dark-src="/images/guides/fa/dark/public-api/create-token.webp"
47+
light-src="/images/guides/fa/light/public-api/create-token.webp"
48+
alt="Web Services - Create New Token"
49+
/>
50+
51+
برای ایجاد یک توکن جدید:
52+
53+
1. از منوی کناری، گزینه **وب‌سرویس** را انتخاب کنید.
54+
2. در صفحه **وب‌سرویس**، روی **ایجاد توکن** کلیک کنید.
55+
3. نام، تاریخ انقضا و دسترسی‌های مورد نیاز را مشخص کنید.
56+
4. پس از ساخت، مقدار توکن را کپی و در محل امن ذخیره کنید — مجدداً نمایش داده نخواهد شد.
57+
58+
59+
60+
### نمونه درخواست API – ساخت توکن
61+
62+
```bash
63+
curl --request GET \
64+
--get "https://public-api.virakcloud.com/api/external/zones" \
65+
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
66+
--header "Content-Type: application/json" \
67+
--header "Accept: application/json"
68+
```
69+
70+
71+
## ۴. مرجع کامل API
72+
73+
برای مشاهده مستندات کامل (شامل تمام اندپوینت‌ها و پارامترها)،
74+
به لینک زیر مراجعه کنید:
75+
76+
<div style="text-align: left;">
77+
<a href="https://api-docs.virakcloud.com">https://api-docs.virakcloud.com</a>
78+
</div>
42.9 KB
Loading
51.3 KB
Loading
47.2 KB
Loading
54.6 KB
Loading
45.9 KB
Loading
51.4 KB
Loading

0 commit comments

Comments
 (0)