Hello Sam! i am dealing with same issue as you, i see you made a question a year ago and i wonder, did you find a way to upload a Definition file from API rest ?
as you i have been tried and tired to build a process group with the file.json but documentation is not clear and does not offer an example to build the request.
i upload a file.json manually and checked the nifi-request.log and the only i see is this pettiotion " http://localhost:8081/process-groups/{id}/process-groups/upload" as "ok"
did you find a way to build the body to send this request ?