Lookup Table Programmatic Update
The lookup table can be updated programmatically using the following procedure:
-
Create a new Lookup Table in the GUI - it must at least have a name and any content (the content will be overwritten from the script).
-
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
-
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
Replace values in angle brackets< >
with the appropriate information.
-
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. “0” means no, “1” means yes..
The entire procedure is described using the CURL tool. Similarly, you can use any other tool such as Insomnia, Postman, etc.