{"openapi":"3.1.0","info":{"title":"Haizora API","version":"1.0.0","description":"Create a personal API token in the panel (Account > API tokens) and send it as `Authorization: Bearer hz_...` (tokens created before the Haizora rename start with `v360_` and keep working).\n\n- A token belongs to ONE organisation and never has more rights than its creator's current role there. If the creator leaves the organisation, the token stops working.\n- `read` tokens can only make GET requests and act as the read-only `viewer` role. `write` tokens act with the creator's role (owner, admin, member).\n- A token can be limited to products: servers, domains, managed, functions, apps, cdn, waf, k8s, gpu, monitors, ssl, email, sms, ai, bots, sites, studio, billing, support, audit. Each operation lists its product in `x-v360-product`.\n- Tokens cannot manage tokens, team members or invitations; use the panel for those.\n- Rate limit: 300 requests per minute per token (`X-RateLimit-Remaining`, `Retry-After` on 429).\n- Errors are always `{ \"error\": { \"code\", \"message\" } }`."},"servers":[{"url":"https://cloudapi.vadi360.com/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Account"},{"name":"Servers"},{"name":"Billing"},{"name":"Domains & DNS"},{"name":"Managed services"},{"name":"Functions"},{"name":"Apps"},{"name":"CDN"},{"name":"WAF"},{"name":"Monitoring"},{"name":"Kubernetes"},{"name":"GPU"},{"name":"SSL"},{"name":"Audit log"}],"paths":{"/portal/me":{"get":{"tags":["Account"],"summary":"Current user and organisation","description":"Works with `read` and `write` tokens.","operationId":"get_account_current_user_and_organisation","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read"}},"/portal/servers":{"get":{"tags":["Servers"],"summary":"List servers","description":"Works with `read` and `write` tokens.","operationId":"get_servers_list_servers","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Server"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"servers"}},"/portal/servers/{id}":{"get":{"tags":["Servers"],"summary":"Get a server","description":"Works with `read` and `write` tokens.","operationId":"get_servers_get_a_server","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["item"],"properties":{"item":{"$ref":"#/components/schemas/Server"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"servers"}},"/portal/servers/{id}/live":{"get":{"tags":["Servers"],"summary":"Live status (CPU, RAM, power state)","description":"Works with `read` and `write` tokens.","operationId":"get_servers_live_status_cpu_ram_power_state","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"servers"}},"/portal/servers/{id}/power":{"post":{"tags":["Servers"],"summary":"Power action","description":"Requires a `write` token.","operationId":"post_servers_power_action","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["start","shutdown","stop","reboot"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"action":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"servers"}},"/portal/servers/{id}/backups":{"get":{"tags":["Servers"],"summary":"List backups","description":"Works with `read` and `write` tokens.","operationId":"get_servers_list_backups","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"servers"}},"/portal/servers/{id}/snapshots":{"get":{"tags":["Servers"],"summary":"List snapshots","description":"Works with `read` and `write` tokens.","operationId":"get_servers_list_snapshots","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"servers"},"post":{"tags":["Servers"],"summary":"Take a snapshot","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_servers_take_a_snapshot","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","maxLength":100}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"servers","x-v360-roles":["owner","admin"]}},"/portal/orders":{"post":{"tags":["Billing"],"summary":"Place an order (server, managed database, hosting...)","description":"Creates a subscription and an invoice per item. The service is provisioned after the invoice is paid (bank transfer or wallet). A server created from a subscription carries its `subscriptionId`.\n\nRequires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_billing_place_an_order_server_managed_database_hosting","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/OrderItem"}}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"},"invoice":{"$ref":"#/components/schemas/Invoice"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"billing","x-v360-roles":["owner","admin"]}},"/portal/billing/subscriptions":{"get":{"tags":["Billing"],"summary":"List subscriptions","description":"Works with `read` and `write` tokens.","operationId":"get_billing_list_subscriptions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"billing"}},"/portal/billing/subscriptions/{id}/cancel":{"post":{"tags":["Billing"],"summary":"Cancel a subscription","description":"Pending subscriptions are cancelled at once. Active ones run until the end of the paid period unless `when` is `now` (no refund).\n\nRequires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_billing_cancel_a_subscription","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"when":{"type":"string","enum":["period_end","now"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["item"],"properties":{"item":{"$ref":"#/components/schemas/Subscription"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"billing","x-v360-roles":["owner","admin"]}},"/portal/billing/invoices":{"get":{"tags":["Billing"],"summary":"List invoices","description":"Works with `read` and `write` tokens.","operationId":"get_billing_list_invoices","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"billing"}},"/portal/wallet":{"get":{"tags":["Billing"],"summary":"Wallet balance","description":"Works with `read` and `write` tokens.","operationId":"get_billing_wallet_balance","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"billing"}},"/portal/domains":{"get":{"tags":["Domains & DNS"],"summary":"List domains","description":"Works with `read` and `write` tokens.","operationId":"get_domains_dns_list_domains","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"domains"}},"/portal/domains/{id}/dns":{"get":{"tags":["Domains & DNS"],"summary":"List DNS records","description":"Works with `read` and `write` tokens.","operationId":"get_domains_dns_list_dns_records","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"domains"},"post":{"tags":["Domains & DNS"],"summary":"Add a DNS record","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_domains_dns_add_a_dns_record","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnsRecord"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["item"],"properties":{"item":{"$ref":"#/components/schemas/DnsRecord"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"domains","x-v360-roles":["owner","admin"]},"delete":{"tags":["Domains & DNS"],"summary":"Delete a DNS record","description":"Records have no id: send the same type, name and value that the list returned.\n\nRequires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"delete_domains_dns_delete_a_dns_record","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnsRecord"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"domains","x-v360-roles":["owner","admin"]}},"/portal/domains/{id}/nameservers":{"get":{"tags":["Domains & DNS"],"summary":"Get nameservers","description":"Works with `read` and `write` tokens.\n\nOnly tokens created by: owner, admin.","operationId":"get_domains_dns_get_nameservers","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"nameservers":{"type":"array","items":{"type":"string"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"domains","x-v360-roles":["owner","admin"]},"put":{"tags":["Domains & DNS"],"summary":"Set nameservers","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"put_domains_dns_set_nameservers","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["hosts"],"properties":{"hosts":{"type":"array","minItems":2,"maxItems":12,"items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"domains","x-v360-roles":["owner","admin"]}},"/portal/panel-accounts":{"get":{"tags":["Managed services"],"summary":"List managed services (hosting, e-mail, PostgreSQL / MySQL / Redis databases, object storage)","description":"Works with `read` and `write` tokens.","operationId":"get_managed_services_list_managed_services_hosting_e_mail_postgresql_mysql_redis_databases_object_storage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ManagedService"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"managed"}},"/portal/functions":{"get":{"tags":["Functions"],"summary":"List functions","description":"Works with `read` and `write` tokens.","operationId":"get_functions_list_functions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Function"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"functions"},"post":{"tags":["Functions"],"summary":"Create and deploy a function","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_functions_create_and_deploy_a_function","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionDeployResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"functions","x-v360-roles":["owner","admin"]}},"/portal/functions/{id}":{"get":{"tags":["Functions"],"summary":"Get a function with versions and current code","description":"Works with `read` and `write` tokens.","operationId":"get_functions_get_a_function_with_versions_and_current_code","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/Function"},"versions":{"type":"array","items":{"type":"object"}},"code":{"type":["string","null"]},"language":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"functions"},"delete":{"tags":["Functions"],"summary":"Delete a function","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"delete_functions_delete_a_function","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"functions","x-v360-roles":["owner","admin"]}},"/portal/functions/{id}/deploy":{"post":{"tags":["Functions"],"summary":"Deploy a new version","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_functions_deploy_a_new_version","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"language":{"type":"string","enum":["js","ts"]},"env":{"type":"object","additionalProperties":{"type":"string"}},"secrets":{"type":"object","additionalProperties":{"type":["string","null"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionDeployResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"functions","x-v360-roles":["owner","admin"]}},"/portal/functions/{id}/rollback":{"post":{"tags":["Functions"],"summary":"Roll back to a version","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_functions_roll_back_to_a_version","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["version"],"properties":{"version":{"type":"integer","minimum":1}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionDeployResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"functions","x-v360-roles":["owner","admin"]}},"/portal/functions/{id}/env":{"put":{"tags":["Functions"],"summary":"Set environment variables and secrets","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"put_functions_set_environment_variables_and_secrets","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"env":{"type":"object","additionalProperties":{"type":"string"}},"secrets":{"type":"object","additionalProperties":{"type":["string","null"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["item"],"properties":{"item":{"$ref":"#/components/schemas/Function"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"functions","x-v360-roles":["owner","admin"]}},"/portal/functions/{id}/stats":{"get":{"tags":["Functions"],"summary":"Request statistics","description":"Works with `read` and `write` tokens.","operationId":"get_functions_request_statistics","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}},{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":30,"default":7}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"functions"}},"/portal/apps":{"get":{"tags":["Apps"],"summary":"List apps (static sites)","description":"Works with `read` and `write` tokens.","operationId":"get_apps_list_apps_static_sites","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/App"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"apps"}},"/portal/apps/{id}/deployments":{"get":{"tags":["Apps"],"summary":"List deployments","description":"Works with `read` and `write` tokens.","operationId":"get_apps_list_deployments","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"apps"}},"/portal/cdn":{"get":{"tags":["CDN"],"summary":"List CDN sites","description":"Works with `read` and `write` tokens.","operationId":"get_cdn_list_cdn_sites","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CdnSite"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"cdn"},"post":{"tags":["CDN"],"summary":"Create a CDN site","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_cdn_create_a_cdn_site","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["hostname","origin"],"properties":{"hostname":{"type":"string"},"origin":{"type":"string","format":"uri"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["item"],"properties":{"item":{"$ref":"#/components/schemas/CdnSite"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"cdn","x-v360-roles":["owner","admin"]}},"/portal/cdn/{id}/purge":{"post":{"tags":["CDN"],"summary":"Purge the cache","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_cdn_purge_the_cache","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"cdn","x-v360-roles":["owner","admin"]}},"/portal/cdn/{id}":{"delete":{"tags":["CDN"],"summary":"Delete a CDN site","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"delete_cdn_delete_a_cdn_site","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"cdn","x-v360-roles":["owner","admin"]}},"/portal/waf":{"get":{"tags":["WAF"],"summary":"List protected sites and candidates","description":"Works with `read` and `write` tokens.","operationId":"get_waf_list_protected_sites_and_candidates","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/WafSite"}},"candidates":{"type":"array","items":{"type":"object"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"waf"},"post":{"tags":["WAF"],"summary":"Protect a CDN site or app","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_waf_protect_a_cdn_site_or_app","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["resourceType","resourceId"],"properties":{"resourceType":{"type":"string","enum":["cdn","app"]},"resourceId":{"type":"string","format":"uuid"},"plan":{"type":"string","enum":["basic","pro"]},"level":{"type":"string","enum":["low","medium","high"]},"settings":{"type":"object"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["item"],"properties":{"item":{"$ref":"#/components/schemas/WafSite"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"waf","x-v360-roles":["owner","admin"]}},"/portal/waf/{id}":{"put":{"tags":["WAF"],"summary":"Update WAF settings","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"put_waf_update_waf_settings","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string"},"level":{"type":"string"},"settings":{"type":"object"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["item"],"properties":{"item":{"$ref":"#/components/schemas/WafSite"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"waf","x-v360-roles":["owner","admin"]},"delete":{"tags":["WAF"],"summary":"Remove protection","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"delete_waf_remove_protection","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"waf","x-v360-roles":["owner","admin"]}},"/portal/monitors":{"get":{"tags":["Monitoring"],"summary":"List uptime monitors","description":"Works with `read` and `write` tokens.","operationId":"get_monitoring_list_uptime_monitors","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"monitors"},"post":{"tags":["Monitoring"],"summary":"Create an uptime monitor","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"post_monitoring_create_an_uptime_monitor","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"name":{"type":"string"},"keyword":{"type":"string"},"intervalSec":{"type":"integer"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"monitors","x-v360-roles":["owner","admin"]}},"/portal/monitors/{id}":{"patch":{"tags":["Monitoring"],"summary":"Update / pause a monitor","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"patch_monitoring_update_pause_a_monitor","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"keyword":{"type":["string","null"]},"intervalSec":{"type":"integer"},"paused":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"monitors","x-v360-roles":["owner","admin"]},"delete":{"tags":["Monitoring"],"summary":"Delete a monitor","description":"Requires a `write` token.\n\nOnly tokens created by: owner, admin.","operationId":"delete_monitoring_delete_a_monitor","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"write","x-v360-product":"monitors","x-v360-roles":["owner","admin"]}},"/portal/k8s":{"get":{"tags":["Kubernetes"],"summary":"List Kubernetes clusters","description":"Works with `read` and `write` tokens.","operationId":"get_kubernetes_list_kubernetes_clusters","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"k8s"}},"/portal/k8s/{id}/kubeconfig":{"get":{"tags":["Kubernetes"],"summary":"Download kubeconfig","description":"Needs a `write` token: read-only tokens act as the viewer role.\n\nWorks with `read` and `write` tokens.\n\nOnly tokens created by: owner, admin.","operationId":"get_kubernetes_download_kubeconfig","parameters":[{"name":"id","in":"path","required":true,"description":"Kayit kimligi (UUID)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"k8s","x-v360-roles":["owner","admin"]}},"/portal/gpu":{"get":{"tags":["GPU"],"summary":"List GPU rentals","description":"Works with `read` and `write` tokens.","operationId":"get_gpu_list_gpu_rentals","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"gpu"}},"/portal/ssl":{"get":{"tags":["SSL"],"summary":"List SSL certificates","description":"Works with `read` and `write` tokens.","operationId":"get_ssl_list_ssl_certificates","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"ssl"}},"/portal/audit-log":{"get":{"tags":["Audit log"],"summary":"Audit log of the organisation","description":"Needs a `write` token (read-only tokens act as the viewer role). Paginate with `before` = the last item's `createdAt`.\n\nWorks with `read` and `write` tokens.\n\nOnly tokens created by: owner, admin.","operationId":"get_audit_log_audit_log_of_the_organisation","parameters":[{"name":"before","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntry"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-v360-scope":"read","x-v360-product":"audit","x-v360-roles":["owner","admin"]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"hz_<43 chars> (older: v360_<43 chars>)","description":"Personal API token"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","examples":["TOKEN_SCOPE"]},"message":{"type":"string"}}}}},"Me":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":["string","null"]}}},"org":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]}}}}},"Server":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"planKey":{"type":"string"},"subscriptionId":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["provisioning","active","suspended","terminated"]},"region":{"type":["string","null"]},"ipv4":{"type":["string","null"]},"ipv6":{"type":["string","null"]},"vcpu":{"type":["integer","null"]},"ramMb":{"type":["integer","null"]},"diskGb":{"type":["integer","null"]},"ssh":{"type":["object","null"],"properties":{"host":{"type":"string"},"port":{"type":"integer"},"user":{"type":"string"}}},"publicIpv4":{"type":["string","null"],"description":"Yerel VPS genel IPv4 eki (atanmis adres)"},"createdAt":{"type":"string","format":"date-time"}}},"OrderItem":{"type":"object","required":["planKey"],"properties":{"planKey":{"type":"string","examples":["vps-business"]},"domain":{"type":["string","null"]},"region":{"type":["string","null"]},"publicIpv4":{"type":"boolean","description":"Yerel VPS: genel IPv4 eki (bakiyeden gunluk)"}}},"Subscription":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"planKey":{"type":"string"},"status":{"type":"string","enum":["pending","active","suspended","cancelled"]},"price":{"type":"string"},"currency":{"type":"string"}},"additionalProperties":true},"Invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"numara":{"type":"string"},"total":{"type":"string"},"currency":{"type":"string"},"status":{"type":"string","enum":["unpaid","paid","cancelled"]}},"additionalProperties":true},"Domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string"},"status":{"type":"string"},"autoRenew":{"type":"boolean"}},"additionalProperties":true},"DnsRecord":{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","CAA"]},"name":{"type":"string","default":"@"},"value":{"type":"string"},"ttl":{"type":"integer","minimum":60,"maximum":86400,"default":3600},"priority":{"type":"integer","description":"MX only"}}},"ManagedService":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"subscriptionId":{"type":"string","format":"uuid"},"kind":{"type":"string","examples":["hosting","email","postgres","mysql","redis","s3","analytics","agents"]},"status":{"type":"string","enum":["provisioning","active","suspended","deleted"]},"domain":{"type":["string","null"]},"username":{"type":"string"},"database":{"type":["object","null"],"description":"Connection details for managed databases"},"createdAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"FunctionInput":{"type":"object","required":["name","code"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$","description":"3-32 chars, lowercase letters, digits and dashes; becomes {name}-fn.<apps domain>"},"code":{"type":"string","description":"ES module: export default { async fetch(request, env) { ... } }"},"language":{"type":"string","enum":["js","ts"],"default":"js"},"env":{"type":"object","additionalProperties":{"type":"string"}},"secrets":{"type":"object","additionalProperties":{"type":"string"}}}},"Function":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"url":{"type":["string","null"]},"status":{"type":"string"},"provider":{"type":["string","null"]},"activeVersion":{"type":["integer","null"]},"pendingVersion":{"type":["integer","null"]},"queued":{"type":"boolean"},"env":{"type":"object"},"secrets":{"type":"array","items":{"type":"string"},"description":"Names only; values are write-only"}},"additionalProperties":true},"FunctionDeployResult":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/Function"},"queued":{"type":"boolean","description":"true: no provider was available, the deploy is queued"}}},"App":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"url":{"type":"string"}},"additionalProperties":true},"CdnSite":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"origin":{"type":"string"},"status":{"type":"string"},"provider":{"type":"string"}},"additionalProperties":true},"WafSite":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"resourceType":{"type":"string"},"resourceId":{"type":"string"},"plan":{"type":"string"},"level":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"AuditEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"action":{"type":"string","examples":["token.create","team.role","POST /portal/functions/:id/deploy"]},"targetType":{"type":["string","null"]},"targetId":{"type":["string","null"]},"details":{"type":"object"},"actor":{"type":"object","properties":{"userId":{"type":["string","null"]},"email":{"type":["string","null"]},"tokenId":{"type":["string","null"]}}},"status":{"type":["integer","null"]},"ip":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}}}},"responses":{"BadRequest":{"description":"Invalid input (INVALID_INPUT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing, invalid, revoked or expired token (TOKEN_INVALID, TOKEN_REVOKED, TOKEN_EXPIRED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Outside the token's scope or role (TOKEN_SCOPE, TOKEN_FORBIDDEN, FORBIDDEN, READ_ONLY_ROLE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not found (also for resources of other organisations)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests for this token (RATE_LIMITED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}