### GET /websites/s_apifox_cn_6aa360d3-d8f2-471e-b841-3a35c33a7b7c Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-269530619 Retrieves website configuration details. ```APIDOC ## GET /websites/s_apifox_cn_6aa360d3-d8f2-471e-b841-3a35c33a7b7c ### Description Retrieves the configuration details for a specific website, including scaling strategies, resources, and services. ### Method GET ### Endpoint /websites/s_apifox_cn_6aa360d3-d8f2-471e-b841-3a35c33a7b7c ### Parameters #### Query Parameters - **scaling_strategy** (object) - Optional - Configuration for the scaling strategy. - **min_workers** (integer) - Required - Minimum number of workers. - **max_workers** (integer) - Required - Maximum number of workers. - **idle_timeout** (integer) - Required - Timeout for idle workers. - **execution_timeout** (integer) - Required - Timeout for task execution. - **switch** (boolean) - Required - Enable or disable scaling. - **benchmark** (object) - Required - Benchmark configuration. - **queue_length** (object) - Required - Queue length configuration. - **port** (number) - Required - Port number. - **request_count_threshold** (number) - Required - Request count threshold. - **max_concurrency_per_instance** (number) - Required - Maximum concurrency per instance. - **resources** (array) - Optional - List of resources. - **resource** (object) - Required - Resource details. - **device_name** (string) - Required - Device name. - **region** (string) - Required - Region identifier. - **gpu_name** (string) - Optional - GPU name. - **gpu_count** (integer) - Required - Number of GPUs. - **gpu_memory** (integer) - Required - GPU memory in MB. - **memory** (integer) - Required - System memory in MB. - **cpu_cores** (integer) - Required - Number of CPU cores. - **region_name** (string) - Optional - Region name. - **mark** (string) - Required - Resource unique identifier. - **services** (array) - Optional - List of services. - **service_id** (number) - Optional - Service ID. - **service_name** (string) - Optional - Service name. ### Response #### Success Response (200) - **scaling_strategy** (object) - Configuration for the scaling strategy. - **resources** (array) - List of resources. - **services** (array) - List of services. #### Response Example ```json { "scaling_strategy": { "min_workers": 1, "max_workers": 5, "idle_timeout": 300, "execution_timeout": 600, "switch": true, "benchmark": { "queue_length": { "port": 8080, "request_count_threshold": 100, "max_concurrency_per_instance": 10 } } }, "resources": [ { "resource": { "device_name": "gpu_0", "region": "us-east-1", "gpu_count": 1, "gpu_memory": 16384, "memory": 32768, "cpu_cores": 8 }, "mark": "resource-123" } ], "services": [ { "service_id": 1, "service_name": "inference-service" } ] } ``` ``` -------------------------------- ### GET /api/deployment/resource/search Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c Retrieves a list of device resources and their associated information. ```APIDOC ## GET /api/deployment/resource/search ### Description Get a list of device resources and their related information. ### Method GET ### Endpoint /api/deployment/resource/search ### Parameters #### Query Parameters - **task_type** (enum) - Required - Specifies the type of task. Possible values: Deployment. - **device_type** (enum) - Required - Specifies the type of device. Possible values: GpuDevice. #### Header Parameters - **token** (string) - Required - API key obtained from the platform. - **timestamp** (number) - Required - Current timestamp. - **version** (string) - Required - Fixed version string, e.g., "1.0.0". ### Request Example ```curl curl --location --request GET 'https://openapi.suanli.cn/api/deployment/resource/search?task_type=Deployment&device_type=GpuDevice' \ --header 'token;' \ --header 'timestamp: 1770194570564' \ --header 'version: 1.0.0' ``` ### Response #### Success Response (200) - **code** (string) - Required - Response code. - **message** (string | null) - Required - Response message. - **data** (object) - Optional - Contains the response data. - **count** (number) - Required - The total number of results. - **results** (array [object]) - Required - A list of device resources. - **device_name** (string) - Description of the device name. - **regions** (array [object]) - List of regions where the device is available. - **region** (string) - The region identifier. - **region_name** (string) - The name of the region. - **mark** (object) - Additional marking information. - **price** (number) - The price of the resource. - **discount_price** (number) - The discounted price of the resource. - **inventory** (number) - The available inventory. - **gpu_name** (string) - The name of the GPU. - **gpu_memory** (number) - The memory of the GPU. - **gpu_count** (number) - The number of GPUs. - **memory** (number) - The system memory. - **cpu_cores** (number) - The number of CPU cores. - **disk_size** (number) - The size of the disk. - **disk_type** (string) - The type of the disk. #### Response Example ```json { "code": "0000", "message": "success", "data": { "count": 1, "results": [ { "device_name": "H20 x 8", "regions": [ { "region": "hebeif-1", "region_name": "河北一区", "mark": { "resource": { "device_name": "H20 x 8", "region": "hebeif-1", "gpu_name": "H20", "gpu_count": 8, "gpu_memory": 786432, "memory": 1572864, "cpu_cores": 192 }, "region_name": null, "mark": "ha8GDGEAORN3a9Hhu7X+W4Vtce8YV33R2cqzDf1CeFte7rPSMOMpgrHAlL3THz4zxz17CQ2xan6Q2UrnIQ6pUPcLqpoLUCh5MaAY9kIet8llTG2oulHTzTR0DoTuhhQcWfNOpn3zHQbZ3F73AivgnZVpBnOidOQtK7OFQF2etyubD5p/9khWFNjEhW7QZGN49g==" }, "price": 16416, "discount_price": 16416, "inventory": 0 }, { "region": "xingjiangf-1", "region_name": "新疆一区", "mark": { "resource": { "device_name": "H20 x 8", "region": "xingjiangf-1", "gpu_name": "H20", "gpu_count": 8, "gpu_memory": 786432, "memory": 1572864, "cpu_cores": 192 }, "mark": "ha8GDGEAORN3a9Hhu7X+W4Vtce8YV33R2cqzDf1CeFte7rPCPO8rgb6My/iZEGhhnkByGBWLJiXf9FrtIWq5B6VS154UUBlufO9OrkJD/5AYRniwik7PgmExT5Dggh4GT60Z5zDsAUmMnxLiCiLjnotzUzf7CeQyLImVDRXK/TvcZdwJCgWWDknwrBCDIAAVli9FdX8=" }, "price": 16416, "discount_price": 16416, "inventory": 0 } ], "gpu_name": "H20", "gpu_memory": 786432, "gpu_count": 8, "memory": 1572864, "cpu_cores": 192, "disk_size": 81920, "disk_type": "HDD" } ] } } ``` ``` -------------------------------- ### GET /api/deployment/resource/search Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-296881020 Retrieves a list of device resources based on task and device types. ```APIDOC ## GET /api/deployment/resource/search ### Description 获取设备资源列表及其相关信息。 ### Method GET ### Endpoint /api/deployment/resource/search ### Parameters #### Query Parameters - **task_type** (string) - Required - 如果有多个值,请使用英文逗号(,)分隔. Enum: Deployment - **device_type** (string) - Required - 如果有多个值,请使用英文逗号(,)分隔. Enum: GpuDevice #### Header Parameters - **token** (string) - Required - 请填入您在平台内创建的 API 密钥,获取路径为:右上角头像 → API 密钥。 - **timestamp** (number) - Required - 时间戳 - **version** (number) - Required - 固定值 ### Response #### Success Response (200) - **code** (string) - 状态码 - **message** (string) - 响应消息 - **data** (object) - 响应数据 - **count** (number) - 资源总数 - **results** (array) - 资源列表 - **device_name** (string) - 设备名称 - **regions** (array) - 区域信息 - **region** (string) - 区域唯一标识 - **region_name** (string) - 区域名称 - **mark** (object) - 资源详情 - **resource** (object) - 资源规格 - **device_name** (string) - 设备名称 - **region** (string) - 区域tag - **gpu_name** (string) - GPU名称 - **gpu_count** (integer) - GPU数量 - **gpu_memory** (integer) - GPU显存 - **memory** (integer) - 内存 - **cpu_cores** (integer) - CPU核数 ``` -------------------------------- ### POST /api/deployment/task/create Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-296881505 Create an elastic deployment task. Requires authentication via API key and a timestamp. The `resources.item.mark` field must be obtained from the 'Get Device Resource List' interface. ```APIDOC ## POST /api/deployment/task/create ### Description Creates an elastic deployment task. The `resources.item.mark` field needs to be obtained from the 'Get Device Resource List' interface. ### Method POST ### Endpoint /api/deployment/task/create ### Parameters #### Header Parameters - **token** (string) - Required - Please fill in the API key you created on the platform. Path: Avatar in the upper right corner → API Key. - **timestamp** (number) - Required - Timestamp - **version** (string) - Required - Fixed value #### Request Body - **task_type** (string) - Optional - Task type, must be 'Deployment'. - **task_name** (string) - Required - Task name. - **repository_username** (string) - Optional - Private repository username. This is a write-only field and only effective when submitting requests; query interfaces do not return it. Cannot be updated after creation. - **repository_password** (string) - Optional - Private repository password. This is a write-only field and only effective when submitting requests; query interfaces do not return it. Cannot be updated after creation. - **points** (number) - Optional - Number of nodes. - **scheduler_strategy** (object) - Optional - Cross-zone scheduling. - **mode** (string) - Required - Must be 'Unrestricted'. - **task_qos** (object) - Optional - CPU exclusive. - **class** (string) - Required - Must be 'Guaranteed'. - **load_balance** (object) - Optional - Load balancing strategy. - **type** (string) - Required - Load balancing type. Enum: LeastConnection, RoundRobin, Random, IpHash, HeaderHash, CookieHash. - **params** (object) - Optional - Parameters for load balancing. - **header** (string) - Optional - HTTP Header name. Only applicable when type is 'HeaderHash'. ### Request Example ```json { "task_type": "Deployment", "task_name": "MyDeploymentTask", "repository_username": "myuser", "repository_password": "mypassword", "points": 5, "scheduler_strategy": { "mode": "Unrestricted" }, "task_qos": { "class": "Guaranteed" }, "load_balance": { "type": "RoundRobin", "params": { "header": "X-Custom-Header" } }, "resources": { "item": { "mark": "unique_resource_id_123" } }, "services": [ { "name": "web-service", "port": 80 } ] } ``` ### Response #### Success Response (200) - **message** (string) - Description of the success message. - **data** (object) - Contains details of the created task. - **taskId** (string) - The ID of the created task. #### Response Example ```json { "message": "Task created successfully.", "data": { "taskId": "task_abc123" } } ``` ``` -------------------------------- ### GET /api/deployment/task/point_log Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-335612564 获取弹性部署任务节点的日志信息。 ```APIDOC ## GET /api/deployment/task/point_log ### Description 获取弹性部署任务节点的日志信息。 ### Method GET ### Endpoint /api/deployment/task/point_log ### Parameters #### Query Parameters - **task_id** (number) - Required - 任务ID - **point_id** (number) - Required - 节点ID - **service_id** (number) - Required - 服务ID,从任务详情中获取。 #### Header Parameters - **token** (string) - Required - 请填入您在平台内创建的 API 密钥,获取路径为:右上角头像 → API 密钥。 - **timestamp** (number) - Required - 时间戳 - **version** (string) - Required - 固定值 ### Response #### Success Response (200) - **data** (object) - 响应数据 - **logs** (string) - 节点日志内容 #### Response Example { "data": { "logs": "string" } } ``` -------------------------------- ### GET /websites/s_apifox_cn_6aa360d3-d8f2-471e-b841-3a35c33a7b7c Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-407029996 Retrieves a list of websites with detailed information. ```APIDOC ## GET /websites/s_apifox_cn_6aa360d3-d8f2-471e-b841-3a35c33a7b7c ### Description Retrieves a list of websites with detailed information, including storage, status, and associated deployments. ### Method GET ### Endpoint /websites/s_apifox_cn_6aa360d3-d8f2-471e-b841-3a35c33a7b7c ### Parameters #### Query Parameters - **tag** (string) - Required - 区域tag - **name** (string) - Required - 区域名称 - **size** (number) - Optional - 共享存储卷-存储桶总容量 - **status** (string) - Optional - 是否加速. Enum: Unactivated, Activate - **remark** (string) - Optional - 备注 - **use_size** (number) - Optional - 对象存储加速-加速用量 / 共享存储卷-存储用量 - **share_storage_type** (string) - Optional - 共享存储类型. Enum: Single ### Response #### Success Response (200) - **name** (string) - 区域名称 - **size** (number) - 共享存储卷-存储桶总容量 - **status** (string) - 是否加速. Enum: Unactivated, Activate - **deployments** (array) - 所关联的任务 - **deployment_id** (string) - 任务id - **deployment_name** (string) - 任务名 - **target_dir** (string) - 任务挂载目录 - **task_type** (string) - 任务类型. Enum: Deployment, Development - **regions** (array) - **tag** (string) - 区域tag - **name** (string) - 区域名称 - **remark** (string) - 备注 - **use_size** (number) - 对象存储加速-加速用量 / 共享存储卷-存储用量 - **create_time** (string) - 创建时间(RFC3339)格式 - **share_storage_type** (string) - 共享存储类型. Enum: Single #### Response Example ```json { "name": "example_region", "size": 1024, "status": "Activate", "deployments": [ { "deployment_id": "dep_123", "deployment_name": "MyDeployment", "target_dir": "/mnt/data", "task_type": "Deployment", "regions": [ { "tag": "us-east-1", "name": "N. Virginia" } ] } ], "remark": "Some notes", "use_size": 512, "create_time": "2023-10-27T10:00:00Z", "share_storage_type": "Single" } ``` ``` -------------------------------- ### GET /api/deployment/task/pod_event Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-335613302 获取弹性部署任务节点的事件信息。 ```APIDOC ## GET /api/deployment/task/pod_event ### Description 获取弹性部署任务节点的事件信息。 ### Method GET ### Endpoint /api/deployment/task/pod_event ### Parameters #### Query Parameters - **point_id** (number) - Required - 节点ID #### Header Parameters - **token** (string) - Required - 请填入您在平台内创建的 API 密钥,获取路径为:右上角头像 → API 密钥。 - **timestamp** (number) - Required - 时间戳 - **version** (string) - Required - 固定值 ### Response #### Success Response (200) - **data** (object) - 响应数据 - **events** (array) - 事件列表 - **reason** (string) - 事件原因 - **message** (string) - 事件消息 - **type** (string) - 事件类型 - **event_time** (string) - 事件时间 - **service** (string) - 服务名称 #### Response Example { "data": { "events": [ { "reason": "Started", "message": "Started container", "type": "Normal", "event_time": "2023-10-01T12:00:00Z", "service": "web-service" } ] } } ``` -------------------------------- ### GET /nodes Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-296885186 查询系统中的节点列表信息。 ```APIDOC ## GET /nodes ### Description 该接口用于查询系统中的节点列表。 ### Method GET ### Endpoint /nodes ``` -------------------------------- ### GET /api/harbor/support/billing/get_billing_record Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-406942464 查询镜像仓库的计费信息,支持按小时、天、周或月进行统计。 ```APIDOC ## GET /api/harbor/support/billing/get_billing_record ### Description 查询镜像仓库的计费信息。 ### Method GET ### Endpoint /api/harbor/support/billing/get_billing_record ### Parameters #### Query Parameters - **range** (string) - Required - 时间粒度 (hour, day, week, month) - **start_time** (string) - Required - 开始时间(RFC3339格式) - **end_time** (string) - Required - 结束时间(RFC3339格式) - **page** (number) - Optional - 页码 - **page_size** (number) - Optional - 每页条数 #### Header Parameters - **token** (string) - Required - API 密钥 - **timestamp** (number) - Required - 时间戳 - **version** (string) - Required - 固定值 ### Response #### Success Response (200) - **count** (number) - 记录总数 - **results** (array) - 计费记录列表 - **billing_coin** (string) - 总账 - **discount_coin** (string) - 优惠抵扣 - **end_time** (string) - 结束时间 - **start_time** (string) - 开始时间 ``` -------------------------------- ### GET /resources Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-296881020 Retrieves a list of available computing resources, including device names, GPU specifications, memory, CPU cores, and regional availability. ```APIDOC ## GET /resources ### Description Retrieves a list of available computing resources and their associated regional inventory. ### Method GET ### Endpoint /resources ### Response #### Success Response (200) - **count** (integer) - Total number of resources - **results** (array) - List of resource objects #### Response Example { "count": 1, "results": [ { "device_name": "string", "regions": [ { "region": "string", "region_name": "string", "mark": "string", "price": 0, "discount_price": 0, "inventory": 0 } ], "gpu_name": "string", "gpu_memory": 0, "gpu_count": 0, "memory": 0, "cpu_cores": 0, "disk_size": 0, "disk_type": "string" } ] } ``` -------------------------------- ### Get Storage Buckets Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-407029996 Retrieves a list of storage buckets with their configurations. Supports filtering and pagination. ```APIDOC ## GET /api/v1/storage/buckets ### Description Retrieves a list of storage buckets. This endpoint allows fetching storage bucket information, including details like storage type, name, and associated regions. It supports filtering by storage type and pagination. ### Method GET ### Endpoint /api/v1/storage/buckets ### Parameters #### Query Parameters - **storage_type** (string) - Optional - Filters buckets by storage type (e.g., 'ShareStorage', 'Juicefs'). - **page** (integer) - Optional - The page number for pagination. Defaults to 1. - **page_size** (integer) - Optional - The number of items per page. Defaults to 20. ### Response #### Success Response (200) - **count** (integer) - The total number of storage buckets matching the query. - **results** (array) - An array of storage bucket objects. - **storage_id** (number) - The unique identifier for the storage bucket. - **storage_type** (string) - The type of the storage bucket ('ShareStorage' or 'Juicefs'). - **storage_name** (string) - The name of the storage bucket. - **regions** (array) - A list of regions associated with the storage bucket. - **tag** (string) - The tag identifier for the region. - **name** (string) - The name of the region. - **juicefs_region_id** (number) - The region ID for Juicefs storage. - **k3s_cloud_name** (string) - The cloud service provider name for Juicefs storage. - **k3s_region_name** (string) - The cloud service provider region name for Juicefs storage. - **activate_regions** (array) - A list of activated regions for the storage bucket. - **tag** (string) - The tag identifier for the activated region. - **name** (string) - The name of the activated region. - **syncing_regions** (array) - A list of regions currently syncing for the storage bucket. - **tag** (string) - The tag identifier for the syncing region. - **name** (string) - The name of the syncing region. - **size** (number) - The total size of the storage bucket. - **use_size** (number) - The used size of the storage bucket. - **create_time** (string) - The timestamp when the storage bucket was created. - **status** (string) - The current status of the storage bucket. - **deployments** (string) - Deployment information for the storage bucket. - **remark** (string) - Any remarks or notes about the storage bucket. - **share_storage_type** (string) - The type of shared storage. #### Response Example ```json { "count": 10, "results": [ { "storage_id": 123, "storage_type": "ShareStorage", "storage_name": "my-share-bucket", "regions": [ { "tag": "us-east-1", "name": "N. Virginia" } ], "juicefs_region_id": null, "k3s_cloud_name": null, "k3s_region_name": null, "activate_regions": [], "syncing_regions": [], "size": 1024000, "use_size": 512000, "create_time": "2023-10-27T10:00:00Z", "status": "active", "deployments": "default", "remark": "Primary storage", "share_storage_type": "NFS" } ] } ``` #### Error Response (400) - **code** (integer) - Error code. - **message** (string) - Error message. #### Error Response Example ```json { "code": 400, "message": "Invalid storage type provided." } ``` ``` -------------------------------- ### GET /api/deployment/task/points Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-296885186 Retrieves a list of nodes associated with a specific deployment task. ```APIDOC ## GET /api/deployment/task/points ### Description Query the list of nodes for a specific deployment task. ### Method GET ### Endpoint /api/deployment/task/points ### Parameters #### Query Parameters - **task_id** (number) - Required - The ID of the task. - **status** (string) - Optional - Node status (Running, Pending, Failed, End). Use commas for multiple values. - **page** (number) - Optional - Page number. - **page_size** (number) - Optional - Number of items per page. #### Header Parameters - **token** (string) - Required - API key for authentication. - **timestamp** (number) - Required - Current timestamp. - **version** (string) - Required - API version (e.g., 1.0.0). ### Response #### Success Response (200) - **count** (number) - Total number of nodes. - **results** (array) - List of deployment nodes. ``` -------------------------------- ### GET /api/storage/get_storage Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-314646799 Retrieves a list of storage resources based on type and status, including pagination support. ```APIDOC ## GET /api/storage/get_storage ### Description Retrieves a list of storage resources and their related information. This endpoint requires authentication via API headers. ### Method GET ### Endpoint /api/storage/get_storage ### Parameters #### Query Parameters - **storage_type** (string) - Required - Storage type (e.g., Juicefs) - **status** (string) - Required - Status (Activate, Unactivated) - **page** (number) - Optional - Page number - **page_size** (number) - Optional - Items per page #### Header Parameters - **token** (string) - Required - API key obtained from the platform - **timestamp** (number) - Required - Current timestamp - **version** (string) - Required - API version (e.g., 1.0.0) ### Response #### Success Response (200) - **code** (string) - Response code - **message** (string) - Response message - **data** (object) - Contains count and results array #### Response Example { "code": "200", "message": "success", "data": { "count": 1, "results": [ { "storage_id": 123, "storage_type": "Juicefs", "storage_name": "example-storage" } ] } } ``` -------------------------------- ### POST /api/deployment/task/pause Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-296882601 暂停运行中的弹性部署任务。注意:暂停后资源将被释放。 ```APIDOC ## POST /api/deployment/task/pause ### Description 暂停运行中的弹性部署任务。注意:暂停后资源将被释放。 ### Method POST ### Endpoint /api/deployment/task/pause ### Parameters #### Header Parameters - **token** (string) - Required - 请填入您在平台内创建的 API 密钥,获取路径为:右上角头像 → API 密钥。 - **timestamp** (number) - Required - 时间戳 - **version** (string) - Required - 固定值 #### Request Body - **task_id** (integer) - Required - 任务id ### Request Example { "task_id": 1 } ### Response #### Success Response (200) - **code** (string) - 响应状态码 - **message** (string) - 响应信息 - **data** (null) - 响应数据 #### Response Example { "code": "string", "message": "string", "data": null } ``` -------------------------------- ### Deployment Resource Schema Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-296881505 Defines the structure for deployment resources, including device and GPU specifications. ```APIDOC ## IDeployResource ### Description Defines the resource requirements for a deployment. ### Request Body - **resource** (object) - Required - 资源信息 - **device_name** (string) - Required - 设备名称 - **region** (string) - Required - 区域唯一标识 - **gpu_name** (string) - Required - GPU名称 - **gpu_count** (integer) - Required - GPU数量 - **gpu_memory** (integer) - Required - GPU显存 - **memory** (integer) - Required - 内存 - **cpu_cores** (integer) - Required - CPU核数 - **region_name** (string) - Required - 地区名称 - **mark** (string) - Required - 资源唯一标识 ``` -------------------------------- ### 健康检查配置 (IHealthCheck) Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-269530619 定义服务健康检查的参数,支持 HTTP GET 和 TCP Socket 两种检查类型。 ```APIDOC ## 健康检查配置模型 ### 描述 用于配置服务的健康检查机制,确保服务运行状态的实时监控。 ### Parameters - **switch** (boolean) - 开关 - **probe_type** (string) - 检查类型 (httpGet, tcpSocket) - **path** (string) - 检查路径 - **port** (integer) - 检查端口 - **initial_delay_seconds** (integer) - 初始延迟 (秒) - **period_seconds** (integer) - 检查周期 (秒) ### Example { "switch": false, "probe_type": "httpGet", "path": "/live", "port": 80, "initial_delay_seconds": 0 } ``` -------------------------------- ### POST /api/deployment/task/stop Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-314631776 删除弹性部署任务。注意:删除后资源将释放,且不可恢复。 ```APIDOC ## POST /api/deployment/task/stop ### Description 删除弹性部署任务。注意:删除后资源将释放,且不可恢复。 ### Method POST ### Endpoint /api/deployment/task/stop ### Parameters #### Header Parameters - **token** (string) - Required - 请填入您在平台内创建的 API 密钥,获取路径为:右上角头像 → API 密钥。 - **timestamp** (number) - Required - 时间戳 - **version** (string) - Required - 固定值 #### Request Body - **task_id** (number) - Required - 任务id ### Request Example { "task_id": 1 } ### Response #### Success Response (200) - **code** (string) - 状态码 - **message** (string) - 响应消息 - **data** (null) - 数据内容 #### Response Example { "code": "string", "message": "string", "data": null } ``` -------------------------------- ### Dynamic Pod Scaling Configuration Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-402249411 Configuration for dynamic pod scaling based on various metrics. ```APIDOC ## Dynamic Pod Scaling Configuration ### Description This section describes the configuration for dynamic pod scaling, allowing automatic adjustment of worker nodes based on performance metrics. ### Parameters #### Request Body - **dynamic_pod_strategy** (object) - Configuration for dynamic pod scaling. - **min_workers** (number) - Minimum number of worker nodes. - **max_workers** (number) - Maximum number of worker nodes. - **idle_timeout** (number) - Timeout duration for idle workers. - **execution_timeout** (number) - Timeout duration for task execution. - **switch** (boolean) - Enable or disable dynamic pod scaling. - **benchmark** (array) - Array of scaling strategies and their indicators. - **scaling_strategy** (string) - The type of scaling strategy (e.g., 'queue_delay', 'queue_length'). - **indicators** (object) - Metrics used for scaling. - **port** (number) - The port to monitor. - **queue_delay_threshold** (number) - Threshold for queue delay (in seconds) for 'queue_delay' strategy. - **request_count_threshold** (number) - Threshold for request count for 'queue_length' strategy. - **max_concurrency_per_instance** (number) - Maximum concurrency allowed per instance. ### Request Example ```json { "dynamic_pod_strategy": { "min_workers": 2, "max_workers": 10, "idle_timeout": 300, "execution_timeout": 600, "switch": true, "benchmark": [ { "scaling_strategy": "queue_delay", "indicators": { "port": 8080, "queue_delay_threshold": 5, "max_concurrency_per_instance": 100 } }, { "scaling_strategy": "queue_length", "indicators": { "port": 8081, "request_count_threshold": 50, "max_concurrency_per_instance": 50 } } ] } } ``` ### Response #### Success Response (200) - **dynamic_pod_strategy** (object) - The configured dynamic pod scaling settings. #### Response Example ```json { "dynamic_pod_strategy": { "min_workers": 2, "max_workers": 10, "idle_timeout": 300, "execution_timeout": 600, "switch": true, "benchmark": [ { "scaling_strategy": "queue_delay", "indicators": { "port": 8080, "queue_delay_threshold": 5, "max_concurrency_per_instance": 100 } }, { "scaling_strategy": "queue_length", "indicators": { "port": 8081, "request_count_threshold": 50, "max_concurrency_per_instance": 50 } } ] } } ``` ``` -------------------------------- ### Website Configuration API Source: https://s.apifox.cn/6aa360d3-d8f2-471e-b841-3a35c33a7b7c/api-269530619 This section details the configuration parameters for a website service, including environment settings, storage, and network configurations. ```APIDOC ## POST /websites/{websiteId} ### Description This endpoint allows for the creation or update of a website configuration. ### Method POST ### Endpoint /websites/{websiteId} ### Parameters #### Path Parameters - **websiteId** (string) - Required - The unique identifier for the website. #### Request Body - **service_image** (string) - Required - The service image to be used for the website. - **env** (string) - Optional - Environment variables for the service. - **shared_mem_size** (number) - Optional - The size of the shared memory. - **storage_config** (array) - Optional - Configuration for S3 storage. - **storage_id** (integer) - Required - The ID of the storage. - **target_dir** (string) - Required - The target directory for mounting. - **share_storage_config** (array) - Optional - Configuration for shared memory storage. - **storage_id** (integer) - Required - The ID of the storage. - **target_dir** (string) - Required - The target directory for mounting. - **remote_ports** (array) - Optional - List of exposed service ports. - **url** (string) - Optional - The service callback URL. - **service_port** (integer) - Required - The service port to expose. - **health_checks** (object) - Required - Health check configurations. - **liveness_probe** (object) - Required - Configuration for the liveness probe. - **switch** (boolean) - Required - Enable or disable the probe. - **probe_type** (string) - Required - The type of probe. - **path** (string) - Required - The path for the probe. - **port** (integer) - Required - The port for the probe. - **initial_delay_seconds** (integer) - Required - Initial delay in seconds. - **period_seconds** (integer) - Required - Period in seconds. - **timeout_seconds** (integer) - Required - Timeout in seconds. - **failure_threshold** (integer) - Required - Failure threshold. - **startup_probe** (object) - Required - Configuration for the startup probe. - **switch** (boolean) - Required - Enable or disable the probe. - **probe_type** (string) - Required - The type of probe. - **path** (string) - Required - The path for the probe. - **port** (integer) - Required - The port for the probe. - **initial_delay_seconds** (integer) - Required - Initial delay in seconds. - **period_seconds** (integer) - Required - Period in seconds. - **timeout_seconds** (integer) - Required - Timeout in seconds. - **failure_threshold** (integer) - Required - Failure threshold. - **readiness_probe** (object) - Required - Configuration for the readiness probe. - **switch** (boolean) - Required - Enable or disable the probe. - **probe_type** (string) - Required - The type of probe. - **path** (string) - Required - The path for the probe. - **port** (integer) - Required - The port for the probe. - **initial_delay_seconds** (integer) - Required - Initial delay in seconds. - **period_seconds** (integer) - Required - Period in seconds. - **timeout_seconds** (integer) - Required - Timeout in seconds. - **failure_threshold** (integer) - Required - Failure threshold. ### Request Example { "service_image": "nginx:latest", "env": "production", "shared_mem_size": 1024, "storage_config": [ { "storage_id": 1, "target_dir": "/data" } ], "remote_ports": [ { "service_port": 80 } ], "health_checks": { "liveness_probe": { "switch": true, "probe_type": "http", "path": "/healthz", "port": 8080, "initial_delay_seconds": 5, "period_seconds": 10, "timeout_seconds": 2, "failure_threshold": 3 }, "startup_probe": { "switch": true, "probe_type": "http", "path": "/startup", "port": 8080, "initial_delay_seconds": 10, "period_seconds": 5, "timeout_seconds": 2, "failure_threshold": 5 }, "readiness_probe": { "switch": true, "probe_type": "http", "path": "/ready", "port": 8080, "initial_delay_seconds": 15, "period_seconds": 10, "timeout_seconds": 2, "failure_threshold": 3 } } } ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the website configuration was updated successfully. #### Response Example { "message": "Website configuration updated successfully." } ```