<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Automating indexing for Entities and Relashionships on SAS Visual Investigator in Fraud, AML and Security Intelligence</title>
    <link>https://communities.sas.com/t5/Fraud-AML-and-Security/Automating-indexing-for-Entities-and-Relashionships-on-SAS/m-p/620159#M457</link>
    <description>&lt;P&gt;Hello Community,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Am looking for a way to automate the process of indexing entities and relashionships upon updating the data behind the scenes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I found no way to create a job/Schedule it regarding data indexing in SAS Visual Investiator.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jan 2020 08:11:29 GMT</pubDate>
    <dc:creator>iakrim</dc:creator>
    <dc:date>2020-01-28T08:11:29Z</dc:date>
    <item>
      <title>Automating indexing for Entities and Relashionships on SAS Visual Investigator</title>
      <link>https://communities.sas.com/t5/Fraud-AML-and-Security/Automating-indexing-for-Entities-and-Relashionships-on-SAS/m-p/620159#M457</link>
      <description>&lt;P&gt;Hello Community,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Am looking for a way to automate the process of indexing entities and relashionships upon updating the data behind the scenes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I found no way to create a job/Schedule it regarding data indexing in SAS Visual Investiator.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 08:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Fraud-AML-and-Security/Automating-indexing-for-Entities-and-Relashionships-on-SAS/m-p/620159#M457</guid>
      <dc:creator>iakrim</dc:creator>
      <dc:date>2020-01-28T08:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Automating indexing for Entities and Relashionships on SAS Visual Investigator</title>
      <link>https://communities.sas.com/t5/Fraud-AML-and-Security/Automating-indexing-for-Entities-and-Relashionships-on-SAS/m-p/620462#M458</link>
      <description>&lt;P&gt;Hi Iakrim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are instructions on how to call our indexing APIs in the Visual Investigator Admin Help documentation. If you open the documentation then search for the following section - "Re-Indexing, Resolving Entities, and Running Flows Programmatically" - then this should provide you the details you need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Rory&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 11:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Fraud-AML-and-Security/Automating-indexing-for-Entities-and-Relashionships-on-SAS/m-p/620462#M458</guid>
      <dc:creator>Rory_MacKenzie</dc:creator>
      <dc:date>2020-01-28T11:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Automating indexing for Entities and Relashionships on SAS Visual Investigator</title>
      <link>https://communities.sas.com/t5/Fraud-AML-and-Security/Automating-indexing-for-Entities-and-Relashionships-on-SAS/m-p/625875#M494</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Step by step solution :&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(localhost can be adapted to the microservices IP)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I . This uses an API so you should have an app name and get a token any time for that :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to do for the first time ever (by client app)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 - Get the token from consul on the microservices server :&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;cat /opt/sas/viya/config/etc/SASSecurityCertificateFramework/tokens/consul/default/client.token&lt;/PRE&gt;&lt;P&gt;Result is a string1 : XXXXXX-XXXXX-XXXX-XXXXXX-XXXXX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 - Declare a new client as en example&amp;nbsp; NWCLI and copy the string1 into the command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;curl -k -X POST "https://localhost/SASLogon/oauth/clients/consul?callback=false&amp;amp;serviceId=NWCLI" -H "X-Consul-Token: XXXXXX-XXXXX-XXXX-XXXXXX-XXXXX"&lt;/PRE&gt;&lt;P&gt;Result String2 :&lt;BR /&gt;{"access_token":"&lt;STRONG&gt;XXXXXXXXXX...&lt;/STRONG&gt;.","token_type":"bearer","expires_in":35999,"scope........."}&lt;/P&gt;&lt;P&gt;we are only interested by the access token value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 - Register le new client with that token&amp;nbsp; (localhost can be adapted to the microservices IP) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;curl -k -X POST https://localhost/SASLogon/oauth/clients -H "Content-Type: application/json" -H "Authorization: Bearer XXXXXX...." -d '{ "client_id": "NWCLI", "client_secret": "client-secret", "scope": ["openid", "*"], "resource_ids": "none", "authorities": ["uaa.none"], "authorized_grant_types": ["password"] }'&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;II . Since the client is already declared to use the API, by default the tokens expire in 12 hours. You can either expand the timeout or use a shell workaround :&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 - Getting the 12 hours token&amp;nbsp; :&lt;/P&gt;&lt;PRE&gt;curl http://localhost/SASLogon/oauth/token -H "Accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=password&amp;amp;username=username&amp;amp;password=adminpassword" -u "NWCLI:client-secret"&lt;/PRE&gt;&lt;P&gt;Result&amp;nbsp; is string3 : XXXXXXXXXXXXXXX...... to use in next step&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 - Send the index all in curl :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;curl -k -d '{"parameters": { "type": "SEARCH_INDEX_LOADER" }}' -H "Content-Type: application/json" -H "Authorization: Bearer&amp;nbsp; XXXXXXXXXXXXXXX........" -X POST https://localhost/svi-datahub/admin/asyncJobs?new&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;{"parameters": { "type": "SEARCH_INDEX_LOADER" }} is for indexing all entities&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Workaround to bypass the token timeout :&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;Create a .sh script to launch the II.1 and II.2 steps automatically :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var=$(curl http://localhost/SASLogon/oauth/token -H "Accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=password&amp;amp;username=...&amp;amp;password=..." -u "NWCLI:client-secret")
var1=$(echo $var | cut -c18-1326)
curl -k -d '{"parameters": { "type": "SEARCH_INDEX_LOADER" }}' -H "Content-Type: application/json" -H "Authorization: Bearer $var1" -X POST https://localhost/svi-datahub/admin/asyncJobs?new&lt;/PRE&gt;&lt;P&gt;You can CRON the script for data that refreshes regularly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 15:35:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Fraud-AML-and-Security/Automating-indexing-for-Entities-and-Relashionships-on-SAS/m-p/625875#M494</guid>
      <dc:creator>iakrim</dc:creator>
      <dc:date>2020-02-19T15:35:53Z</dc:date>
    </item>
  </channel>
</rss>

