Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 02-02-2023 04:25 AM - edited 02-02-2023 04:28 AM
Hi, I have a use case, where i have to see the content of each FlowFiles by triggering the API call.
API i have explored so far :
https://<URL>/nifi-api/flowfile-queues/<Queue-ID>/flowfiles/<FlowFile-UUID>/content
I got the response as below :
"The id of the node in the cluster is required."
Note : My NiFi is setting up in three node cluster.
Please suggest.
Created 02-02-2023 06:40 AM
@samrathal Per the docs you need to provide the ID:
Name Location Type Description
| id | path | string | The connection id. |
| flowfile-uuid | path | string | The flowfile uuid. |
| clusterNodeId | query | string | The id of the node where the content exists if clustered. |
You should be getting that ID from the previous get call (Gets a FlowFile from a Connection) within the
response is an object:
Inside is the "clusterNodeId" corresponding to which node that flowfile exists on.
{ "flowFile": { "uri": "value", "uuid": "value", "filename": "value", "position": 0, "size": 0, "queuedDuration": 0, "lineageDuration": 0, "penaltyExpiresIn": 0, "clusterNodeId": "value", "clusterNodeAddress": "value", "attributes": { "name": "value" }, "contentClaimSection": "value", "contentClaimContainer": "value", "contentClaimIdentifier": "value", "contentClaimOffset": 0, "contentClaimFileSize": "value", "contentClaimFileSizeBytes": 0, "penalized": true } }
Those details are exposed in the nifi api doc, just be sure to click into the entity.
Created 02-03-2023 01:57 AM
Hi Everyone, the API would be :
GET https://<URL>/nifi-api/flowfile-queues/<id>/flowfiles/<flowfile-uuid>/content?clusterNodeId=<clusterNodeId>
You'll get the content of the FlowFile in the queue.
Created 02-02-2023 06:40 AM
@samrathal Per the docs you need to provide the ID:
Name Location Type Description
| id | path | string | The connection id. |
| flowfile-uuid | path | string | The flowfile uuid. |
| clusterNodeId | query | string | The id of the node where the content exists if clustered. |
You should be getting that ID from the previous get call (Gets a FlowFile from a Connection) within the
response is an object:
Inside is the "clusterNodeId" corresponding to which node that flowfile exists on.
{ "flowFile": { "uri": "value", "uuid": "value", "filename": "value", "position": 0, "size": 0, "queuedDuration": 0, "lineageDuration": 0, "penaltyExpiresIn": 0, "clusterNodeId": "value", "clusterNodeAddress": "value", "attributes": { "name": "value" }, "contentClaimSection": "value", "contentClaimContainer": "value", "contentClaimIdentifier": "value", "contentClaimOffset": 0, "contentClaimFileSize": "value", "contentClaimFileSizeBytes": 0, "penalized": true } }
Those details are exposed in the nifi api doc, just be sure to click into the entity.
Created on 02-02-2023 08:13 AM - edited 02-02-2023 08:40 AM
@steven-matison Yes, I have the clusterNodeId, but not understand where to fit in this API.
Can you please share the dummy API
Created 02-03-2023 01:57 AM
Hi Everyone, the API would be :
GET https://<URL>/nifi-api/flowfile-queues/<id>/flowfiles/<flowfile-uuid>/content?clusterNodeId=<clusterNodeId>
You'll get the content of the FlowFile in the queue.