According to https://www.paessler.com/manuals/prtg/object_manipulation#duplicating_clone I do the following (in Git Bash):
curl --insecure \ --data-urlencode "username=${user}" \ --data-urlencode "passhash=${pwdHash}" \ "https://prtg/api/duplicateobject.htm?id=9513&name=TEST&targetid=9510"
The sensor is created but despite of the manual's "the server replies with a redirect to the new object's web page, for example /sensor.htm?id=10214" only the progress infos are printed by curl.
PS: Your forum SW doesn't handle URL fragments correctly.
Article Comments
I wanted to use the API v2 but then I found and read the page you link before. It says:
"If you already want to use the PRTG API on your production system, we recommend that you use the PRTG API (v1)."
Sep, 2022 - Permalink
Yes I understand, the problem is that this issue you are having seems to be a defect on the API and we are no longer going to fix the code for API v1 on PRTG. So we recommend trying the V2. Or you can open a support ticket at support@paessler.com so we can look at it in depth.
Sep, 2022 - Permalink
At the moment our developers are not looking at defects in the old API as we have created and implemented the new API v2 in the new UI of PRTG. We recommend to use the new API v2 instead and if you have issues with the output you can open a support ticket at support@paessler.com More information here https://www.paessler.com/support/prtg/api/v2/overview
Sep, 2022 - Permalink