Support Questions

Find answers, ask questions, and share your expertise

Set the Global Parameter Processor Configuration via NIFI REST API

avatar
Explorer

Hi Support,

Would like to ask is that possible to set the Global_parameter in processor configuration via nifi rest api instead of using UI ?

EddyChan_0-1696223084319.png

 

1 ACCEPTED SOLUTION

avatar

@EddyChan, if I understood correctly, you want to set an already created Parameter Context in a Process Group, right?
If so, you can do that using RestAPI with PUT as Request Method and the payload as:

{
	"revision": {
		"clientId": "6df050ee-0002-1de6-27e5-05edebf761b0",
		"version": 0
	},
	"disconnectedNodeAcknowledged": false,
	"component": {
		"id": "6dbf7e4e-849e-39ad-a2dd-dbe3f890a1d0",
		"name": "test",
		"comments": "",
		"parameterContext": {
			"id": "b2ce1579-0187-1000-ffff-ffffb8598d34"
		},
		"flowfileConcurrency": "UNBOUNDED",
		"flowfileOutboundPolicy": "STREAM_WHEN_AVAILABLE",
		"defaultFlowFileExpiration": "0 sec",
		"defaultBackPressureObjectThreshold": "10000",
		"defaultBackPressureDataSizeThreshold": "1 GB"
	}
}

What you need to know is the ID of the parameter context you would like to set in your process group and you are all done. Of course you will need to know the ID of the Process Group you are trying to modify as well.

View solution in original post

2 REPLIES 2

avatar

@EddyChan, if I understood correctly, you want to set an already created Parameter Context in a Process Group, right?
If so, you can do that using RestAPI with PUT as Request Method and the payload as:

{
	"revision": {
		"clientId": "6df050ee-0002-1de6-27e5-05edebf761b0",
		"version": 0
	},
	"disconnectedNodeAcknowledged": false,
	"component": {
		"id": "6dbf7e4e-849e-39ad-a2dd-dbe3f890a1d0",
		"name": "test",
		"comments": "",
		"parameterContext": {
			"id": "b2ce1579-0187-1000-ffff-ffffb8598d34"
		},
		"flowfileConcurrency": "UNBOUNDED",
		"flowfileOutboundPolicy": "STREAM_WHEN_AVAILABLE",
		"defaultFlowFileExpiration": "0 sec",
		"defaultBackPressureObjectThreshold": "10000",
		"defaultBackPressureDataSizeThreshold": "1 GB"
	}
}

What you need to know is the ID of the parameter context you would like to set in your process group and you are all done. Of course you will need to know the ID of the Process Group you are trying to modify as well.

avatar
Explorer

Yes correct, and thank you worked.