api-commandline-tool icon indicating copy to clipboard operation
api-commandline-tool copied to clipboard

How to import Service Endpoints

Open matthias-huber opened this issue 5 years ago • 6 comments

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

matthias-huber avatar Sep 12 '19 15:09 matthias-huber

I justed added sep update following the swagger rest api docs. I still need to test it, but let me know if it works.

svrnm avatar Sep 25 '19 09:09 svrnm

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

matthias-huber avatar Nov 08 '19 15:11 matthias-huber

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?

svrnm avatar Nov 25 '19 14:11 svrnm

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

matthias-huber avatar Nov 27 '19 10:11 matthias-huber

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)

svrnm avatar Dec 03 '19 15:12 svrnm

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".

tuantgdao avatar Apr 21 '20 19:04 tuantgdao