Modify An LST Entry

Complete these tasks to modify an existing LST entry.

Table - Prerequisites

Prerequisite More Information
Authenticate Authenticate

This example assumes you have exported the access token to the variable $TOKEN.

  1. Retrieve the LST template.

    The template of a configuration element is a data structure containing all required sub-elements and supported attributes with their default values, along with any specified optional sub-elements.

    curl -X GET -o response.xml \
        --header "Accept: application/xml" \
        --header "Authorization: Bearer $TOKEN" \
        "https://10.0.0.2/rest/v1.1/configuration/lst/lstentry"
    The response is saved to the file response.xml.
  2. Copy the content between the opening and closing <LocalSubscriberTable> tags to a new file called lst-entry.xml.

    If you are on a Linux system with xmllint installed, you may optionally format the XML before writing it to the file system.

    sed -n '/<LocalSubscriberTable>/,/<\/LocalSubscriberTable>/p' response.xml | xmllint --format - > lst-entry.xml
  3. Set the username, password, aor, unum, and filename elements to their desired values.

    The following shows an example of the contents of lst-entry.xml:

    <?xml version="1.0"?>
    <LocalSubscriberTable>
      <username/>
      <password/>
      <aor/>
      <unum/>
      <filename/>
    </LocalSubscriberTable>
  4. Acquire the configuration lock.
    curl -X POST \
        --header "Accept: application/xml" \
        --header "Authorization: Bearer $TOKEN" \
        "https://10.0.0.2/rest/v1.1/configuration/lock"
  5. Send the modified LST entry to the ECB.

    Use the URL parameter key to identify the username to be modified.

    curl -X PUT \
        -d@lst-entry.xml \
        --header "Accept: application/xml" \
        --header "Authorization: Bearer $TOKEN" \
        "https://10.0.0.2/rest/v1.1/configuration/lst/lstentry?key=<USERNAME>"
  6. If done editing the configuration, verify, save, and refresh the LST.

    To verify the LST:

    curl -X PUT \
        --header "Accept: application/xml" \
        --header "Authorization: Bearer $TOKEN" \
        "https://10.0.0.2/rest/v1.1/configuration/lst?action=verify&filename=<LSTXMLFILE>"

    To save the LST:

    curl -X PUT \
        --header "Accept: application/xml" \
        --header "Authorization: Bearer $TOKEN" \
        "https://10.0.0.2/rest/v1.1/configuration/lst?action=save&filename=<LSTXMLFILE>"

    To refresh the LST:

    curl -X PUT \
        --header "Accept: application/xml" \
        --header "Authorization: Bearer $TOKEN" \
        "https://10.0.0.2/rest/v1.1/configuration/lst?action=refresh&filename=<LSTXMLFILE>"
  7. Release the configuration lock.
    curl -X POST \
        --header "Accept: application/xml" \
        --header "Authorization: Bearer $TOKEN" \
        "https://10.0.0.2/rest/v1.1/configuration/unlock"