跳到主要内容

17. 端点完整列表

PlantPulse API 的所有 REST 端点及客户端方法映射。基础路径为 /api/v5

认证: 调用 APIClient_V5.connect() 时会自动签发和管理 api_key,因此无需用户自行调用任何认证端点。

17.1 System

HTTP端点方法
GET/api/v5/pingclient.system().ping()

17.3 Site(6 个)

HTTP端点方法
POST/api/v5/siteclient.site().create(req)
PUT/api/v5/site/{id}client.site().update(id, req)
DELETE/api/v5/site/{id}client.site().delete(id)
GET/api/v5/site/{id}client.site().get(id)
GET/api/v5/siteclient.site().list()
GET/api/v5/site/{id}/existsclient.site().exists(id)

17.4 OPC(10 个)

HTTP端点方法
POST/api/v5/opcclient.opc().create(req)
PUT/api/v5/opc/{id}client.opc().update(id, req)
DELETE/api/v5/opc/{id}client.opc().delete(id)
GET/api/v5/opc/{id}client.opc().get(id)
GET/api/v5/opcclient.opc().list()
GET/api/v5/opc?site_id={id}client.opc().listBySite(siteId)
GET/api/v5/opc?opc_type={type}client.opc().listByType(type)
GET/api/v5/opc/{id}/existsclient.opc().exists(id)
GET/api/v5/opc/countclient.opc().count()
GET/api/v5/opc/count?site_id={id}client.opc().countBySite(siteId)

17.5 Asset(6 个)

HTTP端点方法
POST/api/v5/assetclient.asset().create(req)
PUT/api/v5/asset/{id}client.asset().update(id, req)
DELETE/api/v5/asset/{id}client.asset().delete(id)
GET/api/v5/asset/{id}client.asset().get(id)
GET/api/v5/assetclient.asset().list()
GET/api/v5/asset/{id}/existsclient.asset().exists(id)

17.6 Tag(23 个)

CRUD + 列表

HTTP端点方法
POST/api/v5/tagclient.tag().create(req)
PUT/api/v5/tag/{id}client.tag().update(id, req)
DELETE/api/v5/tag/{id}client.tag().delete(id)
GET/api/v5/tag/{id}client.tag().get(id)
GET/api/v5/tag/{id}/existsclient.tag().exists(id)
GET/api/v5/tagclient.tag().list()
GET/api/v5/tag?site_id={id}client.tag().listBySite(siteId)
GET/api/v5/tag?opc_id={id}client.tag().listByOpc(opcId)
GET/api/v5/tag?asset_id={id}client.tag().listByAsset(assetId)
GET/api/v5/tag/countclient.tag().count()
GET/api/v5/tag/count?site_id={id}client.tag().countBySite(siteId)
GET/api/v5/tag/count?opc_id={id}client.tag().countByOpc(opcId)
GET/api/v5/tag/count?asset_id={id}client.tag().countByAsset(assetId)

PATCH(10 个 —— 按标签页局部修改)

HTTP端点方法
PATCH/api/v5/tag/{id}/basicpatchBasic(id, req)
PATCH/api/v5/tag/{id}/alarmpatchAlarm(id, req)
PATCH/api/v5/tag/{id}/metadatapatchMetadata(id, req)
PATCH/api/v5/tag/{id}/calculationpatchCalculation(id, req)
PATCH/api/v5/tag/{id}/samplingpatchSampling(id, req)
PATCH/api/v5/tag/{id}/aggregationpatchAggregation(id, req)
PATCH/api/v5/tag/{id}/aipatchAi(id, req)
PATCH/api/v5/tag/{id}/publishpatchPublish(id, req)
PATCH/api/v5/tag/{id}/attributepatchAttribute(id, req)
PATCH/api/v5/tag/{id}/linkpatchLink(id, req)

17.7 Alarm(2 个)

HTTP端点方法
GET/api/v5/alarm/{seq}client.alarm().get(seq)
GET/api/v5/alarm?limit={n}client.alarm().list(limit)

17.8 Order(11 个)

HTTP端点方法
POST/api/v5/orderclient.order().create(req)
PUT/api/v5/order/{id}client.order().update(id, req)
DELETE/api/v5/order/{id}client.order().delete(id)
GET/api/v5/order/{id}client.order().get(id)
GET/api/v5/orderclient.order().list()
GET/api/v5/order/{id}/existsclient.order().exists(id)
POST/api/v5/order/{id}/startclient.order().start(id)
POST/api/v5/order/{id}/endclient.order().end(id)
POST/api/v5/order/{id}/pauseclient.order().pause(id)
POST/api/v5/order/{id}/resumeclient.order().resume(id)
POST/api/v5/order/{id}/abortclient.order().abort(id)

17.9 Calendar(6 个)

HTTP端点方法
POST/api/v5/calendarclient.calendar().create(req)
PUT/api/v5/calendar/{id}client.calendar().update(id, req)
DELETE/api/v5/calendar/{id}client.calendar().delete(id)
GET/api/v5/calendar/{id}client.calendar().get(id)
GET/api/v5/calendarclient.calendar().list()
GET/api/v5/calendar/search?from={iso}&to={iso}client.calendar().search(from, to)

17.10 Customer(8 个)

HTTP端点方法
POST/api/v5/customerclient.customer().create(req)
PUT/api/v5/customer/{id}client.customer().update(id, req)
DELETE/api/v5/customer/{id}client.customer().delete(id)
GET/api/v5/customer/{id}client.customer().get(id)
GET/api/v5/customerclient.customer().list()
GET/api/v5/customer?site_id={id}client.customer().listBySite(siteId)
GET/api/v5/customer/{id}/existsclient.customer().exists(id)
GET/api/v5/customer/countclient.customer().count()

17.11 Employee(7 个)

HTTP端点方法
POST/api/v5/employeeclient.employee().create(req)
PUT/api/v5/employee/{id}client.employee().update(id, req)
DELETE/api/v5/employee/{id}client.employee().delete(id)
GET/api/v5/employee/{id}client.employee().get(id)
GET/api/v5/employeeclient.employee().list()
GET/api/v5/employee/{id}/existsclient.employee().exists(id)
GET/api/v5/employee/countclient.employee().count()

17.12 Product(7 个)

HTTP端点方法
POST/api/v5/productclient.product().create(req)
PUT/api/v5/product/{id}client.product().update(id, req)
DELETE/api/v5/product/{id}client.product().delete(id)
GET/api/v5/product/{id}client.product().get(id)
GET/api/v5/productclient.product().list()
GET/api/v5/product/{id}/existsclient.product().exists(id)
GET/api/v5/product/countclient.product().count()

17.13 Path(2 个)

HTTP端点方法
GET/api/v5/path/asset/{id}client.path().getByAsset(assetId)
GET/api/v5/path/tag/{id}client.path().getByTag(tagId)

17.14 Flow(3 个)

HTTP端点方法
GET/api/v5/flow/{id}client.flow().get(flowId)
GET/api/v5/flowclient.flow().list()
GET/api/v5/flow/{id}/nodeclient.flow().listNodes(flowId)

17.15 统计

端点数
System1
Site6
OPC10
Asset6
Tag23(CRUD 5 + 列表 7 + 计数 4 + PATCH 10
Alarm2
Order11(CRUD 6 + 生命周期 5)
Calendar6
Customer8
Employee7
Product7
Path2
Flow3
合计92(+认证 1)

17.16 HTTP 方法分布

HTTP数量用途
GET56查询(单条/列表/是否存在/计数)
POST16注册 + Order 生命周期
PUT10全量修改
PATCH10Tag 按标签页局部修改
DELETE10删除

KOPENS All rights reserved.