/v2/configs/profiles#

Method

URL

Description

GET

/v2/configs/profiles

Retrieves current list of all profiles.

POST

/v2/configs/profiles

Adds a new profile.

PUT

/v2/configs/profiles

Modifies an existing profile.

DELETE

/v2/configs/profiles

Deletes an existing profile.

Header (required)#

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

GET#

/v2/configs/profiles

  • Example 1: Get All Profiles

    Command:

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

    Output (formatted):

    {"status":200,
     "message":"Success",
     "data":[{"profile_id": "WL7B4CWE5Y6N414N159[...]",
           "asset_id":"d9506ab97e091007a74bf1[...]",
           "probe_group_id": "CUEJIM0KAA28GWSB1568[...]",
           "enabled": 1,
           "interval": 60,
           "start_time": -1,
           "start_weekdays": 127,
           "end_window": 86400,
           "assets": [{"asset_id":"d9506ab97e0910076[...]"}],
         "credentials": [],
         "probe_groups": [{"probe_group_id": "CUEJIM0KAA28GW[...]",
            "name": "1b-PING Monitor",
            "description": null,
            "profiles": [{"profile_id": "WL7B4CWE5Y6N414N159[...]"}],
            "probes": [{"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": "CUEJIM0KAA28GWS[...]"}]
               }]
           }]
        }]
    }
    

    RESP_CODE: 200

  • Example 2: Get One Profile

    Command:

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

    Output (formatted):

    {"status":200,
     "message":"Success",
     "data":[{"profile_id": "WL7B4CWE5Y6N414N15[...]",
         "asset_id":"d9506ab97e091007a74bf16[...]",
         "probe_group_id": "CUEJIM0KAA28GWSB1[...]",
         "enabled": 1,
         "interval": 60,
         "start_time": -1,
         "start_weekdays": 127,
         "end_window": 86400,
         "assets": [{"asset_id":"d9506ab97e0910[...]"}],
         "credentials": [],
         "probe_groups": [{"probe_group_id": "CUEJIM0KAA28GW[...]",
               "name": "1b-PING Monitor",
               "description": null,
               "profiles": [{"profile_id": "WL7B4CWE5Y6N414N[...]"}],
               "probes": [{"probe_id": "LOQ465XQQXJHS0JW[...]",
                  "name": "PING Monitor",
                  "short_message": "",
                  "command": "icmp_echo.exp %s",
                  "description": "",
                  "locked": 0,
                  "enabled": 1,
                  "unit": "",
                  "autoscale": 0,
                  "probe_groups": [{"probe_group_id": "CUEJIM0KAA28GWSB[...]"}]
                }]
         }]
     }]
    }
    

    RESP_CODE: 200

POST#

/v2/configs/profiles

Input Data

This is an example input object describing a single Profile, mapping an existing asset to an existing probe_group, with no credentials supplied.

{
 "asset_id": "d9506ab97e091007a74bf1[...]",
 "probe_group_id": "CUEJIM0KAA28GWS[...]",
 "enabled": 1,
 "interval": 60,
 "start_time": -1,
 "start_weekdays": 127,
 "end_window": 86400,
 "credentials" : []
}
  • Example 1: POST profile

    Command:

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

    ie.

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

    Output (formatted):

    {"profile_id": "WL7B4CWE5Y6N414N15[...]",
     "asset_id": "d9506ab97e0910[...]",
     "probe_group_id": "CUEJIM0KAA28GWSB1[...]",
     "enabled": 1,
     "interval": 60,
     "start_time": -1,
     "start_weekdays": 127,
     "end_window": 86400,
     "assets": [{"asset_id": "d9506ab97e09100[...]"}],
     "credentials": [],
     "probe_groups": [{"probe_group_id": "CUEJIM0KAA28G[...]",
         "name": "1b-PING Monitor",
         "description": null,
         "profiles": [{"profile_id": "WL7B4CWE5Y6N414N[...]"}],
         "probes": [{"probe_id": "LOQ465XQQXJHS0JW156[...]",
            "name": "PING Monitor",
            "short_message": "",
            "command": "icmp_echo.exp %s",
            "description": "",
            "locked": 0,
            "enabled": 1,
            "unit": "",
            "autoscale": 0,
            "probe_groups": [{"probe_group_id": "CUEJIM0KAA28GWS[...]"}]
         }]
      }]
    }
    

    RESP_CODE: 200

  • Example 3: PUT profile: Modify Profile

    Input data

    {"profile_id": "WL7B4CWE5Y6N414[...]",
     "interval": 30
    }
    

    Command:

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

    ie.

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

    Output (formatted):

    {"profile_id": "WL7B4CWE5Y6N414N15[...]",
     "asset_id": "d9506ab97e091007a74[...]",
     "probe_group_id": "CUEJIM0KAA28GWSB15[...]",
     "enabled": 1,
     "interval": 30,
     "start_time": -1,
     "start_weekdays": 127,
     "end_window": 86400,
     "assets": [{"asset_id": "d9506ab97e09100[...]"}],
     "credentials": [],
     "probe_groups": [{"probe_group_id": "CUEJIM0KAA28GWSB[...]",
        "name": "1b-PING Monitor",
        "description": null,
        "profiles": [{"profile_id": "WL7B4CWE5Y6N414[...]"}],
        "probes": [{"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": "CUEJIM0KAA28GW[...]"}]
           }]
       }]
    }
    

    RESP_CODE: 200

DELETE#

/v2/configs/profiles

  • Example 1: Delete Profile

    Input Data

    {"profile_id": "WL7B4CWE5Y6N41[...]"}
    

    Command

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

    or

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

    Output (formatted):

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

    RESP_CODE: 200