/v2/configs/probes#

Method

URL

Description

GET

/v2/configs/probes

Retrieves current list of all update probes.

POST

/v2/configs/probes

Adds a new probe.

PUT

/v2/configs/probes

Modifies an existing probe.

DELETE

/v2/configs/probes

Deletes an existing probe.

Header (required)#

x-lxt-api-token: “token from login”

GET#

/v2/configs/probes

  • Example 1: Get All Probes

    Command:

    curl -s
         -H x-lxt-api-token:eyJ0eXAiOiJKV1QiLC[...]
         --insecure
         -w "RESP_CODE: %{response_code}"
         -X GET https://<IP or FQDN>/api/v2/configs/probes
    

    Output (formatted):

    {"status":200,
     "message":"Success",
     "data":[{"probe_id": "LOQ465XQQXJHS0[...]",
         "name": "PING Monitor",
         "short_message": "",
         "command": "icmp_echo.exp %s",
         "description": "",
         "locked": 0,
         "enabled": 1,
         "unit": "",
         "autoscale": 0,
         "probe_groups": [{"probe_group_id": "CUEJIM0KAA2[...]"}]
      }]
    }
    

    RESP_CODE: 200

  • Example 2: Get One Probe

    Command:

    curl -s
         -H x-lxt-api-token:eyJ0eXAiOiJKV1QiLCJhbG[...]
         --insecure
         -w "RESP_CODE: %{response_code}"
         -X GET https://<IP or FQDN>/api/v2/configs/probes/LOQ465XQQXJHS[...]
    

    Output (formatted):

    {"status":200,
     "message":"Success",
     "data":[{"probe_id": "LOQ465XQQXJHS0JW15[...]",
              "name": "PING Monitor",
              "short_message": "",
              "command": "icmp_echo.exp %s",
              "description": "",
              "locked": 0,
              "enabled": 1,
              "unit": "",
              "autoscale": 0,
              "probe_groups": [{"probe_group_id": "CUEJIM0KAA2[...]"}]
         }]
    }
    

    RESP_CODE: 200

POST#

/v2/configs/probes

Input Data

This is an example input object describing a single Probe.

{"name": "PING Monitor",
 "short_message": "",
 "command": "icmp_echo.exp %s",
 "description": "",
 "locked": 0,
 "enabled": 1,
 "unit": "",
 "autoscale": 0,
 "probe_groups": []
}
  • Example 1: POST probe

    Command:

    curl -s
         -H "x-lxt-api-token: xxx"
         --insecure
         -w "RESP_CODE: %{response_code}"
         -d@test_data/probe1
         -X POST https://<IP or FQDN>/v2/configs/probes
    

    ie.

    curl -s
         -H x-lxt-api-token:eyJ0eXAiOiJKV1QiLCJh[...]
         --insecure
         -w "RESP_CODE: %{response_code}"
         -d@test_data/probe1
         -X POST https://10.13.37.14/v2/configs/probes
    

    Output (formatted):

    {"status": 200,
     "message": "Success",
     "data": [{"probe_id": "LOQ465XQQXJHS0J[...]",
               "name": "PING Monitor",
               "short_message": "",
               "command": "icmp_echo.exp %s",
               "description": "",
               "locked": 0,
               "enabled": 1,
               "unit": "",
               "autoscale": 0,
               "probe_groups": []
              }]
    }
    

    RESP_CODE: 200

PUT#

/v2/configs/probes

  • Example 3: PUT probes: Modify Probe

    Input data

    {"probe_id": "d9506ab97e091007a74[...]",
    "name": "New Name" }
    

    Command:

    curl -s
         -H "x-lxt-api-token: xxx"
         --insecure
         -w "RESP_CODE: %{response_code}"
         -d@test_data/probe1
         -X POST https://<IP or FQDN>/v2/configs/probes
    

    ie.

    curl -s
         -H x-lxt-api-token:eyJ0eXAiOiJKV1QiLC[...]
         --insecure
         -w "RESP_CODE: %{response_code}"
         -d@test_data/probe1
         -X POST https://10.13.37.14/v2/configs/probes
    

    Output (formatted):

    {"status": 200,
     "message": "Success",
     "data": [{"probe_id": "d9506ab97e091007a7[...]",
          "name": "New Name",
          "short_message": "",
          "command": "icmp_echo.exp %s",
          "description": "",
          "locked": 0,
          "enabled": 1,
          "unit": "",
          "autoscale": 0,
          "probe_groups": [{"probe_group_id": "CUEJIM0KAA28GWS[...]"}]
       }]
    }
    

    RESP_CODE: 200

DELETE#

/v2/configs/probes

  • Example 1: Delete Probe

    Input Data

    {"probe_id": "d9506ab97e091007a7[...]"}
    

    Command

    curl -s
         -H x-lxt-api-token:eyJ0eXAiOiJKV1QiLCJ[...]
         --insecure
         -w RESP_CODE: %{response_code}
         -d@./test/input_data.json
         -X DELETE https://10.13.37.14/api/v2/configs/probes
    

    or

    curl -s
         -H x-lxt-api-token:eyJ0eXAiOiJKV1QiLC[...]
         --insecure
         -w RESP_CODE: %{response_code}
         -X DELETE https://10.13.37.14/api/v2/configs/probes/d9506ab97e[...]
    

    Output (formatted):

    {"status":null,"message":null,"data":[]}
    

    RESP_CODE: 200