Logmanager documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Lookup Table Programmatic Update

The lookup table can be updated programmatically using the following procedure (replace values in angle brackets “< >” with the appropriate information):

  1. Create a new Lookup Table in the GUI - it must have at least a name and any content (the content will be overwritten from the script).

  2. Obtain the ID of this table from the browser’s address bar - it is the value after the slash following edit. In the example below, it is d045b0b2-4225-4fb9-938b-26fe68205f59.

     https://<url_logmanager>/#/parser/lookups/edit/d045b0b2-4225-4fb9-938b-26fe68205f59
    
  3. Retrieve the authorization token from the console and save it.

     curl 'https://<url_logmanager>/APIv1/system/login' --data-raw $'{"user":"<username>","pswd":"<password>"}' | jq | grep access
    
  4. Use the token to update the specific table - replace table_id, token, table_name, and content with the corresponding values:

    curl 'https://<url_logmanager>/api/v2/lookups/<table_id>' \
    -X 'PUT' \
    -H 'content-type: application/json;charset=UTF-8' \
    -H 'authorization: Bearer <token>' \
    --data-raw '{"name":"<table_name>","type":"data","content":"<content_line1\ncontent_line2>","is_multicolumn":"0"}'
    

    The is_multicolumn field indicates whether the table should have multiple values. The value 0 means no, and the value 1 means yes.

The entire procedure is described using the CURL tool. Similarly, you can use any other tool such as Insomnia, Postman, etc.