@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.