tableau-boundry-string is not a string - it needs to be a GUID (or similar).
Helpful link: Publishing Resources-Tableau Server REST API
The python example was invaluable in helping me with my first Tableau API development: Samples-Tableau Server REST API
I had no prior Python experience, and it is free to download/install.
You will also want to download/install Fiddler to monitor the requests/responses between your API client and Tableau Server.
If possible, develop and test against a non-production (not live) server.
I generated a GUID and used it (D35A38AA-DC22-F105-7460-8707465CA918) but got the same 502 Bad Gateway Error.
Did not make any difference.
Can you ensure that the blank lines are the same as in the example. (See link)
I found that it was really picky about this sort of thing, but cant remember the error code that was thrown back.
Hope this helps
I am also encountering the Bad Gateway message.
Could you please advise if you ever resolved this issue?