/v2/configs/probe_groups
#
Method |
URL |
Description |
---|---|---|
GET |
|
Retrieves current list of all probe_groups and all children underneath. |
POST |
|
Adds a new probe group and all children. |
PUT |
|
Modifies an existing probe group and all children. |
DELETE |
|
Deletes an existing probe group. |
Header (required)#
x-lxt-api-token
: “token from login”
GET#
/v2/configs/probe_groups
Example 1: Get All Probe Groups
Command:
curl -s -H x-lxt-api-token:eyJ0eXAiOiJKV1QiLCJh[...] --insecure -w "RESP_CODE: %{response_code}" -X GET https://<IP or FQDN>/api/v2/configs/probe_groups
Output (formatted):
{"status":200, "message":"Success", "data":[{"probe_group_id": "CUEJIM0KAA28[...]", "name": "1b-PING Monitor", "description": null, "profiles": [], "probes": [{"probe_id": "LOQ465XQQXJ[...]", "name": "PING Monitor", "short_message": "", "command": "icmp_echo.exp %s", "description": "", "locked": 0, "enabled": 1, "unit": "", "autoscale": 0, "probe_groups": [{"probe_group_id": "CUEJIM0KAA28G[...]"}] }] }] }
RESP_CODE:
200
POST#
/v2/configs/probe_groups
Input Data
{
"name": "Probe Group",
"description": null,
"profiles": [],
"probes": [{"probe_id": "LOQ465XQQXJHS0[...]",
"name": "PING Monitor",
"short_message": "",
"command": "icmp_echo.exp %s",
"description": "",
"locked": 0,
"enabled": 1,
"unit": "",
"autoscale": 0,
}]
}
Example 1: POST probe group with probe
Command:
curl -s -H "x-lxt-api-token: xxx" --insecure -w "RESP_CODE: %{response_code}" -d@test_data/probe_group1 -X POST https://<IP or FQDN>/v2/configs/probe_groups
ie.
curl -s -H x-lxt-api-token:eyJ0eXAiOiJKV1QiL[...] --insecure -w "RESP_CODE: %{response_code}" -d@test_data/probe_group1 -X POST https://10.13.37.14/v2/configs/probe_groups'
Output (formatted):
{"status":200, "message":"Success", "data":[{"probe_group_id": "CUEJIM0KAA28G[...]", "name": "1b-PING Monitor", "description": null, "profiles": [], "probes": [{"probe_id": "LOQ465XQQXJHS0J[...]", "name": "PING Monitor", "short_message": "", "command": "icmp_echo.exp %s", "description": "", "locked": 0, "enabled": 1, "unit": "", "autoscale": 0, "probe_groups": [{"probe_group_id": "CUEJIM0KAA28G[...]"}] }] }] }
RESP_CODE:
200
PUT#
/v2/configs/probe_groups
Example 1: PUT probe_groups: Modify Probe Group
Input data
{"probe_group_id": "R4ICXBVWMU5C21YL158[...]", "name": "New Name" }
Command:
curl -s -H "x-lxt-api-token: xxx" --insecure -w "RESP_CODE: %{response_code}" -d@test_data/probe_group1 -X POST https://<IP or FQDN>/v2/configs/probe_groups
ie.
curl -s -H x-lxt-api-token:eyJ0eXAiOiJKV1QiLC[...] --insecure -w "RESP_CODE: %{response_code}" -d@test_data/probe_group2 -X POST https://10.13.37.14/v2/configs/probe_groups
Output (formatted):
{"status":200, "message":"Success", "data":[{"probe_group_id": "CUEJIM0KAA28[...]", "name": "New Name" "description": null, "profiles": [], "probes": [{"probe_id": "LOQ465XQQXJHS[...]", "name": "PING Monitor", "short_message": "", "command": "icmp_echo.exp %s", "description": "", "locked": 0, "enabled": 1, "unit": "", "autoscale": 0, "probe_groups": [{"probe_group_id": "CUEJIM0K[...]"}] }] }] }
RESP_CODE:
200
DELETE#
/v2/configs/probe_groups
Example 1: Delete Probe Group
Input Data
{"probe_group_id": "GG56YBLHYBDMFVQH161[...]" }
Command
curl -s -H x-lxt-api-token:eyJ0eXAiOiJKV1Q[...] --insecure -w RESP_CODE: %{response_code} -X DELETE https://10.13.37.14/api/v2/configs/probe_groups/GG56YBLHYBDM[...]
or
curl -s -H x-lxt-api-token:eyJ0eXAiOiJKV1Qi[...] --insecure -w RESP_CODE: %{response_code} -d@./test/DELETE.7.input_data.json -X DELETE https://10.13.37.14/api/v2/configs/probe_groups
Output (formatted):
{"status":null, "message":null, "data":[]}
RESP_CODE:
200