openapi: 3.2.0 info: title: COSMOPlat IoT Platform Open Rule Chains API version: 线上 (online) summary: Device, product, alarm, rule-chain, thing-model, telemetry and RPC operations for the COSMOPlat (Kaos) industrial IoT platform. description: "Machine-readable transcription of the COSMOPlat 物联开发平台 (IoT development platform) \"OpenApi-线上\" reference published by COSMOPlat at https://www.cosmoplat.com/help/detail/304/1038\n\nThe provider publishes this contract as an HTML reference table only — no OpenAPI, Swagger, Postman or other machine-readable artifact is served anywhere on cosmoplat.com. This document transcribes that reference so it can be read by a machine.\n\nGAPS THE PROVIDER HAS NOT PUBLISHED (deliberately left empty here rather than guessed):\n * No base URL / server host is stated anywhere in the reference, so `servers` is omitted.\n * No authentication scheme is documented for these operations, so `securitySchemes` is empty.\n * No per-operation 4xx/5xx catalogue is published; the single documented failure envelope from 公共分类 › 状态码描述 is wired as the `default` response.\n" contact: name: COSMOPlat email: market@cosmoplat.com url: https://www.cosmoplat.com/help x-provenance: authored_by: API Evangelist (catalog-authored) method: generated source: https://www.cosmoplat.com/help/detail/304/1038 generated: '2026-08-11' note: Transcribed field-for-field from the provider's published HTML API reference. COSMOPlat does not publish an OpenAPI document; this is not a provider artifact. Re-harvest and replace verbatim if COSMOPlat ever serves one. tags: - name: Rule Chains paths: /ruleChains: get: operationId: getRuleChains summary: 分页查询规则链 tags: - Rule Chains parameters: - name: page in: query required: true schema: type: string description: 页数(从0开始) - name: pageSize in: query required: true schema: type: string description: 每页最大数量 - name: type in: query required: false schema: type: string description: 类型 - name: textSearch in: query required: false schema: type: string description: 搜索文本 responses: '200': description: 业务数据 / Business payload content: application/json: schema: type: object properties: data: type: array items: type: object properties: id: type: object properties: entityType: type: string description: 固定值:RULE_CHAIN id: type: string description: ID description: ID createdTime: type: number description: 创建时间 tenantId: type: object properties: entityType: type: string description: 固定值:TENANT id: type: string description: 租户ID description: 租户ID name: type: string description: 名称 type: type: string description: 类型 firstRuleNodeId: type: object properties: entityType: type: string description: 固定值:RULE_NODE id: type: string description: 第一个RoleNode的ID description: 第一个RoleNode的ID root: type: boolean description: 是否是根规则链 debugMode: type: boolean description: 调试模式 required: - id - createdTime - tenantId - name - type - firstRuleNodeId - root - debugMode description: 业务数据 totalPages: type: number description: 总页数 totalElements: type: number description: 总记录数 hasNext: type: boolean description: 是否有下一条记录 default: description: 失败响应 / Failure envelope documented in 公共分类 › 状态码描述 content: application/json: schema: $ref: '#/components/schemas/Error' externalDocs: description: 分页查询规则链 url: https://www.cosmoplat.com/help/detail/304/1038 /ruleChain: post: operationId: postRuleChain summary: 创建规则链 tags: - Rule Chains requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 名称 debugMode: type: boolean description: 是否调试 additionalInfo: type: object properties: description: type: string description: 描述 responses: '200': description: 业务数据 / Business payload content: application/json: schema: type: object properties: id: type: object properties: entityType: type: string description: 固定值:RULE_CHAIN id: type: string description: ID description: 规则链ID createdTime: type: number description: 创建时间 additionalInfo: type: object properties: description: type: string description: 描述 description: 额外信息 tenantId: type: object properties: entityType: type: string description: 固定值:TENANT id: type: string description: 租户ID description: 租户ID name: type: string description: 名称 type: type: string description: 类型 firstRuleNodeId: type: string description: 第一条规则链ID root: type: boolean description: 是否根规则链 debugMode: type: boolean description: 调试模式 default: description: 失败响应 / Failure envelope documented in 公共分类 › 状态码描述 content: application/json: schema: $ref: '#/components/schemas/Error' externalDocs: description: 创建规则链 url: https://www.cosmoplat.com/help/detail/304/1038 /ruleChain/{ruleChainId}: delete: operationId: deleteRuleChainByRuleChainId summary: 删除规则链 tags: - Rule Chains description: 成功httpCode返回200 parameters: - name: ruleChainId in: path required: true schema: type: string responses: '200': description: 成功 / Success default: description: 失败响应 / Failure envelope documented in 公共分类 › 状态码描述 content: application/json: schema: $ref: '#/components/schemas/Error' externalDocs: description: 删除规则链 url: https://www.cosmoplat.com/help/detail/304/1038 components: schemas: Error: type: object description: 失败报文 / Failure envelope (公共分类 › 状态码描述) properties: status: type: integer description: 状态码,和 httpCode 一致 / status code, same as the HTTP status message: type: string description: 状态描述 / status description errorCode: type: integer description: 错误码 / error code timestamp: type: string format: date-time description: 时间戳 / timestamp examples: - status: 500 message: 内部配置错误 errorCode: 2 timestamp: '2023-08-04T00:56:54.243+00:00' externalDocs: description: COSMOPlat IoT platform documentation url: https://www.cosmoplat.com/help/detail/304/1012