{"openapi":"3.1.0","info":{"title":"Paasta Public API","version":"1.0.0","description":"مرجع رسمی API عمومی پاستا. زمان‌ها ISO 8601 و همه پاسخ‌ها UTF-8 هستند."},"servers":[{"url":"https://console.paasta.cloud","description":"Production"}],"tags":[{"name":"حساب و ابزارها","description":"زمینه CLI، احراز هویت و اتصال Agentها"},{"name":"پروژه‌ها","description":"فهرست، بررسی منبع، تنظیمات و دامنه"},{"name":"استقرار و نسخه‌ها","description":"آپلود منبع، Build، انتشار، Preview و Rollback"},{"name":"Git و استقرار خودکار","description":"اتصال‌های موجود، مخزن‌ها، Branchها و کنترل Auto Deploy"},{"name":"تیم و دسترسی","description":"اعضا، دعوت‌های در انتظار، نقش‌ها و دسترسی پروژه‌ها"},{"name":"ثبت و مالکیت دامنه","description":"جست‌وجو، ثبت، انتقال، تمدید، Nameserver و قفل انتقال"},{"name":"اجرا و عملیات","description":"لاگ، مقیاس، Health Check و Worker/Cron/Job"},{"name":"دیسک، فایل و بکاپ","description":"دیسک پایدار، فایل منیجر، Snapshot و بازیابی"},{"name":"دیتابیس مدیریت‌شده","description":"ساخت، دسترسی، بکاپ و بازیابی نقطه‌ای"},{"name":"شبکه توزیع محتوا","description":"دامنه‌ها، DNS، مبدا، پاک‌سازی کش و فایروال"},{"name":"اعلان‌ها","description":"مسیر هشدار، کانال‌های ارسال و تاریخچه تحویل"},{"name":"پشتیبانی","description":"تیکت‌های خصوصی فضای کاری، پاسخ‌ها و پیوست‌ها"},{"name":"اتوماسیون","description":"MCP و دسترسی ابزارهای هوش مصنوعی"}],"paths":{"/api/cli/context":{"get":{"operationId":"cli-context","tags":["حساب و ابزارها"],"summary":"زمینه حساب","description":"فضای کاری فعال، موجودی، ناحیه‌ها و پلن‌های قابل استفاده را برای CLI برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"tenant":{"id":"uuid","name":"Acme"},"balanceToman":250000,"clusters":[],"plans":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"}},"/api/billing/zibal/request":{"post":{"operationId":"billing-topup","tags":["حساب و ابزارها"],"summary":"ساخت درخواست افزایش اعتبار","description":"یک پرداخت امن برای افزایش اعتبار فضای کاری می‌سازد و URL درگاه را برمی‌گرداند.\n\nاین scope را فقط به Tokenهای مورد استفاده برای پرداخت بدهید.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"url":"https://gateway.example/start/…"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"billing:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"amount":100000,"returnPath":"/billing"}}}}}}},"/api/projects":{"get":{"operationId":"projects-list","tags":["پروژه‌ها"],"summary":"فهرست پروژه‌ها","description":"پروژه‌های قابل دسترس کاربر را همراه وضعیت، دامنه و آخرین استقرار برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"projects":[{"name":"my-app","status":"ready","domain":"my-app.ir1.paasta.app"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"}},"/api/projects/inspect":{"post":{"operationId":"project-inspect","tags":["پروژه‌ها"],"summary":"بررسی منبع پروژه","description":"ZIP، Git، Docker Image، Compose یا قالب آماده را بدون ساخت منبع تحلیل می‌کند.\n\nفقط یکی از archive، sourceKey، gitUrl، imageReference، composeContent یا templateId را بفرستید.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"project":"my-app","stack":"nextjs","port":3000,"domain":"my-app.ir1.paasta.app","files":84}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"my-app"},"clusterId":{"type":"string","example":"CLUSTER_ID"},"archive":{"type":"string","format":"binary"}}}}}}}},"/api/projects/{name}/configuration":{"get":{"operationId":"project-config-list","tags":["پروژه‌ها"],"summary":"ConfigMap و Secretها","description":"پیکربندی‌های Kubernetes متعلق به پروژه را با مقدارهای Secret مخفی‌شده فهرست می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"items":[{"kind":"configmap","name":"app-config"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"environment:write"},"post":{"operationId":"project-config-create","tags":["پروژه‌ها"],"summary":"ساخت پیکربندی","description":"یک ConfigMap یا Secret جدید برای پروژه می‌سازد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"environment:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"kind":"configmap","name":"app-config","data":{"APP_MODE":"production"}}}}}}},"put":{"operationId":"project-config-update","tags":["پروژه‌ها"],"summary":"ویرایش پیکربندی","description":"داده‌های ConfigMap یا Secret موجود را جایگزین می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"environment:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"kind":"secret","name":"app-secrets","data":{"API_KEY":"value"}}}}}}}},"/api/projects/{name}/environment":{"get":{"operationId":"project-env-get","tags":["پروژه‌ها"],"summary":"متغیرهای محیطی","description":"نام متغیرهای محیطی پروژه را برمی‌گرداند؛ مقدار Secret در پاسخ افشا نمی‌شود.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"values":{"NODE_ENV":"production","API_KEY":"••••••••"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"environment:write"},"put":{"operationId":"project-env-put","tags":["پروژه‌ها"],"summary":"ثبت متغیرهای محیطی","description":"مجموعه کامل متغیرهای محیطی پروژه را ثبت و نسخه اجرا را به‌روزرسانی می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"environment:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"NODE_ENV":"production","API_KEY":"secret"}}}}}}},"/api/projects/{name}/domains":{"get":{"operationId":"project-domains-get","tags":["پروژه‌ها"],"summary":"دامنه‌های پروژه","description":"دامنه پیش‌فرض و دامنه‌های شخصی پروژه را همراه وضعیت DNS و TLS برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"domains":[{"hostname":"app.example.com","status":"ready","tlsStatus":"ready"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"post":{"operationId":"project-domains-post","tags":["پروژه‌ها"],"summary":"اتصال دامنه","description":"دامنه شخصی را مستقیم یا از دامنه CDN همان فضای کاری به پروژه متصل می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"id":"uuid","hostname":"app.example.com"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"environment:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"hostname":"app.example.com","cdnSiteId":"optional-site-id"}}}}}},"put":{"operationId":"project-domains-verify","tags":["پروژه‌ها"],"summary":"بررسی دامنه","description":"DNS و وضعیت صدور TLS یک اتصال دامنه را دوباره بررسی می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"status":"ready"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"environment:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"id":"domain-id"}}}}}},"delete":{"operationId":"project-domains-delete","tags":["پروژه‌ها"],"summary":"حذف دامنه","description":"اتصال دامنه شخصی را از پروژه حذف می‌کند؛ دامنه پیش‌فرض پروژه حذف نمی‌شود.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"environment:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"id":"domain-id"}}}}}}},"/api/projects/{name}":{"delete":{"operationId":"project-delete","tags":["پروژه‌ها"],"summary":"حذف پروژه","description":"پروژه و منابع متصل آن را حذف می‌کند و اعتبار استفاده‌نشده منابع ماهانه را طبق سیاست بازپرداخت برمی‌گرداند.\n\nاین عملیات مخرب و غیرقابل بازگشت است.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"refundToman":42000}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:delete"}},"/api/integrations/git/connections":{"get":{"operationId":"git-connections-list","tags":["Git و استقرار خودکار"],"summary":"اتصال‌های Git","description":"اتصال‌های GitHub و GitLab متعلق به کاربر و فضای کاری فعال را بدون Token یا Scopeهای ارائه‌دهنده برمی‌گرداند.\n\nساخت و حذف اتصال OAuth فقط از کنسول و نشست مرورگر انجام می‌شود.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"connections":[{"id":"uuid","provider":"github","username":"acme","createdAt":"2026-08-08T00:00:00Z"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"git:read"}},"/api/integrations/git/repositories":{"get":{"operationId":"git-repositories-list","tags":["Git و استقرار خودکار"],"summary":"مخزن‌ها و Branchها","description":"با یکی از اتصال‌های متعلق به همان کاربر، مخزن‌های قابل دسترس یا Branchهای یک مخزن را می‌خواند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"connectionId","in":"query","required":false,"description":"شناسه اتصال Git","schema":{"type":"string"}},{"name":"repository","in":"query","required":false,"description":"URL مخزن برای دریافت Branchها","schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"repositories":[{"name":"acme/app","url":"https://github.com/acme/app","private":true,"defaultBranch":"main"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"git:read"}},"/api/projects/{name}/git":{"get":{"operationId":"project-git-get","tags":["Git و استقرار خودکار"],"summary":"وضعیت Git پروژه","description":"مخزن، Branch، ریشه پروژه و وضعیت Webhook و استقرار خودکار پروژه را بدون نمایش هیچ Secret برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"project":"my-app","repository":"https://github.com/acme/app","ref":"main","root":"","autoDeploy":true,"webhookConfigured":true,"managedWebhook":true,"connectedAccount":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"git:read"},"post":{"operationId":"project-git","tags":["Git و استقرار خودکار"],"summary":"تنظیم استقرار خودکار","description":"استقرار خودکار Pushهای Branch انتخاب‌شده را فعال یا غیرفعال و در صورت درخواست Webhook را بازتولید می‌کند.\n\nفعال‌سازی ممکن است Webhook ارائه‌دهنده را ایجاد کند؛ CLI پیش از تغییر به --yes نیاز دارد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"enabled":true,"managed":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"git:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"action":"toggle","enabled":true}}}}}}},"/api/team":{"get":{"operationId":"team-list","tags":["تیم و دسترسی"],"summary":"اعضا و دعوت‌های تیم","description":"اعضا، نقش‌ها، دسترسی پروژه‌ها، دعوت‌های معتبر و پروژه‌های فضای کاری فعال را فقط برای owner یا admin برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"members":[{"id":"uuid","name":"Sara","email":"sara@example.com","role":"developer","project_ids":[]}],"invitations":[],"projects":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"team:read"},"post":{"operationId":"team-invite","tags":["تیم و دسترسی"],"summary":"دعوت عضو تیم","description":"لینک دعوت هفت‌روزه برای یک نقش مجاز و پروژه‌های همان فضای کاری می‌سازد.\n\nفقط owner می‌تواند نقش admin دعوت کند. لینک دعوت فقط در پاسخ ساخت نمایش داده می‌شود.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"201":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"uuid","email":"member@example.com","role":"developer","inviteUrl":"https://console.paasta.cloud/invite?token=…"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"team:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"email":"member@example.com","role":"developer","projectIds":["project-uuid"]}}}}}},"patch":{"operationId":"team-member-update","tags":["تیم و دسترسی"],"summary":"ویرایش عضو تیم","description":"نقش و پروژه‌های قابل دسترسی یک عضو را در همان فضای کاری تغییر می‌دهد.\n\nنقش owner قابل تغییر نیست و فقط owner می‌تواند adminها را تغییر دهد.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"userId":"user-uuid","role":"viewer","project_ids":["project-uuid"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"team:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"userId":"user-uuid","role":"viewer","projectIds":["project-uuid"]}}}}}},"delete":{"operationId":"team-member-delete","tags":["تیم و دسترسی"],"summary":"حذف عضو یا لغو دعوت","description":"با userId عضو را حذف یا با invitationId دعوت در انتظار را لغو می‌کند.\n\nحذف خود، حذف owner و حذف admin توسط غیر owner مجاز نیست.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"deleted":"user-uuid"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"team:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"userId":"user-uuid"}}}}}}},"/api/domain-registration/domains":{"get":{"operationId":"registered-domains-list","tags":["ثبت و مالکیت دامنه"],"summary":"دامنه‌های ثبت‌شده","description":"دامنه‌های متعلق به فضای کاری را همراه وضعیت، انقضا، Nameserver و آخرین سفارش برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"domains":[{"id":"uuid","fqdn":"example.com","status":"active","expires_at":"2027-08-08T00:00:00Z","auto_renew":true}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"domains:read"}},"/api/domain-registration/domains/{id}":{"get":{"operationId":"registered-domain-get","tags":["ثبت و مالکیت دامنه"],"summary":"جزئیات دامنه","description":"جزئیات tenant-scoped دامنه و بیست سفارش اخیر آن را بدون اطلاعات تماس یا Secret نمایش می‌دهد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"domain":{"id":"uuid","fqdn":"example.com","status":"active"},"orders":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"domains:read"},"patch":{"operationId":"registered-domain-update","tags":["ثبت و مالکیت دامنه"],"summary":"مدیریت دامنه","description":"تمدید خودکار، Nameserver، قفل انتقال، دریافت کد انتقال یا پیگیری سفارش انتقال را تغییر می‌دهد.\n\nکد انتقال Secret است؛ پاسخ آن Cache-Control: no-store دارد و CLI فقط با --show-secret نمایش می‌دهد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"nameservers":["ns1.example.com","ns2.example.com"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"domains:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"action":"nameservers","nameservers":["ns1.example.com","ns2.example.com"]}}}}}}},"/api/domain-registration/search":{"get":{"operationId":"domain-quote","tags":["ثبت و مالکیت دامنه"],"summary":"استعلام دامنه و قیمت","description":"قیمت قطعی ثبت، انتقال، تمدید یا بازیابی را برای دوره انتخابی اعلام می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"query","required":false,"description":"نام دامنه برای ثبت یا انتقال","schema":{"type":"string"}},{"name":"domainId","in":"query","required":false,"description":"شناسه دامنه برای تمدید یا بازیابی","schema":{"type":"string"}},{"name":"operation","in":"query","required":false,"description":"register، transfer، renew یا restore","schema":{"type":"string"}},{"name":"years","in":"query","required":false,"description":"دوره یک تا ده سال","schema":{"type":"string"}},{"name":"privacy","in":"query","required":false,"description":"فعال‌سازی WHOIS privacy","schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"domain":"example.com","operation":"register","years":1,"available":true,"priceToman":250000,"prices":{"1":250000}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"domains:read"}},"/api/domain-registration/orders":{"post":{"operationId":"domain-order-create","tags":["ثبت و مالکیت دامنه"],"summary":"ثبت سفارش دامنه","description":"سفارش ثبت، انتقال، تمدید یا بازیابی را با قیمت لحظه‌ای و کلید idempotency رزرو و اجرا می‌کند.\n\nفقط owner/admin؛ هزینه پیش از اجرا باید تایید شود. تکرار همان کلید سفارش را بدون شارژ دوباره بازیابی می‌کند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"201":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"orderId":"uuid","domainId":"uuid","status":"completed"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"domains:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"operation":"register","domain":"example.com","years":1,"privacy":false,"idempotencyKey":"uuid"}}}}}}},"/api/projects/source-upload":{"post":{"operationId":"upload-start","tags":["استقرار و نسخه‌ها"],"summary":"شروع آپلود چندبخشی","description":"برای منبع ZIP یک نشست آپلود می‌سازد و اندازه هر بخش را اعلام می‌کند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"upload-id","chunkSize":4194304,"maxSize":26214400}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"name":"project.zip","size":10485760}}}}}}},"/api/projects/source-upload/{id}":{"put":{"operationId":"upload-part","tags":["استقرار و نسخه‌ها"],"summary":"ارسال بخش فایل","description":"یک بخش باینری از ZIP را آپلود می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"part","in":"query","required":false,"description":"شماره بخش از صفر","schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"uploaded":true,"part":0,"size":4194304}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"post":{"operationId":"upload-complete","tags":["استقرار و نسخه‌ها"],"summary":"تکمیل آپلود","description":"بخش‌های آپلودشده را اعتبارسنجی و به یک منبع قابل بررسی تبدیل می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"sourceKey":"source-key","size":10485760,"name":"project.zip"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"name":"project.zip","size":10485760,"parts":3}}}}}}},"/api/projects/deploy":{"post":{"operationId":"deploy-create","tags":["استقرار و نسخه‌ها"],"summary":"ایجاد استقرار","description":"منبع بررسی‌شده را Build و منابع پروژه، دیسک‌ها و دیتابیس‌های درخواست‌شده را رزرو می‌کند.\n\nبرای منابع چندگانه، volumes و databases را به‌صورت JSON array در FormData بفرستید.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"buildId":"build-my-app-abc123","project":"my-app"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"my-app"},"clusterId":{"type":"string","example":"CLUSTER_ID"},"servicePlanId":{"type":"string","example":"PLAN_ID"},"billingMode":{"type":"string","example":"payg"},"sourceKey":{"type":"string","example":"SOURCE_KEY"}}}}}}}},"/api/projects/deploy/{id}":{"get":{"operationId":"deploy-get","tags":["استقرار و نسخه‌ها"],"summary":"وضعیت استقرار","description":"مرحله Build، بررسی امنیتی، انتشار و خطای آخر یک استقرار را برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"build-my-app-abc123","status":"ready","project":"my-app","image":"registry/my-app:tag"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"delete":{"operationId":"deploy-cancel","tags":["استقرار و نسخه‌ها"],"summary":"لغو استقرار","description":"Build یا انتشار در حال اجرا را لغو می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write"}},"/api/projects/{name}/deployments":{"get":{"operationId":"project-deployments","tags":["استقرار و نسخه‌ها"],"summary":"تاریخچه استقرار","description":"سی نسخه اخیر پروژه و وضعیت فعال‌بودن آن‌ها در Production را برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"deployments":[{"id":"build-my-app-abc123","status":"ready","active":true}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"}},"/api/projects/deploy/{id}/logs":{"get":{"operationId":"deploy-logs","tags":["استقرار و نسخه‌ها"],"summary":"لاگ استقرار","description":"لاگ دریافت منبع، BuildKit، بررسی امنیتی و انتشار را به‌صورت متن برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"status":"building","logs":"#1 load build definition…"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"logs:read"}},"/api/projects/deploy/{id}/retry":{"post":{"operationId":"deploy-retry","tags":["استقرار و نسخه‌ها"],"summary":"تلاش مجدد","description":"یک استقرار ناموفق را با همان ورودی معتبر دوباره اجرا می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"build-my-app-new123","project":"my-app","status":"queued","retryStage":"build"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write"}},"/api/projects/{name}/rollback":{"post":{"operationId":"project-rollback","tags":["استقرار و نسخه‌ها"],"summary":"Rollback نسخه","description":"Image یک استقرار موفق قبلی را بدون Build دوباره منتشر می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"buildId":"build-my-app-abc123"}}}}}}},"/api/projects/{name}/previews":{"get":{"operationId":"previews-get","tags":["استقرار و نسخه‌ها"],"summary":"محیط‌های Preview","description":"محیط‌های موقت پروژه و زمان انقضای آن‌ها را فهرست می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"previews":[{"id":"uuid","slug":"staging","status":"ready","expiresAt":"2026-08-02T12:00:00Z"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"post":{"operationId":"previews-post","tags":["استقرار و نسخه‌ها"],"summary":"ساخت Preview","description":"از یک Build موفق محیط موقت با دامنه مستقل می‌سازد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"id":"uuid","domain":"staging-my-app.ir1.paasta.app"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"slug":"staging","buildId":"build-id","lifetimeHours":24}}}}}}},"/api/projects/{name}/previews/{id}":{"delete":{"operationId":"previews-delete","tags":["استقرار و نسخه‌ها"],"summary":"حذف Preview","description":"محیط موقت و منابع اختصاصی آن را حذف می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write"}},"/api/projects/{name}/previews/{id}/promote":{"post":{"operationId":"previews-promote","tags":["استقرار و نسخه‌ها"],"summary":"انتقال Preview به Production","description":"نسخه تأییدشده محیط Preview را به Production ارتقا می‌دهد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write"}},"/api/projects/{name}/logs":{"get":{"operationId":"project-logs","tags":["اجرا و عملیات"],"summary":"لاگ اجرای پروژه","description":"لاگ کانتینر انتخابی را برمی‌گرداند یا Podها و کانتینرهای قابل انتخاب را فهرست می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"list=1","in":"query","required":false,"description":"فهرست Podها","schema":{"type":"string"}},{"name":"pod","in":"query","required":false,"description":"نام Pod","schema":{"type":"string"}},{"name":"container","in":"query","required":false,"description":"نام کانتینر","schema":{"type":"string"}},{"name":"tail","in":"query","required":false,"description":"یکی از 100، 300، 1000 یا 3000","schema":{"type":"string"}},{"name":"since","in":"query","required":false,"description":"بازه برحسب ثانیه","schema":{"type":"string"}},{"name":"previous=1","in":"query","required":false,"description":"کانتینر قبلی","schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"pod":"my-app-abc","container":"app","logs":"Server listening on 3000"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"logs:read"}},"/api/projects/{name}/restart":{"post":{"operationId":"project-restart","tags":["اجرا و عملیات"],"summary":"راه‌اندازی مجدد","description":"تمام نمونه‌های اجرای پروژه را به‌صورت Rolling restart راه‌اندازی می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write"}},"/api/projects/{name}/scale":{"put":{"operationId":"project-scale","tags":["اجرا و عملیات"],"summary":"تغییر تعداد نمونه","description":"تعداد Replicaهای پروژه را تغییر می‌دهد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"replicas":2}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"replicas":2}}}}}}},"/api/projects/{name}/plan":{"put":{"operationId":"project-plan","tags":["اجرا و عملیات"],"summary":"تغییر پلن","description":"پلن منابع پروژه را تغییر می‌دهد و اختلاف دوره ماهانه را محاسبه می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"chargedToman":250000}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"servicePlanId":"plan-id"}}}}}}},"/api/projects/{name}/resources":{"get":{"operationId":"project-resources-get","tags":["اجرا و عملیات"],"summary":"منابع و وضعیت اجرا","description":"پلن، Replica، مصرف و وضعیت Containerهای پروژه را برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"status":"ready","replicas":{"ready":2,"desired":2},"containers":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"put":{"operationId":"project-resources-put","tags":["اجرا و عملیات"],"summary":"همگام‌سازی منابع","description":"منابع تعریف‌شده پروژه را دوباره روی کلاستر اعمال می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"}},"/api/projects/{name}/monitor":{"get":{"operationId":"project-monitor-get","tags":["اجرا و عملیات"],"summary":"وضعیت Uptime Check","description":"تنظیمات، آخرین نتیجه، دسترس‌پذیری ۲۴ ساعت و ۲۰ بررسی اخیر پروژه را برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"enabled":true,"path":"/health","failureThreshold":3,"consecutiveFailures":0,"lastStatus":200,"lastLatencyMs":82,"availability24h":99.95,"checks":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"patch":{"operationId":"project-monitor","tags":["اجرا و عملیات"],"summary":"تنظیم Uptime Check","description":"بررسی دوره‌ای HTTPS و آستانه خطای متوالی را تنظیم می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"enabled":true,"path":"/health","failureThreshold":3}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"enabled":true,"path":"/health","failureThreshold":3}}}}}}},"/api/projects/{name}/availability":{"get":{"operationId":"project-availability-get","tags":["اجرا و عملیات"],"summary":"وضعیت دسترس‌پذیری","description":"تنظیمات فعلی Autoscaling و HA، محدودیت دیسک و قیمت پلن را برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"autoscaling":false,"highAvailability":false,"minReplicas":1,"maxReplicas":3,"cpuTarget":70,"desiredReplicas":1,"billingMode":"payg"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"put":{"operationId":"project-availability","tags":["اجرا و عملیات"],"summary":"High Availability و Autoscaling","description":"مقیاس خودکار CPU، بازه نمونه‌ها و پخش نمونه‌ها میان سرورها را تنظیم می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"desiredReplicas":2,"chargedToman":0}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"autoscaling":true,"highAvailability":true,"minReplicas":2,"maxReplicas":3,"cpuTarget":70}}}}}}},"/api/projects/{name}/resource-alerts":{"get":{"operationId":"resource-alerts-get","tags":["اجرا و عملیات"],"summary":"قواعد هشدار منابع","description":"قواعد هشدار CPU و حافظه پروژه را بدون افشای اطلاعات کلاستر فهرست می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"rules":[{"id":"uuid","service_name":"app","metric":"cpu","threshold_percent":80,"duration_minutes":10,"severity":"warning","enabled":true}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"post":{"operationId":"resource-alerts-set","tags":["اجرا و عملیات"],"summary":"ثبت هشدار منابع","description":"آستانه CPU یا حافظه یک سرویس را ایجاد یا به‌روزرسانی می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"uuid","service_name":"app","metric":"cpu","threshold_percent":80,"duration_minutes":10,"severity":"warning","enabled":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"serviceName":"app","metric":"cpu","thresholdPercent":80,"durationMinutes":10,"severity":"warning"}}}}}},"delete":{"operationId":"resource-alerts-delete","tags":["اجرا و عملیات"],"summary":"حذف هشدار منابع","description":"قاعده هشدار انتخابی را حذف و هشدار فعال وابسته را رفع‌شده ثبت می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"id":"uuid"}}}}}}},"/api/projects/{name}/processes":{"get":{"operationId":"process-list","tags":["اجرا و عملیات"],"summary":"فهرست فرایندها","description":"Worker، Cron و Jobهای پروژه را همراه وضعیت، پلن و هزینه فهرست می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"processes":[{"id":"uuid","name":"queue","type":"worker","status":"active","billing_mode":"payg"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"post":{"operationId":"process-create","tags":["اجرا و عملیات"],"summary":"ساخت Worker، Cron یا Job","description":"یک فرایند مستقل با پلن، لاگ و چرخه پرداخت جدا زیر پروژه می‌سازد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"id":"uuid","chargedToman":0}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"type":"worker","name":"queue","command":"npm run worker","planId":"plan-id","billingMode":"payg","replicas":1}}}}}}},"/api/projects/{name}/processes/{id}":{"put":{"operationId":"process-update","tags":["اجرا و عملیات"],"summary":"ویرایش فرایند","description":"وضعیت، دستور اجرا یا زمان‌بندی Cron را تغییر می‌دهد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"status":"active","command":"npm run worker","schedule":"*/10 * * * *"}}}}}},"delete":{"operationId":"process-delete","tags":["اجرا و عملیات"],"summary":"حذف فرایند","description":"Worker، Cron یا Job را حذف می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write"}},"/api/projects/{name}/processes/{id}/run":{"post":{"operationId":"process-run","tags":["اجرا و عملیات"],"summary":"اجرای دستی Job","description":"یک اجرای جدید برای Job ایجاد می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"executionId":"uuid"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"deployments:write"}},"/api/projects/{name}/processes/{id}/logs":{"get":{"operationId":"process-logs","tags":["اجرا و عملیات"],"summary":"لاگ فرایند","description":"آخرین لاگ Worker، Cron یا Job را برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"logs":"Job completed","phase":"Succeeded"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"logs:read"}},"/api/volumes":{"get":{"operationId":"volumes-get","tags":["دیسک، فایل و بکاپ"],"summary":"فهرست دیسک‌ها","description":"دیسک‌های فضای کاری و کلاس‌های ذخیره‌سازی قابل سفارش را برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"offerings":[],"volumes":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"},"post":{"operationId":"volumes-post","tags":["دیسک، فایل و بکاپ"],"summary":"ساخت دیسک","description":"یک PVC مدیریت‌شده می‌سازد و آن را در مسیر مشخص به پروژه متصل می‌کند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"id":"uuid","chargedToman":0}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"project":"my-app","name":"data","mount_path":"/app/data","size_gb":10,"offering_id":"offering-id","billing_mode":"payg"}}}}}}},"/api/volumes/{id}":{"patch":{"operationId":"volumes-patch","tags":["دیسک، فایل و بکاپ"],"summary":"افزایش حجم دیسک","description":"در صورت پشتیبانی StorageClass، حجم دیسک را بدون حذف داده افزایش می‌دهد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"sizeGb":20}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"size_gb":20}}}}}},"delete":{"operationId":"volumes-delete","tags":["دیسک، فایل و بکاپ"],"summary":"حذف دیسک","description":"دیسک و داده آن را حذف می‌کند.\n\nپیش از حذف، بکاپ مستقل بگیرید. این عملیات قابل بازگشت نیست.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"}},"/api/volumes/{id}/files":{"get":{"operationId":"volume-files-get","tags":["دیسک، فایل و بکاپ"],"summary":"فهرست یا دانلود فایل","description":"محتوای یک مسیر را فهرست می‌کند یا فایل را به‌صورت stream دانلود می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","required":false,"description":"مسیر داخل دیسک","schema":{"type":"string"}},{"name":"download=1","in":"query","required":false,"description":"دانلود فایل","schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"path":"/","entries":[{"name":"uploads","type":"directory","size":0}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"post":{"operationId":"volume-files-post","tags":["دیسک، فایل و بکاپ"],"summary":"عملیات فایل","description":"پوشه یا فایل متنی می‌سازد، تغییر نام می‌دهد یا جابه‌جا می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"action":"mkdir","path":"/uploads"}}}}}},"put":{"operationId":"volume-files-put","tags":["دیسک، فایل و بکاپ"],"summary":"آپلود یا ذخیره فایل","description":"بدنه درخواست را در مسیر تعیین‌شده ذخیره می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","required":false,"description":"مسیر مقصد","schema":{"type":"string"}},{"name":"upload=1","in":"query","required":false,"description":"آپلود باینری","schema":{"type":"string"}},{"name":"overwrite=1","in":"query","required":false,"description":"جایگزینی فایل","schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write","requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"delete":{"operationId":"volume-files-delete","tags":["دیسک، فایل و بکاپ"],"summary":"حذف فایل","description":"فایل یا پوشه خالی را از دیسک حذف می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","required":false,"description":"مسیر هدف","schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"}},"/api/volumes/{id}/snapshots":{"post":{"operationId":"volume-snapshot","tags":["دیسک، فایل و بکاپ"],"summary":"ساخت Snapshot","description":"اگر CSI کلاستر پشتیبانی کند، Snapshot سازگار با دیسک می‌سازد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"id":"snapshot-id","status":"creating"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"}},"/api/snapshots/{id}":{"delete":{"operationId":"snapshot-delete","tags":["دیسک، فایل و بکاپ"],"summary":"حذف Snapshot","description":"Snapshot انتخابی را حذف می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"}},"/api/snapshots/{id}/restore":{"post":{"operationId":"snapshot-restore","tags":["دیسک، فایل و بکاپ"],"summary":"بازیابی Snapshot","description":"دیسک تازه‌ای از Snapshot می‌سازد و به پروژه متصل می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"volumeId":"uuid"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"}},"/api/volumes/{id}/backups":{"post":{"operationId":"volume-backup","tags":["دیسک، فایل و بکاپ"],"summary":"تهیه بکاپ دیسک","description":"یک بکاپ مستقل در Object Storage پاستا ایجاد می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"id":"backup-id","status":"queued"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"}},"/api/backups":{"get":{"operationId":"backups-get","tags":["دیسک، فایل و بکاپ"],"summary":"فهرست بکاپ‌ها و Snapshotها","description":"بکاپ‌های دیسک، دیتابیس و Snapshotهای قابل دسترسی را یکجا برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"backups":[{"kind":"volume","id":"uuid","source_volume_name":"uploads","status":"ready"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"}},"/api/backups/{id}":{"get":{"operationId":"backup-get","tags":["دیسک، فایل و بکاپ"],"summary":"دانلود بکاپ","description":"فایل بکاپ آماده را با URL امضاشده برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind=database","in":"query","required":false,"description":"برای بکاپ دیتابیس","schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"url":"https://…","expiresIn":900}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"},"delete":{"operationId":"backup-delete","tags":["دیسک، فایل و بکاپ"],"summary":"حذف بکاپ","description":"نسخه بکاپ مستقل را از فضای ذخیره‌سازی حذف می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind=database","in":"query","required":false,"description":"برای بکاپ دیتابیس","schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"}},"/api/backups/{id}/restore":{"post":{"operationId":"backup-restore","tags":["دیسک، فایل و بکاپ"],"summary":"بازیابی بکاپ دیسک","description":"آخرین محتوای بکاپ را به دیسک منبع بازیابی می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"status":"queued"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"volumes:write"}},"/api/databases":{"get":{"operationId":"databases-get","tags":["دیتابیس مدیریت‌شده"],"summary":"فهرست دیتابیس‌ها","description":"دیتابیس‌های فضای کاری، پلن‌ها و کلاس‌های دیسک سازگار را برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"plans":[],"storage":[],"databases":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write"},"post":{"operationId":"databases-post","tags":["دیتابیس مدیریت‌شده"],"summary":"ساخت دیتابیس","description":"PostgreSQL، MySQL، MongoDB یا Redis مدیریت‌شده را می‌سازد و به شبکه خصوصی پروژه متصل می‌کند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"id":"uuid","chargedToman":470000}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"project":"my-app","name":"app-db","plan_id":"plan-id","storage_offering_id":"offering-id","size_gb":10,"billing_mode":"monthly"}}}}}}},"/api/databases/{id}":{"get":{"operationId":"database-get","tags":["دیتابیس مدیریت‌شده"],"summary":"مشخصات اتصال دیتابیس","description":"وضعیت، آدرس خصوصی و اطلاعات اتصال دیتابیس را برای عضو مجاز برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"uuid","engine":"postgresql","host":"database-abc","port":5432,"database":"app","username":"app"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write"},"patch":{"operationId":"database-patch","tags":["دیتابیس مدیریت‌شده"],"summary":"تنظیم دیتابیس","description":"برنامه بکاپ، نگه‌داری، ابزار مدیریت و PITR را تغییر می‌دهد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"backupSchedule":"daily","backupRetention":7,"pitrEnabled":true}}}}}},"delete":{"operationId":"database-delete","tags":["دیتابیس مدیریت‌شده"],"summary":"حذف دیتابیس","description":"دیتابیس و دیسک عملیاتی آن را حذف می‌کند؛ بکاپ مستقل تا پایان نگه‌داری باقی می‌ماند.\n\nاین عملیات مخرب است.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write"}},"/api/databases/{id}/access":{"get":{"operationId":"database-access-get","tags":["دیتابیس مدیریت‌شده"],"summary":"کاربران و دیتابیس‌های منطقی","description":"Credentialها، اتصال‌های پروژه و مقصدهای مجاز را بدون نمایش رمز فهرست می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"engine":"postgres","credentials":[],"projects":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write"},"post":{"operationId":"database-access-post","tags":["دیتابیس مدیریت‌شده"],"summary":"مدیریت دسترسی دیتابیس","description":"Credential می‌سازد، رمز را نمایش یا تعویض می‌کند و اتصال پروژه ایجاد می‌کند. پاسخ عملیات ساخت، نمایش و تعویض شامل secret است و باید محرمانه بماند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"credentialId":"...","connection":{"url":"..."}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"action":"create","database_name":"reports","username":"reporter"}}}}}},"delete":{"operationId":"database-access-delete","tags":["دیتابیس مدیریت‌شده"],"summary":"حذف دسترسی","description":"Credential غیراصلی یا اتصال پروژه را با شناسه حذف می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"credential_id":"..."}}}}}}},"/api/databases/{id}/backups":{"get":{"operationId":"database-backups-get","tags":["دیتابیس مدیریت‌شده"],"summary":"بکاپ‌های دیتابیس","description":"بکاپ‌های دستی و زمان‌بندی‌شده دیتابیس را فهرست می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"backups":[{"id":"uuid","status":"ready","createdAt":"2026-08-01T00:00:00Z"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"post":{"operationId":"database-backups-post","tags":["دیتابیس مدیریت‌شده"],"summary":"بکاپ دستی دیتابیس","description":"Dump سازگار با موتور دیتابیس را در Object Storage ایجاد می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"id":"uuid","status":"queued"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write"}},"/api/databases/{id}/backups/{backupId}":{"get":{"operationId":"database-backup-get","tags":["دیتابیس مدیریت‌شده"],"summary":"دانلود بکاپ دیتابیس","description":"برای بکاپ آماده URL دانلود کوتاه‌عمر صادر می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"backupId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"url":"https://…","expiresIn":900}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"projects:read"},"delete":{"operationId":"database-backup-delete","tags":["دیتابیس مدیریت‌شده"],"summary":"حذف بکاپ دیتابیس","description":"بکاپ انتخابی و Base Backup مربوط به PITR را حذف می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"backupId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write"}},"/api/databases/{id}/backups/{backupId}/verify":{"post":{"operationId":"database-backup-verify","tags":["دیتابیس مدیریت‌شده"],"summary":"تست صحت بکاپ","description":"قابلیت خواندن و سازگاری فایل بکاپ را بدون تغییر دیتابیس عملیاتی بررسی می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"backupId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"status":"verified"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write"}},"/api/databases/{id}/backups/{backupId}/restore":{"post":{"operationId":"database-backup-restore","tags":["دیتابیس مدیریت‌شده"],"summary":"بازیابی بکاپ دیتابیس","description":"بکاپ انتخابی را روی سرویس دیتابیس بازیابی می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"backupId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"status":"queued"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write"}},"/api/databases/{id}/recovery":{"post":{"operationId":"database-recovery","tags":["دیتابیس مدیریت‌شده"],"summary":"بازیابی نقطه‌ای (PITR)","description":"PostgreSQL را تا زمان مشخص‌شده بازیابی می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"status":"queued"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"databases:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"target_at":"2026-08-01T10:30:00+03:30"}}}}}}},"/api/cdn/sites":{"get":{"operationId":"cdn-sites-list","tags":["شبکه توزیع محتوا"],"summary":"دامنه‌ها و پلن‌های CDN","description":"دامنه‌های CDN همان فضای کاری را همراه مصرف، سلامت ذخیره‌شده، پلن‌های فعال و Nameserverها برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"sites":[],"plans":[],"nameservers":["l.ns.sotoon53.com","ns.sotoon53.com"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:read"},"post":{"operationId":"cdn-site-create","tags":["شبکه توزیع محتوا"],"summary":"ساخت سرویس CDN","description":"دامنه را با رکوردهای تاییدشده می‌سازد و هزینه ماه اول پلن را از کیف پول کسر می‌کند.\n\nعملیات مالی است. پاسخ تکراری برای دامنه موجود همان فضای کاری به‌صورت recovered و بدون شارژ دوباره برمی‌گردد.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"201":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"id":"uuid","automaticDns":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"domain":"example.com","origin":"203.0.113.10","scheme":"https","planId":"starter","records":[]}}}}}}},"/api/cdn/scan":{"post":{"operationId":"cdn-domain-scan","tags":["شبکه توزیع محتوا"],"summary":"اسکن رکوردهای DNS","description":"پیش از ساخت CDN، رکوردهای عمومی رایج دامنه را با محدودیت نرخ بررسی می‌کند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"domain":"example.com","records":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"domain":"example.com"}}}}}}},"/api/cdn/sites/{id}":{"get":{"operationId":"cdn-site-get","tags":["شبکه توزیع محتوا"],"summary":"جزئیات سرویس CDN","description":"وضعیت tenant-scoped سرویس، رکوردها، مبداها، فایروال و سلامت زنده ارائه‌دهنده را برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"site":{"id":"uuid","domain":"example.com"},"summary":{"connected":true},"records":[],"upstreams":[],"firewallRules":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:read"},"patch":{"operationId":"cdn-renewal-restore","tags":["شبکه توزیع محتوا"],"summary":"فعال‌سازی دوباره تمدید","description":"لغو پایان دوره را تا پیش از شروع حذف سرویس برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"periodEnd":"2026-09-01T00:00:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write"},"delete":{"operationId":"cdn-site-delete","tags":["شبکه توزیع محتوا"],"summary":"لغو یا حذف CDN","description":"به‌طور پیش‌فرض تمدید را در پایان دوره لغو می‌کند؛ immediate=1 سرویس را فوراً و بدون بازپرداخت دوره جاری حذف می‌کند.\n\nحذف فوری مخرب است و هزینه دوره جاری بازپرداخت نمی‌شود.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"immediate","in":"query","required":false,"description":"برای حذف فوری مقدار 1","schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"scheduled":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write"}},"/api/cdn/sites/{id}/plan":{"put":{"operationId":"cdn-plan-upgrade","tags":["شبکه توزیع محتوا"],"summary":"ارتقای پلن CDN","description":"پلن را فقط به سطح بالاتر ارتقا می‌دهد و اختلاف هزینه دوره جاری را تراکنشی کسر می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"plan":{"id":"pro"},"chargedToman":90000,"balanceToman":410000,"periodEnd":"2026-09-01T00:00:00Z"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"planId":"pro"}}}}}}},"/api/cdn/sites/{id}/records":{"get":{"operationId":"cdn-records-list","tags":["شبکه توزیع محتوا"],"summary":"رکوردهای DNS","description":"رکوردهای DNS دامنه متعلق به همان فضای کاری را از ارائه‌دهنده دریافت می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"records":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:read"},"post":{"operationId":"cdn-record-create","tags":["شبکه توزیع محتوا"],"summary":"افزودن رکورد DNS","description":"یک رکورد اعتبارسنجی‌شده را تا سقف پلن اضافه می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"records":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"name":"www","type":"CNAME","value":"example.com","ttl":300,"cdn":true}}}}}},"patch":{"operationId":"cdn-record-update","tags":["شبکه توزیع محتوا"],"summary":"ویرایش رکورد DNS","description":"رکورد مشخص‌شده را با ورودی اعتبارسنجی‌شده جایگزین می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"records":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"id":"www:0","name":"www","type":"CNAME","value":"example.com","ttl":300,"cdn":true}}}}}},"delete":{"operationId":"cdn-record-delete","tags":["شبکه توزیع محتوا"],"summary":"حذف رکورد DNS","description":"رکورد مشخص‌شده را از دامنه همان فضای کاری حذف می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"records":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"id":"www:0"}}}}}}},"/api/cdn/sites/{id}/origin":{"get":{"operationId":"cdn-origin-get","tags":["شبکه توزیع محتوا"],"summary":"مبداهای CDN","description":"تنظیمات Upstream دامنه را بدون اطلاعات داخلی ارائه‌دهنده برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"upstreams":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:read"},"patch":{"operationId":"cdn-origin-update","tags":["شبکه توزیع محتوا"],"summary":"تنظیم مبدا CDN","description":"سرورها، پروتکل، Host header و Health Check مبدا را اعتبارسنجی و ذخیره می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true,"upstreams":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"name":"quickcdn-www","scheme":"https","hostHeader":"www.example.com","servers":[{"host":"203.0.113.10","port":443,"weight":1}],"healthProtocol":"tcp","healthPath":"/","haRouting":false,"smartRouting":false}}}}}}},"/api/cdn/sites/{id}/actions":{"post":{"operationId":"cdn-action","tags":["شبکه توزیع محتوا"],"summary":"عملیات CDN","description":"کش مسیرهای مشخص را پاک می‌کند یا TLS، WAF و حالت توسعه را طبق قابلیت پلن تغییر می‌دهد.\n\nهر purge از سهم ماهانه پلن استفاده می‌کند؛ مسیرها حداکثر ۲۰ مورد هستند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"action":"purge","paths":["/*"]}}}}}}},"/api/cdn/sites/{id}/firewall":{"get":{"operationId":"cdn-firewall-list","tags":["شبکه توزیع محتوا"],"summary":"قوانین فایروال CDN","description":"قوانین WAF دامنه همان فضای کاری را برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"rules":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:read"},"post":{"operationId":"cdn-firewall-create","tags":["شبکه توزیع محتوا"],"summary":"افزودن قانون فایروال","description":"قانون اعتبارسنجی‌شده را تا سقف پلن اضافه می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"rules":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"name":"block-admin","enabled":true,"constraintGroups":[[{"type":"path","operator":"starts_with","expected":["/admin"],"negate":false}]],"action":{"type":"block","statusCode":403}}}}}}},"put":{"operationId":"cdn-firewall-update","tags":["شبکه توزیع محتوا"],"summary":"ویرایش قانون فایروال","description":"قانون مشخص‌شده را با تعریف کامل جدید جایگزین می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"rules":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"id":"0","name":"block-admin","enabled":true,"constraintGroups":[[{"type":"path","operator":"starts_with","expected":["/admin"],"negate":false}]],"action":{"type":"block","statusCode":403}}}}}}},"patch":{"operationId":"cdn-firewall-toggle-move","tags":["شبکه توزیع محتوا"],"summary":"وضعیت یا اولویت قانون فایروال","description":"قانون را فعال/غیرفعال می‌کند یا یک ردیف بالا/پایین می‌برد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"rules":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"id":"0","operation":"move","direction":"up"}}}}}},"delete":{"operationId":"cdn-firewall-delete","tags":["شبکه توزیع محتوا"],"summary":"حذف قانون فایروال","description":"قانون مشخص‌شده را از دامنه همان فضای کاری حذف می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"rules":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"cdn:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"id":"0"}}}}}}},"/api/notifications":{"get":{"operationId":"notifications-get","tags":["اعلان‌ها"],"summary":"وضعیت اعلان‌ها","description":"کانال‌ها، مسیر هر هشدار، مقصدهای مجاز و ۵۰ تحویل اخیر فضای کاری را برمی‌گرداند؛ signing secret هرگز نمایش داده نمی‌شود.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"channels":[],"deliveries":[],"preferences":[],"availability":{"email":true,"sms":true},"members":[]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"notifications:read"},"post":{"operationId":"notifications-post","tags":["اعلان‌ها"],"summary":"ساخت کانال اعلان","description":"کانال ایمیل، پیامک یا Webhook می‌سازد. مقصد ایمیل باید عضو همان فضای کاری باشد.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"uuid","name":"عملیات","kind":"email","enabled":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"notifications:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"name":"عملیات","kind":"email","destination":"ops@example.com"}}}}}}},"/api/notifications/preferences":{"patch":{"operationId":"notification-preference-patch","tags":["اعلان‌ها"],"summary":"مسیر نوع هشدار","description":"ارسال ایمیل و پیامک را برای یک نوع هشدار تنظیم می‌کند؛ ثبت داخل پنل همیشه فعال می‌ماند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"kind":"uptime","email":false,"sms":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"notifications:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"kind":"uptime","email":false,"sms":false}}}}}}},"/api/notifications/{id}":{"patch":{"operationId":"notification-channel-patch","tags":["اعلان‌ها"],"summary":"فعال‌سازی کانال","description":"کانال انتخابی را فعال یا غیرفعال می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"uuid","enabled":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"notifications:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"enabled":true}}}}}},"post":{"operationId":"notification-channel-test","tags":["اعلان‌ها"],"summary":"آزمون کانال","description":"یک ارسال آزمایشی محدودشده به یک بار در پنج دقیقه در صف قرار می‌دهد.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"queued":"uuid"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"notifications:write"},"delete":{"operationId":"notification-channel-delete","tags":["اعلان‌ها"],"summary":"حذف کانال","description":"کانال متعلق به همان فضای کاری را حذف می‌کند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"deleted":"uuid"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"notifications:write"}},"/api/support":{"get":{"operationId":"support-tickets-list","tags":["پشتیبانی"],"summary":"فهرست تیکت‌های پشتیبانی","description":"حداکثر ۱۰۰ تیکت فضای کاری را به ترتیب آخرین پیام برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"tickets":[{"id":"uuid","number":"1042","subject":"خطای استقرار","status":"open","message_count":2}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"support:read"},"post":{"operationId":"support-ticket-create","tags":["پشتیبانی"],"summary":"ساخت تیکت پشتیبانی","description":"تیکت خصوصی فضای کاری را همراه نخستین پیام و پیوست اختیاری می‌سازد.\n\nعنوان ۵ تا ۱۵۰ و متن حداکثر ۱۰٬۰۰۰ کاراکتر است. پیوست مجاز حداکثر ۵ مگابایت است.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"201":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"uuid","number":1042}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"support:write","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"subject":{"type":"string","example":"خطای استقرار"},"body":{"type":"string","example":"شرح مسئله"},"category":{"type":"string","example":"technical"},"priority":{"type":"string","example":"normal"},"project":{"type":"string","example":"my-app"},"attachment":{"type":"string","format":"binary"}}}}}}}},"/api/support/{id}":{"get":{"operationId":"support-ticket-get","tags":["پشتیبانی"],"summary":"جزئیات تیکت پشتیبانی","description":"مشخصات تیکت و تمام پیام‌های همان تیکت را بدون ایمیل فرستندگان برمی‌گرداند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ticket":{"id":"uuid","number":"1042","subject":"خطای استقرار","status":"open"},"messages":[{"id":"uuid","sender_name":"کاربر","body":"شرح مسئله","is_staff":false,"attachment_name":null}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"support:read"},"post":{"operationId":"support-ticket-reply","tags":["پشتیبانی"],"summary":"ارسال پاسخ تیکت","description":"پاسخ جدید و پیوست اختیاری را به تیکت متعلق به همان فضای کاری اضافه می‌کند.\n\nمتن پاسخ حداکثر ۱۰٬۰۰۰ کاراکتر و پیوست حداکثر ۵ مگابایت است.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"support:write","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"body":{"type":"string","example":"اطلاعات تکمیلی"},"attachment":{"type":"string","format":"binary"}}}}}}},"patch":{"operationId":"support-ticket-close","tags":["پشتیبانی"],"summary":"بستن تیکت پشتیبانی","description":"تیکت متعلق به فضای کاری را می‌بندد؛ کاربران مشتری نمی‌توانند وضعیت یا اولویت دیگری تعیین کنند.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"ok":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"support:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"status":"closed"}}}}}}},"/api/support/{id}/attachments/{messageId}":{"get":{"operationId":"support-attachment-get","tags":["پشتیبانی"],"summary":"دریافت پیوست تیکت","description":"پیوست یک پیام را فقط از تیکت متعلق به همان فضای کاری دریافت می‌کند.\n\nپاسخ خصوصی و no-store است و نام فایل با Content-Disposition ارسال می‌شود.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"فایل پیوست","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"support:read"}},"/api/mcp":{"post":{"operationId":"mcp","tags":["اتوماسیون"],"summary":"Paasta MCP Server","description":"درخواست JSON-RPC 2.0 ابزارهای سازگار با MCP را پردازش می‌کند؛ شامل فهرست پروژه، لاگ، استقرار و عملیات مجاز Token.\n\nهمان Bearer Token پاستا را در Authorization بفرستید. Scope هر ابزار هنگام اجرا کنترل می‌شود.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"درخواست موفق","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"jsonrpc":"2.0","id":1,"result":{"tools":[]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-paasta-scope":"scope بر اساس ابزار MCP","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"paasta_…","description":"API Token ساخته‌شده در کنسول پاستا"}},"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"requestId":{"type":"string"}}}},"responses":{"BadRequest":{"description":"ورودی نامعتبر","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Unauthorized":{"description":"Token وجود ندارد، نامعتبر یا منقضی است","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Forbidden":{"description":"Scope یا دسترسی پروژه کافی نیست","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"NotFound":{"description":"منبع در فضای کاری پیدا نشد","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Conflict":{"description":"وضعیت فعلی منبع با عملیات سازگار نیست","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"RateLimited":{"description":"سقف درخواست رد شده است؛ Retry-After را رعایت کنید","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}