Skip to content

Commit 2f91fa3

Browse files
committed
Map existing sep commands to config, create new for list and delete
1 parent 46684e3 commit 2f91fa3

File tree

4 files changed

+92
-12
lines changed

4 files changed

+92
-12
lines changed

USAGE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,10 @@ List service endpoints
409409

410410
| Command | Description | Example |
411411
| ------- | ----------- | ------- |
412-
| list | List all SEPs. Provide an application id (-a). | `act.sh sep list -a 29` |
413-
| update | Insert or Update SEPs. Provide an application id (-a) and a json string or a @file (-d) as parameter. | `act.sh sep update -a 29 -d @examples/sep.json` |
412+
| config | List all SEP configurations. Provide an application id (-a). | `act.sh sep config -a 29` |
413+
| delete | Delete SEPs Provide an id or an list of ids of service end points (-s) as parameter. | `act.sh sep delete -s 11705717,11705424` |
414+
| list | List all SEPs Provide an application id (-a), a start timestamp (-s) and an end timestamp (-e) as parameters. | `act.sh sep list -a 29 -s 1610389435 -e 1620389435` |
415+
| updateConfig | Insert or Update SEPs. Provide an application id (-a) and a json string or a @file (-d) as parameter. | `act.sh sep updateConfig -a 29 -d @examples/sep.json` |
414416

415417

416418
## server

act.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
2-
ACT_VERSION="v20.3.0"
3-
ACT_LAST_COMMIT="2d76e711095ed5c5b6cd7affa9e55de9a91330d0"
2+
ACT_VERSION="v21.1.0"
3+
ACT_LAST_COMMIT="46684e3055da89ddf8fd1ff5847f55301445c786"
44
USER_CONFIG="$HOME/.appdynamics/act/config.sh"
55
GLOBAL_CONFIG="/etc/appdynamics/act/config.sh"
66
CONFIG_CONTROLLER_COOKIE_LOCATION="/tmp/appdynamics-controller-cookie.txt"
@@ -320,10 +320,14 @@ rde scope_list "List all scopes." "Provide an application id (-a) as parameter"
320320
doc sep << EOF
321321
List service endpoints
322322
EOF
323-
sep_list() { apiCall '/controller/api/accounts/{{i:accountid}}/applications/{{a:application}}/sep' "$@" ; }
324-
rde sep_list "List all SEPs." "Provide an application id (-a)." "-a 29"
325-
sep_update() { apiCall -X POST -d '{{d:sep_json}}' '/controller/api/accounts/{{i:accountid}}/applications/{{a:application}}/sep' "$@" ; }
326-
rde sep_update "Insert or Update SEPs." "Provide an application id (-a) and a json string or a @file (-d) as parameter." "-a 29 -d @examples/sep.json"
323+
sep_config() { apiCall '/controller/api/accounts/{{i:accountid}}/applications/{{a:application}}/sep' "$@" ; }
324+
rde sep_config "List all SEP configurations." "Provide an application id (-a)." "-a 29"
325+
sep_delete() { apiCall -X POST -d '[{{s:service_endpoints}}]' '/controller/restui/serviceEndpoint/delete' "$@" ; }
326+
rde sep_delete "Delete SEPs" "Provide an id or an list of ids of service end points (-s) as parameter." "-s 11705717,11705424"
327+
sep_list() { apiCall -X POST -d '{"requestFilter":{"queryParams":{"applicationId":{{a:application}},"mode":"FILTER_EXCLUDED"},"searchText":"","filters":{"type":[],"sepName":[]}},"columnSorts":[{"column":"NAME","direction":"ASC"}],"timeRangeStart":{{s:start}},"timeRangeEnd":{{e:end}}}' '/controller/restui/serviceEndpoint/list' "$@" ; }
328+
rde sep_list "List all SEPs" "Provide an application id (-a), a start timestamp (-s) and an end timestamp (-e) as parameters." "-a 29 -s 1610389435 -e 1620389435"
329+
sep_updateConfig() { apiCall -X POST -d '{{d:sep_json}}' '/controller/api/accounts/{{i:accountid}}/applications/{{a:application}}/sep' "$@" ; }
330+
rde sep_updateConfig "Insert or Update SEPs." "Provide an application id (-a) and a json string or a @file (-d) as parameter." "-a 29 -d @examples/sep.json"
327331
doc server << EOF
328332
List servers, their properties and metrics
329333
EOF

commands.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,12 +620,26 @@ scope:
620620
sep:
621621
title: Service Endpoints
622622
description: List service endpoints
623-
list:
624-
title: List all SEPs.
623+
config:
624+
title: List all SEP configurations.
625625
description: Provide an application id (-a).
626626
example: -a 29
627627
endpoint: /controller/api/accounts/{{i:accountid}}/applications/{{a:application}}/sep
628-
update:
628+
list:
629+
title: List all SEPs
630+
description: Provide an application id (-a), a start timestamp (-s) and an end timestamp (-e) as parameters.
631+
example: -a 29 -s 1610389435 -e 1620389435
632+
method: POST
633+
endpoint: /controller/restui/serviceEndpoint/list
634+
payload: {\"requestFilter\":{\"queryParams\":{\"applicationId\":{{a:application}},\"mode\":\"FILTER_EXCLUDED\"},\"searchText\":\"\",\"filters\":{\"type\":[],\"sepName\":[]}},\"columnSorts\":[{\"column\":\"NAME\",\"direction\":\"ASC\"}],\"timeRangeStart\":{{s:start}},\"timeRangeEnd\":{{e:end}}}
635+
delete:
636+
title: Delete SEPs
637+
description: Provide an id or an list of ids of service end points (-s) as parameter.
638+
example: -s 11705717,11705424
639+
method: POST
640+
endpoint: /controller/restui/serviceEndpoint/delete
641+
payload: [{{s:service_endpoints}}]
642+
updateConfig:
629643
title: Insert or Update SEPs.
630644
description: Provide an application id (-a) and a json string or a @file (-d) as parameter.
631645
example: -a 29 -d @examples/sep.json

postman-collection.json

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2549,7 +2549,7 @@
25492549
"description": "Provide an application id (-a) as parameter"
25502550
}
25512551
}]},{"name": "sep","item": [{
2552-
"name": "List all SEPs.",
2552+
"name": "List all SEP configurations.",
25532553
"request": {
25542554
"method": "",
25552555
"header": [
@@ -2578,6 +2578,66 @@
25782578
},
25792579
"description": "Provide an application id (-a)."
25802580
}
2581+
},{
2582+
"name": "Delete SEPs",
2583+
"request": {
2584+
"method": "POST",
2585+
"header": [
2586+
{
2587+
"key": "Content-Type",
2588+
"value": "application/json;charset=UTF-8",
2589+
"type": "text"
2590+
},
2591+
{
2592+
"key": "X-CSRF-TOKEN",
2593+
"value": "{{X-CSRF-TOKEN}}",
2594+
"type": "text"
2595+
}
2596+
],
2597+
"body": {
2598+
"mode": "raw",
2599+
"raw": "[{{service_endpoints}}]"
2600+
},
2601+
"url": {
2602+
"raw": "{{controller_host}}/controller/restui/serviceEndpoint/delete",
2603+
"host": [
2604+
"{{controller_host}}"
2605+
],
2606+
"path": ["controller","restui","serviceEndpoint","delete"],
2607+
"query": []
2608+
},
2609+
"description": "Provide an id or an list of ids of service end points (-s) as parameter."
2610+
}
2611+
},{
2612+
"name": "List all SEPs",
2613+
"request": {
2614+
"method": "POST",
2615+
"header": [
2616+
{
2617+
"key": "Content-Type",
2618+
"value": "application/json;charset=UTF-8",
2619+
"type": "text"
2620+
},
2621+
{
2622+
"key": "X-CSRF-TOKEN",
2623+
"value": "{{X-CSRF-TOKEN}}",
2624+
"type": "text"
2625+
}
2626+
],
2627+
"body": {
2628+
"mode": "raw",
2629+
"raw": "{\"requestFilter\":{\"queryParams\":{\"applicationId\":{{application}},\"mode\":\"FILTER_EXCLUDED\"},\"searchText\":\"\",\"filters\":{\"type\":[],\"sepName\":[]}},\"columnSorts\":[{\"column\":\"NAME\",\"direction\":\"ASC\"}],\"timeRangeStart\":{{start}},\"timeRangeEnd\":{{end}}}"
2630+
},
2631+
"url": {
2632+
"raw": "{{controller_host}}/controller/restui/serviceEndpoint/list",
2633+
"host": [
2634+
"{{controller_host}}"
2635+
],
2636+
"path": ["controller","restui","serviceEndpoint","list"],
2637+
"query": []
2638+
},
2639+
"description": "Provide an application id (-a), a start timestamp (-s) and an end timestamp (-e) as parameters."
2640+
}
25812641
},{
25822642
"name": "Insert or Update SEPs.",
25832643
"request": {

0 commit comments

Comments
 (0)