Find NiFi Remote Process Group is Enabled or Disabled via its Rest API

Find NiFi Remote Process Group is Enabled or Disabled via its Rest API

使用 NiFi REST API,

  1. 如何找到远程进程组是启用还是禁用?
  2. NiFi 中传输 (RemoteProcessGroupDTO) 和传输状态 (RemoteProcessGroupStatusDTO) 之间的区别?

端点: https://nifihost:8080/nifi-api/process-groups/{id}/remote-process-groups

1.How查找远程进程组是启用还是禁用?

您需要使用不同的端点来确定是否启用了 RPG

https://nifihost:8080/nifi-api/remote-process-groups/{id}

您可以解析 json 并检查组件对象中 传输的值 状态对象中的传输状态

2.Difference在NiFi中传输(RemoteProcessGroupDTO)和transmissionStatus(RemoteProcessGroupStatusDTO)之间?

它们都显示 RPG 传输的状态是布尔值,传输状态可以有字符串值

{
    "revision": {…},
    "id": "value",
    "uri": "value",
    "position": {…},
    "permissions": {…},
    "bulletins": [{…}],
    "disconnectedNodeAcknowledged": true,
    "component": {
        "id": "value",
        "versionedComponentId": "value",
        "parentGroupId": "value",
        "position": {…},
        "targetUri": "value",
        "targetUris": "value",
        "targetSecure": true,
        "name": "value",
        "comments": "value",
        "communicationsTimeout": "value",
        "yieldDuration": "value",
        "transportProtocol": "value",
        "localNetworkInterface": "value",
        "proxyHost": "value",
        "proxyPort": 0,
        "proxyUser": "value",
        "proxyPassword": "value",
        "authorizationIssues": ["value"],
        "validationErrors": ["value"],
        "transmitting": true,
        "inputPortCount": 0,
        "outputPortCount": 0,
        "activeRemoteInputPortCount": 0,
        "inactiveRemoteInputPortCount": 0,
        "activeRemoteOutputPortCount": 0,
        "inactiveRemoteOutputPortCount": 0,
        "flowRefreshed": "value",
        "contents": {…}
    },
    "status": {
        "groupId": "value",
        "id": "value",
        "name": "value",
        "targetUri": "value",
        "transmissionStatus": "value",
        "statsLastRefreshed": "value",
        "validationStatus": "value",
        "aggregateSnapshot": {…},
        "nodeSnapshots": [{…}]
    },
    "inputPortCount": 0,
    "outputPortCount": 0,
    "operatePermissions": {…}
}

参考:-https://nifi.apache.org/docs/nifi-docs/rest-api/index.html