How to create snippetID for all the processors,processgroups in the Entire UI using restapi in c#

123 Views Asked by At

I am creating a template in nifi. For that I am trying to create a snippet using rest api "/snippets" (POST) in c#. I need to create a snippet with multiple processors,multiple process groups,multiple input ports etc. And moreover the name and id of the processors or process groups remains same in the json and how to set the value for it ? Here is my json data :

{
    "snippet": {
        "parentGroupId": "a99f64f4-0158-1000-f989-c1d4fd2d069e",
        "processGroups": {
            "2b76344b-0159-1000-d64e-d9f10b8f696a": {
                "clientId":"2b76344b-0159-1000-d64e-d9f10b8f696a",
                "version": 0,
                "lastModifier": "value"

            }
        },
        "processors":{
            "2b75e2a1-0159-1000-38d2-e93cd0c3dd7b": {
                "clientId": "2b75e2a1-0159-1000-38d2-e93cd0c3dd7b",
                "version": 0,
                "lastModifier": "value"

        },
        "5d91382f-0159-1000-ca54-7a0f4d639e4c": {
                "clientId": "5d91382f-0159-1000-ca54-7a0f4d639e4c",
                "version": 0,
                "lastModifier": "value"

        }
        }


    }
}

Please let me know if there is any solution. Thanks in advance.

0

There are 0 best solutions below