api-commandline-tool
api-commandline-tool copied to clipboard
How to import Service Endpoints
The shell script provides the command to list service endpoints. It seems to me that it lists both 'Automatic Service Endpoint Detection' and 'Custom Service Endpoints'.
I could not find a command that allows to import the service endpoints. Any ideas how to do that? Haven't found a rest api on the offical appdynamics documentation
I justed added sep update
following the swagger rest api docs. I still need to test it, but let me know if it works.
Hi @svrnm, sorry for the late response. I tried it out now with
./act.sh sep list -a 160 > `sep_160.json
./act.sh sep update -a 160 -d @sep_160.json
./act.sh: illegal option -- a
{"code": "svr-1","message": "Invalid Account: Principal [<username>], Entity [Type:ACCOUNT, id:160]","href": "http://docs.appdynamics.com","refCode": "<uuid>"}'
I tried to figure out what is wrong but haven't found the issue
Hey @matthias-huber ! Sorry for the delay, but I just checked and the command definition for sep update had some issues. I just committed some changes, can you give it another try?
Hi @svrnm, I tried it out. Now getting an HTTP 415 Unsupported Media Type
./act.sh -E ece-nonprod sep list -a 294 > sep.json
./act.sh -E ece-nonprod sep update -a 294 -d @sep.json
HTTP Status: 415
I am not sure if the format for import is the same as for export, probably you need to remove the IDs (e.g. with jq
)
Hey @svrnm, @matthias-huber
I was able to get this to work by setting the Content-Type to "application/vnd.appd.cntrl+json;v=1".