<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Stroom – api</title>
    <link>/tags/api/</link>
    <description>Recent content in api on Stroom</description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Tue, 11 Jun 2024 00:00:00 +0000</lastBuildDate>
    
	  <atom:link href="/tags/api/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: API Specification</title>
      <link>/docs/user-guide/api/specification/</link>
      <pubDate>Thu, 02 Feb 2023 00:00:00 +0000</pubDate>
      
      <guid>/docs/user-guide/api/specification/</guid>
      <description>
        
        
        &lt;h2 id=&#34;swagger-ui&#34;&gt;Swagger UI&lt;/h2&gt;
&lt;p&gt;The APIs are available as a &lt;em&gt;Swagger&lt;/em&gt; Open API specification in the following forms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;JSON - &lt;span class=&#34;external-link&#34;&gt;
  &lt;a href=&#34;https://gchq.github.io/stroom/v7.12/stroom.json&#34; target=&#34;_blank&#34; class=&#34;external-link&#34; title=&#34;stroom.json (external link to https://gchq.github.io/stroom/v7.12/stroom.json)&#34;&gt;
    &lt;span&gt;stroom.json&lt;/span&gt;
    &lt;i class=&#34;external-link-icon fas fa-external-link-alt fa-sm text-secondary&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;YAML - &lt;span class=&#34;external-link&#34;&gt;
  &lt;a href=&#34;https://gchq.github.io/stroom/v7.12/stroom.yaml&#34; target=&#34;_blank&#34; class=&#34;external-link&#34; title=&#34;stroom.yaml (external link to https://gchq.github.io/stroom/v7.12/stroom.yaml)&#34;&gt;
    &lt;span&gt;stroom.yaml&lt;/span&gt;
    &lt;i class=&#34;external-link-icon fas fa-external-link-alt fa-sm text-secondary&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A dynamic Swagger user interface is also available for viewing all the API endpoints with details of parameters and data types.
This can be found in two places.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Published on GitHub for each minor version &lt;span class=&#34;external-link&#34;&gt;
  &lt;a href=&#34;https://gchq.github.io/stroom/v7.12&#34; target=&#34;_blank&#34; class=&#34;external-link&#34; title=&#34;Swagger user interface (external link to https://gchq.github.io/stroom/v7.12)&#34;&gt;
    &lt;span&gt;Swagger user interface&lt;/span&gt;
    &lt;i class=&#34;external-link-icon fas fa-external-link-alt fa-sm text-secondary&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/span&gt;
.&lt;/li&gt;
&lt;li&gt;Published on a running stroom instance at the path &lt;code&gt;/stroom/noauth/swagger-ui&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;api-endpoints-in-application-logs&#34;&gt;API Endpoints in Application Logs&lt;/h2&gt;
&lt;p&gt;The API methods are also all listed in the application logs when Stroom first boots up, e.g.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;INFO  2023-01-17T11:09:30.244Z main i.d.j.DropwizardResourceConfig The following paths were found for the configured resources:

    GET     /api/account/v1/ (stroom.security.identity.account.AccountResourceImpl)
    POST    /api/account/v1/ (stroom.security.identity.account.AccountResourceImpl)
    POST    /api/account/v1/search (stroom.security.identity.account.AccountResourceImpl)
    DELETE  /api/account/v1/{id} (stroom.security.identity.account.AccountResourceImpl)
    GET     /api/account/v1/{id} (stroom.security.identity.account.AccountResourceImpl)
    PUT     /api/account/v1/{id} (stroom.security.identity.account.AccountResourceImpl)
    GET     /api/activity/v1 (stroom.activity.impl.ActivityResourceImpl)
    POST    /api/activity/v1 (stroom.activity.impl.ActivityResourceImpl)
    POST    /api/activity/v1/acknowledge (stroom.activity.impl.ActivityResourceImpl)
    GET     /api/activity/v1/current (stroom.activity.impl.ActivityResourceImpl)
    ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You will also see entries in the logs for the various servlets exposed by Stroom, e.g.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;INFO  ... main s.d.common.Servlets            Adding servlets to application path/port: 
INFO  ... main s.d.common.Servlets            	stroom.core.servlet.DashboardServlet          =&amp;gt; /stroom/dashboard 
INFO  ... main s.d.common.Servlets            	stroom.core.servlet.DynamicCSSServlet         =&amp;gt; /stroom/dynamic.css 
INFO  ... main s.d.common.Servlets            	stroom.data.store.impl.ImportFileServlet      =&amp;gt; /stroom/importfile.rpc 
INFO  ... main s.d.common.Servlets            	stroom.receive.common.ReceiveDataServlet      =&amp;gt; /stroom/noauth/datafeed 
INFO  ... main s.d.common.Servlets            	stroom.receive.common.ReceiveDataServlet      =&amp;gt; /stroom/noauth/datafeed/* 
INFO  ... main s.d.common.Servlets            	stroom.receive.common.DebugServlet            =&amp;gt; /stroom/noauth/debug 
INFO  ... main s.d.common.Servlets            	stroom.data.store.impl.fs.EchoServlet         =&amp;gt; /stroom/noauth/echo 
INFO  ... main s.d.common.Servlets            	stroom.receive.common.RemoteFeedServiceRPC    =&amp;gt; /stroom/noauth/remoting/remotefeedservice.rpc 
INFO  ... main s.d.common.Servlets            	stroom.core.servlet.StatusServlet             =&amp;gt; /stroom/noauth/status 
INFO  ... main s.d.common.Servlets            	stroom.core.servlet.SwaggerUiServlet          =&amp;gt; /stroom/noauth/swagger-ui 
INFO  ... main s.d.common.Servlets            	stroom.resource.impl.SessionResourceStoreImpl =&amp;gt; /stroom/resourcestore/* 
INFO  ... main s.d.common.Servlets            	stroom.dashboard.impl.script.ScriptServlet    =&amp;gt; /stroom/script 
INFO  ... main s.d.common.Servlets            	stroom.security.impl.SessionListServlet       =&amp;gt; /stroom/sessionList 
INFO  ... main s.d.common.Servlets            	stroom.core.servlet.StroomServlet             =&amp;gt; /stroom/ui 
&lt;/code&gt;&lt;/pre&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Application Programming Interfaces (API)</title>
      <link>/docs/user-guide/api/</link>
      <pubDate>Wed, 16 Feb 2022 00:00:00 +0000</pubDate>
      
      <guid>/docs/user-guide/api/</guid>
      <description>
        
        
        &lt;p&gt;&lt;em&gt;Stroom&lt;/em&gt; has many public REST &lt;span class=&#34;glossary-link&#34;&gt;
    &lt;a href=&#34;../../docs/glossary/a/glossary-api&#34;&gt;
      &lt;span&gt;APIs&lt;/span&gt;
      &lt;i class=&#34;glossary-link-icon fas fa-book fa-sm text-primary&#34;&gt;&lt;/i&gt;
    &lt;/a&gt;&lt;span class=&#34;glossary-tooltip&#34;&gt;
      &lt;span class=&#34;glossary-tooltip-title&#34;&gt;API&lt;/span&gt;
      &lt;span class=&#34;glossary-tooltip-summary&#34;&gt;&lt;em&gt;Application Programming Interface&lt;/em&gt;. An interface that one system can present so other systems can use it to communicate. Stroom has a number of APIs, e.g. its many &lt;em&gt;REST&lt;/em&gt; APIs and its &lt;code&gt;/datafeed&lt;/code&gt; interface for data receipt.&lt;/span&gt;&lt;span class=&#34;glossary-tooltip-truncated&#34;&gt;Click to see more details...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; to allow other systems to interact with &lt;em&gt;Stroom&lt;/em&gt;.
Everything that can be done via the user interface can also be done using the API.&lt;/p&gt;
&lt;p&gt;All methods on the API will are authenticated and authorised, so the permissions will be exactly the same as if the API user is using the Stroom user interface directly.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Calling an API</title>
      <link>/docs/user-guide/api/calling-api/</link>
      <pubDate>Tue, 17 Jan 2023 00:00:00 +0000</pubDate>
      
      <guid>/docs/user-guide/api/calling-api/</guid>
      <description>
        
        
        &lt;h2 id=&#34;authentication&#34;&gt;Authentication&lt;/h2&gt;
&lt;p&gt;In order to use the API endpoints you will need to authenticate.
Authentication is achieved using an &lt;span class=&#34;glossary-link&#34;&gt;
    &lt;a href=&#34;../../docs/glossary/a/glossary-api-key&#34;&gt;
      &lt;span&gt;API Key&lt;/span&gt;
      &lt;i class=&#34;glossary-link-icon fas fa-book fa-sm text-primary&#34;&gt;&lt;/i&gt;
    &lt;/a&gt;&lt;span class=&#34;glossary-tooltip&#34;&gt;
      &lt;span class=&#34;glossary-tooltip-title&#34;&gt;API Key&lt;/span&gt;
      &lt;span class=&#34;glossary-tooltip-summary&#34;&gt;&lt;em&gt;API Keys&lt;/em&gt; are a form of authentication token that are created within Stroom for use by Stroom-Proxy instances or other clients that want to use Stroom&amp;rsquo;s &lt;em&gt;API&lt;/em&gt;. It is an encrypted string that contains details of the user and the expiration date of the token. Possession of a valid API Key for a user account means that you can do anything that the user can do in the user interface via the API.&lt;/span&gt;&lt;span class=&#34;glossary-tooltip-truncated&#34;&gt;Click to see more details...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; or &lt;span class=&#34;glossary-link&#34;&gt;
    &lt;a href=&#34;../../docs/glossary/t/glossary-token&#34;&gt;
      &lt;span&gt;Token&lt;/span&gt;
      &lt;i class=&#34;glossary-link-icon fas fa-book fa-sm text-primary&#34;&gt;&lt;/i&gt;
    &lt;/a&gt;&lt;span class=&#34;glossary-tooltip&#34;&gt;
      &lt;span class=&#34;glossary-tooltip-title&#34;&gt;Token&lt;/span&gt;
      &lt;span class=&#34;glossary-tooltip-summary&#34;&gt;Typically refers to an authentication token that may be used for user authentication. A Stroom &lt;em&gt;API Key&lt;/em&gt; is a form of authentication token.&lt;/span&gt;&lt;span class=&#34;glossary-tooltip-truncated&#34;&gt;Click to see more details...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;You will either need to create an API key for your personal Stroom user account or for a shared processing user account.
Whichever user account you use it will need to have the necessary permissions for each API endpoint it is to be used with.&lt;/p&gt;
&lt;p&gt;To create an API key (token) for a user:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In the top menu, select:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;




  &lt;div class=&#34;stroom-theme-dark stroom-menu&#34;&gt;
    
    

      

      
      


      

  
  
  &lt;div class=&#34;stroom-menu-item-background&#34; style=&#34;margin-top: 0px;&#34;&gt;
    
    &lt;div class=&#34;stroom-menu-item &#34; &gt;

      &lt;div class=&#34;stroom-menu-item-text&#34;&gt;Tools
      &lt;/div&gt;
        &lt;div class=&#34;stroom-menu-item-arrow&#34;&gt;
          &lt;span class=&#34;stroom-icon inline-svg-button icon-button  &#34; &gt;
    &lt;span class=&#34;face&#34; title=&#34;Arrow right&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; width=&#34;1427.7665&#34; height=&#34;1427.7665&#34; viewBox=&#34;0 0 1427.7665 1427.7665&#34;&gt;&lt;g style=&#34;stroke:currentColor;stroke-width:167.567&#34;&gt;&lt;path d=&#34;m 415.05387,83.70929 c -39.92654,0.4303 -75.41463,48.3887 -40.0468,81.9121 C 567.552,348.69899 760.75555,531.15431 953.73208,713.82391 760.75555,896.49341 567.552,1078.9486 375.00707,1262.0262 c -46.19471,43.7855 28.48812,112.1966 76.0571,67.1681 195.93558,-185.823 392.95261,-370.82479 587.98693,-557.52749 5.6117,-4.8034 10.4633,-10.2473 14.4855,-16.1231 9.643,-12.4844 13.9638,-27.0796 13.6909,-41.7198 0.2729,-14.6402 -4.0479,-29.2354 -13.6909,-41.7198 -4.0222,-5.8758 -8.8738,-11.3198 -14.4855,-16.1231 C 844.01678,469.27821 646.99975,284.27629 451.06417,98.45319 439.91519,87.89979 427.27628,83.57749 415.05387,83.70929 Z&#34;/&gt;&lt;/g&gt;&lt;/svg&gt; &lt;/span&gt;
  &lt;/span&gt;
        &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;

      

      
      
        
      


      

  
  
  &lt;div class=&#34;stroom-menu-item-background&#34; style=&#34;margin-top: 7px;&#34;&gt;
    
    &lt;div class=&#34;stroom-menu-item stroom-menu-item-leaf&#34; &gt;

      &lt;div class=&#34;stroom-menu-item-text&#34;&gt;API Keys
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;


&lt;/br&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click &lt;em&gt;Create&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Enter a suitable expiration date.
Short expiry periods are more secure in case the key is compromised.&lt;/li&gt;
&lt;li&gt;Select the user account that you are creating the key for.&lt;/li&gt;
&lt;li&gt;Click 






  
  
  


&lt;span class=&#34;stroom-theme-dark stroom-button stroom-button-primary&#34; title=&#34;OK button&#34; &gt;
  &lt;span class=&#34;stroom-icon inline-svg-button icon-button  icon-colour__grey&#34; &gt;
    &lt;span class=&#34;face&#34; title=&#34;OK&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 512 512&#34;&gt;&lt;!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --&gt;&lt;path style=&#34;fill:#fff&#34; d=&#34;M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z&#34;/&gt;&lt;/svg&gt; &lt;/span&gt;
  &lt;/span&gt;
  &lt;span class=&#34;stroom-button-text&#34;&gt;OK&lt;/span&gt;
&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;Select the newly created API Key from the list of keys and double click it to open it.&lt;/li&gt;
&lt;li&gt;Click 






  


&lt;span class=&#34;stroom-theme-dark stroom-button key-bind-single&#34; title=&#34;Copy Key button&#34; &gt;
  
  &lt;span class=&#34;stroom-button-text&#34;&gt;Copy Key&lt;/span&gt;
&lt;/span&gt;
 to copy the key to the clipboard.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To make an authenticated API call you need to provide a header of the form &lt;code&gt;Authorization:Bearer ${TOKEN}&lt;/code&gt;, where &lt;code&gt;${TOKEN}&lt;/code&gt; is your API Key as copied from Stroom.&lt;/p&gt;
&lt;h2 id=&#34;calling-an-api-method-with-curl&#34;&gt;Calling an API method with &lt;code&gt;curl&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;This section describes how to call an API method using the command line tool &lt;code&gt;curl&lt;/code&gt; as an example client.
Other clients can be used, e.g. using python, but these examples should provide enough help to get started using another client.&lt;/p&gt;
&lt;h3 id=&#34;http-requests-without-a-body&#34;&gt;HTTP Requests Without a Body&lt;/h3&gt;
&lt;p&gt;Typically HTTP &lt;code&gt;GET&lt;/code&gt; requests will have no body/payload
Often &lt;code&gt;PUT&lt;/code&gt; and &lt;code&gt;DELETE&lt;/code&gt; requests will also have no body/payload.&lt;/p&gt;
&lt;p&gt;The following is an example of how to call an HTTP GET method (i.e. a method that does not require a request body) on the API using &lt;code&gt;curl&lt;/code&gt;.&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;somehost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;TOKEN=&amp;#39;API KEY GOES IN HERE&amp;#39; \
curl \
  --silent \
  --insecure \
  --header &amp;#34;Authorization:Bearer ${TOKEN}&amp;#34; \
  https://stroom-fqdn/api/node/v1/info/node1a&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Example output:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-json&#34;&gt;{&amp;quot;discoverTime&amp;quot;:&amp;quot;2022-02-16T17:28:37.710Z&amp;quot;,&amp;quot;buildInfo&amp;quot;:{&amp;quot;buildDate&amp;quot;:&amp;quot;2022-01-19T15:27:25.024677714Z&amp;quot;,&amp;quot;buildVersion&amp;quot;:&amp;quot;7.0-beta.175&amp;quot;,&amp;quot;upDate&amp;quot;:&amp;quot;2022-02-16T09:28:11.733Z&amp;quot;},&amp;quot;nodeName&amp;quot;:&amp;quot;node1a&amp;quot;,&amp;quot;endpointUrl&amp;quot;:&amp;quot;http://192.168.1.64:8080&amp;quot;,&amp;quot;itemList&amp;quot;:[{&amp;quot;nodeName&amp;quot;:&amp;quot;node1a&amp;quot;,&amp;quot;active&amp;quot;:true,&amp;quot;master&amp;quot;:true}],&amp;quot;ping&amp;quot;:2}
&lt;/code&gt;&lt;/pre&gt;

&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Warning&lt;/h4&gt;

    &lt;p&gt;The &lt;code&gt;--insecure&lt;/code&gt; argument is used in this example which means certificate verification will not take place.
It is recommended not to use this argument and instead supply curl with client and certificate authority certificates to make a secure connection.&lt;/p&gt;
&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;TOKEN=&amp;#39;API KEY GOES IN HERE&amp;#39; \
curl \
  --silent \
  --cert /path/to/client-cert \
  --key /path/to/client-key \
  --cacert /path/to/ca-cert \
  --header &amp;#34;Authorization:Bearer ${TOKEN}&amp;#34; \
  https://stroom-fqdn/api/some/path&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;/div&gt;


&lt;p&gt;You can either call the API via Nginx (or similar reverse proxy) at &lt;code&gt;https://stroom-fqdn/api/some/path&lt;/code&gt; or if you are making the call from one of the stroom hosts you can go direct using &lt;code&gt;http://localhost:8080/api/some/path&lt;/code&gt;. The former is preferred as it is more secure.&lt;/p&gt;
&lt;h3 id=&#34;requests-with-a-body&#34;&gt;Requests With a Body&lt;/h3&gt;
&lt;p&gt;A lot of the API methods in Stroom require complex bodies/payloads for the request.
The following example is an HTTP &lt;code&gt;POST&lt;/code&gt; to perform a reference data lookup on the local host.&lt;/p&gt;
&lt;p&gt;Create a file &lt;code&gt;req.json&lt;/code&gt; containing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-json&#34;&gt;{
  &amp;quot;mapName&amp;quot;: &amp;quot;USER_ID_TO_STAFF_NO_MAP&amp;quot;,
  &amp;quot;effectiveTime&amp;quot;: &amp;quot;2024-12-02T08:37:02.772Z&amp;quot;,
  &amp;quot;key&amp;quot;: &amp;quot;user2&amp;quot;,
  &amp;quot;referenceLoaders&amp;quot;: [
    {
      &amp;quot;loaderPipeline&amp;quot; : {
        &amp;quot;name&amp;quot; : &amp;quot;Reference Loader&amp;quot;,
        &amp;quot;uuid&amp;quot; : &amp;quot;da1c7351-086f-493b-866a-b42dbe990700&amp;quot;,
        &amp;quot;type&amp;quot; : &amp;quot;Pipeline&amp;quot;
      },
      &amp;quot;referenceFeed&amp;quot; : {
        &amp;quot;name&amp;quot;: &amp;quot;STAFF-NO-REFERENCE&amp;quot;,
        &amp;quot;uuid&amp;quot;: &amp;quot;350003fe-2b6c-4c57-95ed-2e6018c5b3d5&amp;quot;,
        &amp;quot;type&amp;quot; : &amp;quot;Feed&amp;quot;
      }
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now send the request with &lt;code&gt;curl&lt;/code&gt;.&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;TOKEN=&amp;#39;API KEY GOES IN HERE&amp;#39; \
curl \
  --json @req.json \
  --request POST \
  --header &amp;#34;Authorization:Bearer ${TOKEN}&amp;#34; \
  http://localhost:8080/api/refData/v1/lookup
(out)staff2&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This API method returns plain text or XML depending on the reference data value.&lt;/p&gt;

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;


    &lt;p&gt;This assumes you are using &lt;code&gt;curl&lt;/code&gt; version &lt;code&gt;7.82.0&lt;/code&gt; or later that supports the &lt;code&gt;--json&lt;/code&gt; argument.
If not you will need to replace &lt;code&gt;--json&lt;/code&gt; with &lt;code&gt;--data&lt;/code&gt; and add these arguments:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;--header &amp;quot;Content-Type: application/json&amp;quot;
--header &amp;quot;Accept: application/json&amp;quot;
&lt;/code&gt;&lt;/pre&gt;


&lt;/div&gt;


&lt;h2 id=&#34;handling-json&#34;&gt;Handling JSON&lt;/h2&gt;
&lt;p&gt;&lt;span class=&#34;external-link&#34;&gt;
  &lt;a href=&#34;https://stedolan.github.io/jq/&#34; target=&#34;_blank&#34; class=&#34;external-link&#34; title=&#34;jq (external link to https://stedolan.github.io/jq/)&#34;&gt;
    &lt;span&gt;jq&lt;/span&gt;
    &lt;i class=&#34;external-link-icon fas fa-external-link-alt fa-sm text-secondary&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/span&gt;
 is a utility for processing JSON and is very useful when using the API methods.&lt;/p&gt;
&lt;p&gt;For example to get just the build version from the node info endpoint:&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;TOKEN=&amp;#39;API KEY GOES IN HERE&amp;#39; \
curl \
    --silent \
    --insecure \
    --header &amp;#34;Authorization:Bearer ${TOKEN}&amp;#34; \
    https://localhost/api/node/v1/info/node1a \
  | jq -r &amp;#39;.buildInfo.buildVersion&amp;#39;
(out)7.0-beta.175&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


      </description>
    </item>
    
    <item>
      <title>Docs: Query APIs</title>
      <link>/docs/user-guide/api/query-api/</link>
      <pubDate>Wed, 16 Feb 2022 00:00:00 +0000</pubDate>
      
      <guid>/docs/user-guide/api/query-api/</guid>
      <description>
        
        
        &lt;p&gt;The Query APIs use common request/response models and end points for querying each type of data source held in &lt;em&gt;Stroom&lt;/em&gt;.
The request/response models are defined in &lt;span class=&#34;external-link&#34;&gt;
  &lt;a href=&#34;https://github.com/gchq/stroom-query&#34; target=&#34;_blank&#34; class=&#34;external-link&#34; title=&#34;stroom-query (external link to https://github.com/gchq/stroom-query)&#34;&gt;
    &lt;span&gt;stroom-query&lt;/span&gt;
    &lt;i class=&#34;external-link-icon fas fa-external-link-alt fa-sm text-secondary&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/span&gt;
.&lt;/p&gt;
&lt;p&gt;Currently &lt;em&gt;Stroom&lt;/em&gt; exposes a set of query endpoints for the following data source types.
Each data source type will have its own endpoint due to differences in the way the data is queried and the restrictions imposed on the query terms.
However they all share the same API definition.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&#34;stroom-icon inline-svg-button icon-button  &#34; &gt;
    &lt;span class=&#34;face&#34; title=&#34;Index&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; width=&#34;1792&#34; height=&#34;1792&#34; viewBox=&#34;0 0 1792 1792&#34;&gt;&lt;path style=&#34;fill:var(--icon-colour__orange)&#34; d=&#34;M896 768q237 0 443-43t325-127v170q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-170q119 84 325 127t443 43zm0 768q237 0 443-43t325-127v170q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-170q119 84 325 127t443 43zm0-384q237 0 443-43t325-127v170q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-170q119 84 325 127t443 43zm0-1152q208 0 385 34.5t280 93.5 103 128v128q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-128q0-69 103-128t280-93.5 385-34.5z&#34;/&gt;&lt;/svg&gt;&lt;/span&gt;
  &lt;/span&gt;&lt;span class=&#34;external-link&#34;&gt;
  &lt;a href=&#34;https://gchq.github.io/stroom/v7.12/#/Stroom-Index%20Queries&#34; target=&#34;_blank&#34; class=&#34;external-link&#34; title=&#34;stroom-index Queries (external link to https://gchq.github.io/stroom/v7.12/#/Stroom-Index%20Queries)&#34;&gt;
    &lt;span&gt;stroom-index Queries&lt;/span&gt;
    &lt;i class=&#34;external-link-icon fas fa-external-link-alt fa-sm text-secondary&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/span&gt;
 -
The Lucene based search indexes.&lt;/li&gt;
&lt;li&gt;&lt;span class=&#34;stroom-icon inline-svg-button icon-button  &#34; &gt;
    &lt;span class=&#34;face&#34; title=&#34;SQL Statistics&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; width=&#34;1792&#34; height=&#34;1792&#34; viewBox=&#34;0 0 1792 1792&#34;&gt;&lt;path style=&#34;fill:var(--icon-colour__blue)&#34; d=&#34;M896 768q237 0 443-43t325-127v170q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-170q119 84 325 127t443 43zm0 768q237 0 443-43t325-127v170q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-170q119 84 325 127t443 43zm0-384q237 0 443-43t325-127v170q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-170q119 84 325 127t443 43zm0-1152q208 0 385 34.5t280 93.5 103 128v128q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-128q0-69 103-128t280-93.5 385-34.5z&#34;/&gt;&lt;/svg&gt;&lt;/span&gt;
  &lt;/span&gt;&lt;span class=&#34;external-link&#34;&gt;
  &lt;a href=&#34;https://gchq.github.io/stroom/v7.12/#/Sql%20Statistics%20Query&#34; target=&#34;_blank&#34; class=&#34;external-link&#34; title=&#34;Sql Statistics Query (external link to https://gchq.github.io/stroom/v7.12/#/Sql%20Statistics%20Query)&#34;&gt;
    &lt;span&gt;Sql Statistics Query&lt;/span&gt;
    &lt;i class=&#34;external-link-icon fas fa-external-link-alt fa-sm text-secondary&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/span&gt;
 -
Stroom&amp;rsquo;s SQL Statistics store.&lt;/li&gt;
&lt;li&gt;&lt;span class=&#34;stroom-icon inline-svg-button icon-button  &#34; &gt;
    &lt;span class=&#34;face&#34; title=&#34;Searchable&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; width=&#34;1792&#34; height=&#34;1792&#34; viewBox=&#34;0 0 1792 1792&#34;&gt;&lt;path style=&#34;fill:var(--icon-colour__grey)&#34; d=&#34;M896 768q237 0 443-43t325-127v170q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-170q119 84 325 127t443 43zm0 768q237 0 443-43t325-127v170q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-170q119 84 325 127t443 43zm0-384q237 0 443-43t325-127v170q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-170q119 84 325 127t443 43zm0-1152q208 0 385 34.5t280 93.5 103 128v128q0 69-103 128t-280 93.5-385 34.5-385-34.5-280-93.5-103-128v-128q0-69 103-128t280-93.5 385-34.5z&#34;/&gt;&lt;/svg&gt; &lt;/span&gt;
  &lt;/span&gt;&lt;span class=&#34;external-link&#34;&gt;
  &lt;a href=&#34;https://gchq.github.io/stroom/v7.12/#/Searchable&#34; target=&#34;_blank&#34; class=&#34;external-link&#34; title=&#34;Searchable (external link to https://gchq.github.io/stroom/v7.12/#/Searchable)&#34;&gt;
    &lt;span&gt;Searchable&lt;/span&gt;
    &lt;i class=&#34;external-link-icon fas fa-external-link-alt fa-sm text-secondary&#34;&gt;&lt;/i&gt;
  &lt;/a&gt;
&lt;/span&gt;
 -
Searchables are various data sources that allow you to search the internals of Stroom, e.g. local reference data store, annotations, processor tasks, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The detailed documentation for the request/responses is contained in the &lt;em&gt;Swagger&lt;/em&gt; definition linked to above.&lt;/p&gt;
&lt;h2 id=&#34;common-endpoints&#34;&gt;Common endpoints&lt;/h2&gt;
&lt;p&gt;The standard query endpoints are&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;/&lt;a href=&#34;#datasource&#34;&gt;datasource&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;/&lt;a href=&#34;#destroy&#34;&gt;destroy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;/&lt;a href=&#34;#keepalive&#34;&gt;keepAlive&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;/&lt;a href=&#34;#search&#34;&gt;search&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;datasource&#34;&gt;Datasource&lt;/h3&gt;
&lt;p&gt;The &lt;span class=&#34;glossary-link&#34;&gt;
    &lt;a href=&#34;../../docs/glossary/d/glossary-data-source&#34;&gt;
      &lt;span&gt;Data source&lt;/span&gt;
      &lt;i class=&#34;glossary-link-icon fas fa-book fa-sm text-primary&#34;&gt;&lt;/i&gt;
    &lt;/a&gt;&lt;span class=&#34;glossary-tooltip&#34;&gt;
      &lt;span class=&#34;glossary-tooltip-title&#34;&gt;Data source&lt;/span&gt;
      &lt;span class=&#34;glossary-tooltip-summary&#34;&gt;The source of data for a &lt;em&gt;Query&lt;/em&gt;, e.g. a &lt;em&gt;Lucene&lt;/em&gt; based &lt;em&gt;Index&lt;/em&gt;, a SQL Statistics Data source, etc.&lt;/span&gt;&lt;span class=&#34;glossary-tooltip-truncated&#34;&gt;Click to see more details...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; endpoint is used to query &lt;em&gt;Stroom&lt;/em&gt; for the details of a data source with a given &lt;span class=&#34;glossary-link&#34;&gt;
    &lt;a href=&#34;../../docs/glossary/d/glossary-docref&#34;&gt;
      &lt;span&gt;Doc Ref&lt;/span&gt;
      &lt;i class=&#34;glossary-link-icon fas fa-book fa-sm text-primary&#34;&gt;&lt;/i&gt;
    &lt;/a&gt;&lt;span class=&#34;glossary-tooltip&#34;&gt;
      &lt;span class=&#34;glossary-tooltip-title&#34;&gt;Doc Ref&lt;/span&gt;
      &lt;span class=&#34;glossary-tooltip-summary&#34;&gt;A &lt;em&gt;Doc Ref&lt;/em&gt; (or Document Reference) is an identifier used to identify most documents/entities in Stroom, e.g. an XSLT will have a Doc Ref.&lt;/span&gt;&lt;span class=&#34;glossary-tooltip-truncated&#34;&gt;Click to see more details...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.
The details will include such things as the fields available and any restrictions on querying the data.&lt;/p&gt;
&lt;h3 id=&#34;search&#34;&gt;Search&lt;/h3&gt;
&lt;p&gt;The search endpoint is used to initiate a search against a data source or to request more data for an active search.
A search request can be made using iterative mode, where it will perform the search and then only return the data it has immediately available.
Subsequent requests for the same &lt;em&gt;queryKey&lt;/em&gt; will also return the data immediately available, expecting that more results will have been found by the query.
Requesting a search in non-iterative mode will result in the response being returned when the query has completed and all known results have been found.&lt;/p&gt;
&lt;p&gt;The SearchRequest model is fairly complicated and contains not only the query terms but also a definition of how the data should be returned.
A single SearchRequest can include multiple ResultRequest sections to return the queried data in multiple ways, e.g. as flat data and in an alternative aggregated form.&lt;/p&gt;
&lt;h4 id=&#34;_stroom_-as-a-query-builder&#34;&gt;&lt;em&gt;Stroom&lt;/em&gt; as a query builder&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Stroom&lt;/em&gt; is able to export the json form of a SearchRequest model from its dashboards.
This makes the dashboard a useful tool for building a query and the table settings to go with it.
You can use the dashboard to define the data source, define the query terms tree and build a table definition (or definitions) to describe how the data should be returned.
Then, clicking the download icon on the query pane of the dashboard will generate the SearchRequest json which can be immediately used with the /search API or modified to suit.&lt;/p&gt;
&lt;h3 id=&#34;destroy&#34;&gt;Destroy&lt;/h3&gt;
&lt;p&gt;This endpoint is used to kill an active query by supplying the &lt;em&gt;queryKey&lt;/em&gt; for query in question.&lt;/p&gt;
&lt;h3 id=&#34;keep-alive&#34;&gt;Keep alive&lt;/h3&gt;
&lt;p&gt;Stroom will only hold search results from completed queries for a certain length of time.
It will also terminate running queries that are too old.
In order to prevent queries being aged off you can hit this endpoint to indicate to Stroom that you still have an interest in a particular query by supplying the query key.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Export Content API</title>
      <link>/docs/user-guide/api/export-api/</link>
      <pubDate>Tue, 17 Jan 2023 00:00:00 +0000</pubDate>
      
      <guid>/docs/user-guide/api/export-api/</guid>
      <description>
        
        
        &lt;p&gt;Stroom has &lt;span class=&#34;glossary-link&#34;&gt;
    &lt;a href=&#34;../../docs/glossary/a/glossary-api&#34;&gt;
      &lt;span&gt;API&lt;/span&gt;
      &lt;i class=&#34;glossary-link-icon fas fa-book fa-sm text-primary&#34;&gt;&lt;/i&gt;
    &lt;/a&gt;&lt;span class=&#34;glossary-tooltip&#34;&gt;
      &lt;span class=&#34;glossary-tooltip-title&#34;&gt;API&lt;/span&gt;
      &lt;span class=&#34;glossary-tooltip-summary&#34;&gt;&lt;em&gt;Application Programming Interface&lt;/em&gt;. An interface that one system can present so other systems can use it to communicate. Stroom has a number of APIs, e.g. its many &lt;em&gt;REST&lt;/em&gt; APIs and its &lt;code&gt;/datafeed&lt;/code&gt; interface for data receipt.&lt;/span&gt;&lt;span class=&#34;glossary-tooltip-truncated&#34;&gt;Click to see more details...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; methods for exporting &lt;span class=&#34;glossary-link&#34;&gt;
    &lt;a href=&#34;../../docs/glossary/c/glossary-content&#34;&gt;
      &lt;span&gt;Content&lt;/span&gt;
      &lt;i class=&#34;glossary-link-icon fas fa-book fa-sm text-primary&#34;&gt;&lt;/i&gt;
    &lt;/a&gt;&lt;span class=&#34;glossary-tooltip&#34;&gt;
      &lt;span class=&#34;glossary-tooltip-title&#34;&gt;Content&lt;/span&gt;
      &lt;span class=&#34;glossary-tooltip-summary&#34;&gt;Content in Stroom typically means the user created documents/entities created in Stroom and as seen in the explorer tree. Content can be created/modified by Stroom users and imported/exported for sharing between different Stroom instances.&lt;/span&gt;&lt;span class=&#34;glossary-tooltip-truncated&#34;&gt;Click to see more details...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; in Stroom to a single zip file.&lt;/p&gt;
&lt;h2 id=&#34;export-all---apiexportv1&#34;&gt;Export All - &lt;code&gt;/api/export/v1&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;This method will export all content in Stroom to a single zip file.
This is useful as an alternative backup of the content or where you need to export the content for import into another Stroom instance.&lt;/p&gt;
&lt;p&gt;In order to perform a full export, the user (identified by their API Key) performing the export will need to ensure the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Have created an &lt;a href=&#34;../../docs/user-guide/api/#authentication&#34;&gt;API Key&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The system property &lt;code&gt;stroom.export.enabled&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The user has the application permission &lt;code&gt;Export Configuration&lt;/code&gt; or &lt;code&gt;Administrator&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Only those items that the user has &lt;code&gt;Read&lt;/code&gt; permission on will be exported, so to export all items, the user performing the export will need &lt;code&gt;Read&lt;/code&gt; permission on all items or have the &lt;code&gt;Administrator&lt;/code&gt; application permission.&lt;/p&gt;
&lt;h3 id=&#34;performing-an-export&#34;&gt;Performing an Export&lt;/h3&gt;
&lt;p&gt;To export all readable content to a file called &lt;code&gt;export.zip&lt;/code&gt; do something like the following:&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;TOKEN=&amp;#34;API KEY GOES IN HERE&amp;#34;
curl \
  --silent \
  --request GET \
  --header &amp;#34;Authorization:Bearer ${TOKEN}&amp;#34; \
  --output export.zip \
  https://stroom-fqdn/api/export/v1/&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;


    If you encounter problems then replace &lt;code&gt;--silent&lt;/code&gt; with &lt;code&gt;--verbose&lt;/code&gt; to get more information.

&lt;/div&gt;


&lt;h2 id=&#34;export-zip-format&#34;&gt;Export Zip Format&lt;/h2&gt;
&lt;p&gt;The export zip will contain a number of files for each &lt;span class=&#34;glossary-link&#34;&gt;
    &lt;a href=&#34;../../docs/glossary/d/glossary-document&#34;&gt;
      &lt;span&gt;Document&lt;/span&gt;
      &lt;i class=&#34;glossary-link-icon fas fa-book fa-sm text-primary&#34;&gt;&lt;/i&gt;
    &lt;/a&gt;&lt;span class=&#34;glossary-tooltip&#34;&gt;
      &lt;span class=&#34;glossary-tooltip-title&#34;&gt;Document&lt;/span&gt;
      &lt;span class=&#34;glossary-tooltip-summary&#34;&gt;Typically refers to an item that can be created in the Explorer Tree, e.g. a Feed, a Pipeline, a Dashboard, etc. May also be known as an &lt;em&gt;Entity&lt;/em&gt;.&lt;/span&gt;&lt;span class=&#34;glossary-tooltip-truncated&#34;&gt;Click to see more details...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; exported.
The number and type of these files will depend on the type of document, however every document will have the following two file types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.node&lt;/code&gt; - This file represents the document&amp;rsquo;s location in the explorer tree along with its name and UUID.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.meta&lt;/code&gt; - This is the metadata for the document independent of the explorer tree.
It contains the name, type and UUID of the document along with the unique identifier for the version of the document.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Documents may also have files like these (a non-exhaustive list):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.json&lt;/code&gt; - JSON data holding the content of the document, as used for Dashboards.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.txt&lt;/code&gt; - Plain text data holding the content of the document, as used for Dictionaries.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.xml&lt;/code&gt; - XML data holding the content of the document, as used for Pipelines.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.xsd&lt;/code&gt; - XML Schema content.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.xsl&lt;/code&gt; - XSLT content.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following is an example of the content of an export zip file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;TEST_FEED_CERT.Feed.fcee4270-a479-4cc0-a79c-0e8f18a4bad8.meta
TEST_FEED_CERT.Feed.fcee4270-a479-4cc0-a79c-0e8f18a4bad8.node
TEST_FEED_PROXY.Feed.f06d4416-8b0e-4774-94a9-729adc5633aa.meta
TEST_FEED_PROXY.Feed.f06d4416-8b0e-4774-94a9-729adc5633aa.node
TEST_REFERENCE_DATA_EVENTS_XXX.XSLT.4f74999e-9d69-47c7-97f7-5e88cc7459f7.meta
TEST_REFERENCE_DATA_EVENTS_XXX.XSLT.4f74999e-9d69-47c7-97f7-5e88cc7459f7.xsl
TEST_REFERENCE_DATA_EVENTS_XXX.XSLT.4f74999e-9d69-47c7-97f7-5e88cc7459f7.node
Standard_Pipelines/Reference_Loader.Pipeline.da1c7351-086f-493b-866a-b42dbe990700.xml
Standard_Pipelines/Reference_Loader.Pipeline.da1c7351-086f-493b-866a-b42dbe990700.meta
Standard_Pipelines/Reference_Loader.Pipeline.da1c7351-086f-493b-866a-b42dbe990700.node
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&#34;filenames&#34;&gt;Filenames&lt;/h3&gt;
&lt;p&gt;When documents are added to the zip, they are added with a directory structure that mirrors the explorer tree.&lt;/p&gt;
&lt;p&gt;The filenames are of the form:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;&amp;lt;name&amp;gt;.&amp;lt;type&amp;gt;.&amp;lt;UUID&amp;gt;.&amp;lt;extension&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As Stroom allows characters in document and folder names that would not be supported in operating system paths (or cause confusion), some characters in the name/directory parts are replaced by &lt;code&gt;_&lt;/code&gt; to avoid this. e.g. &lt;code&gt;Dashboard 01/02/2020&lt;/code&gt; would become &lt;code&gt;Dashboard_01_02_2020&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you need to see the contents of the zip as if viewing it within Stroom you can run this bash script in the root of the extracted zip.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/usr/bin/env bash

shopt -s globstar
for node_file in **/*.node; do
  name=
  name=&amp;quot;$(grep -o -P &amp;quot;(?&amp;lt;=name=).*&amp;quot; &amp;quot;${node_file}&amp;quot; )&amp;quot;
  path=
  path=&amp;quot;$(grep -o -P &amp;quot;(?&amp;lt;=path=).*&amp;quot; &amp;quot;${node_file}&amp;quot; )&amp;quot;

  echo &amp;quot;./${path}/${name}   (./${node_file})&amp;quot;
done
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will output something like:&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;(out) ./Standard Pipelines/Json/Events to JSON   (./Standard_Pipelines/Json/Events_to_JSON.XSLT.1c3d42c2-f512-423f-aa6a-050c5cad7c0f.node)
(out) ./Standard Pipelines/Json/JSON Extraction   (./Standard_Pipelines/Json/JSON_Extraction.Pipeline.13143179-b494-4146-ac4b-9a6010cada89.node)
(out) ./Standard Pipelines/Json/JSON Search Extraction   (./Standard_Pipelines/Json/JSON_Search_Extraction.XSLT.a8c1aa77-fb90-461a-a121-d4d87d2ff072.node)
(out) ./Standard Pipelines/Reference Loader   (./Standard_Pipelines/Reference_Loader.Pipeline.da1c7351-086f-493b-866a-b42dbe990700.node)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


      </description>
    </item>
    
    <item>
      <title>Docs: Reference Data API</title>
      <link>/docs/user-guide/api/reference-data-api/</link>
      <pubDate>Wed, 01 Feb 2023 00:00:00 +0000</pubDate>
      
      <guid>/docs/user-guide/api/reference-data-api/</guid>
      <description>
        
        
        &lt;p&gt;The reference data store has an API to allow other systems to access the reference data store.&lt;/p&gt;
&lt;h2 id=&#34;apirefdatav1lookup&#34;&gt;&lt;code&gt;/api/refData/v1/lookup&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;/lookup&lt;/code&gt; endpoint requires the caller to provide details of the reference feed and loader pipeline so if the effective stream is not in the store it can be loaded prior to performing the lookup.
It is useful for forcing a reference load into the store and for performing ad-hoc lookups.&lt;/p&gt;

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;


    As reference data stores are local to a node, it is best to send the request to a node that does processing as it is more likely to have already loaded the data.
If you send it to a UI node that does not do processing, it is likely to trigger a load as the data will not be there.

&lt;/div&gt;


&lt;p&gt;Below is an example of a lookup request file &lt;code&gt;req.json&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-json&#34;&gt;{
  &amp;quot;mapName&amp;quot;: &amp;quot;USER_ID_TO_LOCATION&amp;quot;,
  &amp;quot;effectiveTime&amp;quot;: &amp;quot;2020-12-02T08:37:02.772Z&amp;quot;,
  &amp;quot;key&amp;quot;: &amp;quot;jbloggs&amp;quot;,
  &amp;quot;referenceLoaders&amp;quot;: [
    {
      &amp;quot;loaderPipeline&amp;quot; : {
        &amp;quot;name&amp;quot; : &amp;quot;Reference Loader&amp;quot;,
        &amp;quot;uuid&amp;quot; : &amp;quot;da1c7351-086f-493b-866a-b42dbe990700&amp;quot;,
        &amp;quot;type&amp;quot; : &amp;quot;Pipeline&amp;quot;
      },
      &amp;quot;referenceFeed&amp;quot; : {
        &amp;quot;name&amp;quot;: &amp;quot;USER_ID_TOLOCATION-REFERENCE&amp;quot;,
        &amp;quot;uuid&amp;quot;: &amp;quot;60f9f51d-e5d6-41f5-86b9-ae866b8c9fa3&amp;quot;,
        &amp;quot;type&amp;quot; : &amp;quot;Feed&amp;quot;
      }
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is an example of how to perform the lookup on the local host.&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;curl \
  --json @req.json \
  --request POST \
  --header &amp;#34;Authorization:Bearer ${TOKEN}&amp;#34; \
  http://localhost:8080/api/refData/v1/lookup
(out)staff2&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


      </description>
    </item>
    
    <item>
      <title>Docs: Explorer API</title>
      <link>/docs/user-guide/api/explorer-api/</link>
      <pubDate>Tue, 11 Jun 2024 00:00:00 +0000</pubDate>
      
      <guid>/docs/user-guide/api/explorer-api/</guid>
      <description>
        
        
        &lt;h2 id=&#34;creating-a-new-document&#34;&gt;Creating a New Document&lt;/h2&gt;
&lt;p&gt;The explorer API is responsible for creation of all document types.
The explorer API is used to create the initial skeleton of a document then the API specific to the document type in question is used to update the document skeleton with additional settings/content.&lt;/p&gt;
&lt;p&gt;This is an example request file &lt;code&gt;req.json&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-json&#34;&gt;{
  &amp;quot;docType&amp;quot;: &amp;quot;Feed&amp;quot;,
  &amp;quot;docName&amp;quot;: &amp;quot;MY_FEED&amp;quot;,
  &amp;quot;destinationFolder&amp;quot;: {
    &amp;quot;type&amp;quot;: &amp;quot;Folder&amp;quot;,
    &amp;quot;uuid&amp;quot;: &amp;quot;3dfab6a2-dbd5-46ee-b6e9-6df45f90cd85&amp;quot;,
    &amp;quot;name&amp;quot;: &amp;quot;My Folder&amp;quot;,
    &amp;quot;rootNodeUuid&amp;quot;: &amp;quot;0&amp;quot;
  },
  &amp;quot;permissionInheritance&amp;quot;: &amp;quot;DESTINATION&amp;quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You need to set the following properties in the JSON:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;docType&lt;/code&gt; - The type of the document being created, see &lt;a href=&#34;../../docs/reference-section/documents/&#34;&gt;Documents&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;docName&lt;/code&gt; - The name of the new document.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;destinationFolder.uuid&lt;/code&gt; - The &lt;span class=&#34;glossary-link&#34;&gt;
    &lt;a href=&#34;../../docs/glossary/u/glossary-uuid&#34;&gt;
      &lt;span&gt;UUID&lt;/span&gt;
      &lt;i class=&#34;glossary-link-icon fas fa-book fa-sm text-primary&#34;&gt;&lt;/i&gt;
    &lt;/a&gt;&lt;span class=&#34;glossary-tooltip&#34;&gt;
      &lt;span class=&#34;glossary-tooltip-title&#34;&gt;UUID&lt;/span&gt;
      &lt;span class=&#34;glossary-tooltip-summary&#34;&gt;A &lt;strong&gt;U&lt;/strong&gt;niversally &lt;strong&gt;U&lt;/strong&gt;nique &lt;strong&gt;Id&lt;/strong&gt;entifier for uniquely identifying something. &lt;em&gt;UUIDs&lt;/em&gt; are used as the identifier in &lt;em&gt;Doc Refs&lt;/em&gt;. An example of a &lt;em&gt;UUID&lt;/em&gt; is &lt;code&gt;4ffeb895-53c9-40d6-bf33-3ef025401ad3&lt;/code&gt;.&lt;/span&gt;&lt;span class=&#34;glossary-tooltip-truncated&#34;&gt;Click to see more details...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; of the destination folder (or &lt;code&gt;0&lt;/code&gt; if the document is being created in the &lt;em&gt;System&lt;/em&gt; root.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rootNodeUuid&lt;/code&gt; - This is always &lt;code&gt;0&lt;/code&gt; for the &lt;em&gt;System&lt;/em&gt; root.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To create the skeleton document run the following:&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;curl \
  -s \
  -X POST \
  -H &amp;#34;Authorization:Bearer ${TOKEN}&amp;#34; \
  -H &amp;#39;Content-Type: application/json&amp;#39; \
  --data @&amp;#34;req.json&amp;#34; \
  http://localhost:8080/api/explorer/v2/create/ \
| jq -r &amp;#39;.uuid&amp;#39;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This will create the document and return its new UUID to &lt;em&gt;stdout&lt;/em&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Feed API</title>
      <link>/docs/user-guide/api/feed-api/</link>
      <pubDate>Tue, 11 Jun 2024 00:00:00 +0000</pubDate>
      
      <guid>/docs/user-guide/api/feed-api/</guid>
      <description>
        
        
        &lt;h2 id=&#34;creating-a-feed&#34;&gt;Creating a Feed&lt;/h2&gt;
&lt;p&gt;In order to create a Feed you must first &lt;a href=&#34;../../docs/user-guide/api/explorer-api/&#34;&gt;create the skeleton document&lt;/a&gt; using the Explorer API.&lt;/p&gt;
&lt;h2 id=&#34;updating-a-feed&#34;&gt;Updating a Feed&lt;/h2&gt;
&lt;p&gt;To modify a feed you must first fetch the existing Feed document.
This is done as follows:&lt;/p&gt;

  






&lt;div class=&#34;code-toolbar&#34;&gt;
  &lt;pre 
    class=&#34;command-line language-bash&#34; 
    data-user=&#34;user&#34; 
    data-host=&#34;localhost&#34; 
    data-continuation-str=&#34;\&#34;
    data-filter-output=&#34;(out)&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;curl \
  -s \
  -H &amp;#34;Authorization:Bearer ${TOKEN}&amp;#34; \
  &amp;#34;http://localhost:8080/api/feed/v1/${feed_uuid}&amp;#34; \&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Where &lt;code&gt;${feed_uuid}&lt;/code&gt; is the &lt;span class=&#34;glossary-link&#34;&gt;
    &lt;a href=&#34;../../docs/glossary/u/glossary-uuid&#34;&gt;
      &lt;span&gt;UUID&lt;/span&gt;
      &lt;i class=&#34;glossary-link-icon fas fa-book fa-sm text-primary&#34;&gt;&lt;/i&gt;
    &lt;/a&gt;&lt;span class=&#34;glossary-tooltip&#34;&gt;
      &lt;span class=&#34;glossary-tooltip-title&#34;&gt;UUID&lt;/span&gt;
      &lt;span class=&#34;glossary-tooltip-summary&#34;&gt;A &lt;strong&gt;U&lt;/strong&gt;niversally &lt;strong&gt;U&lt;/strong&gt;nique &lt;strong&gt;Id&lt;/strong&gt;entifier for uniquely identifying something. &lt;em&gt;UUIDs&lt;/em&gt; are used as the identifier in &lt;em&gt;Doc Refs&lt;/em&gt;. An example of a &lt;em&gt;UUID&lt;/em&gt; is &lt;code&gt;4ffeb895-53c9-40d6-bf33-3ef025401ad3&lt;/code&gt;.&lt;/span&gt;&lt;span class=&#34;glossary-tooltip-truncated&#34;&gt;Click to see more details...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; of the feed in question.&lt;/p&gt;
&lt;p&gt;This will return the Feed document JSON.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-json&#34;&gt;{
  &amp;quot;type&amp;quot;: &amp;quot;Feed&amp;quot;,
  &amp;quot;uuid&amp;quot;: &amp;quot;0dafc9c2-dcd8-4bb6-88ce-5ee228babe78&amp;quot;,
  &amp;quot;name&amp;quot;: &amp;quot;MY_FEED&amp;quot;,
  &amp;quot;version&amp;quot;: &amp;quot;32dae12f-a696-4e0e-8acb-47cf0ad3c77f&amp;quot;,
  &amp;quot;createTimeMs&amp;quot;: 1718103980225,
  &amp;quot;updateTimeMs&amp;quot;: 1718103980225,
  &amp;quot;createUser&amp;quot;: &amp;quot;admin&amp;quot;,
  &amp;quot;updateUser&amp;quot;: &amp;quot;admin&amp;quot;,
  &amp;quot;reference&amp;quot;: false,
  &amp;quot;streamType&amp;quot;: &amp;quot;Raw Events&amp;quot;,
  &amp;quot;status&amp;quot;: &amp;quot;RECEIVE&amp;quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can use &lt;code&gt;jq&lt;/code&gt; to modify this JSON to add/change any of the document settings.&lt;/p&gt;
&lt;h3 id=&#34;example-script&#34;&gt;Example Script&lt;/h3&gt;
&lt;p&gt;The following is an example &lt;code&gt;bash&lt;/code&gt; script for creating and modifying multiple Feeds.
It requires &lt;code&gt;curl&lt;/code&gt; and &lt;code&gt;jq&lt;/code&gt; to run.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/usr/bin/env bash

set -e -o pipefail

main() {

  # Your API key
  local TOKEN=&amp;quot;sak_d5752a32b2_mv1JYUYUuvRUDpikW75G5w4kQUq7EEjShQ9DiRjN14yEFonKTW42KbeQogui52gTjq9RDRufNEz2MXt1PRCThudzHU5RVpLMbZKThCgyyEX2y2sBrk31rYMJRKNg2yMG&amp;quot;
  # UUID of the dest folder
  local FOLDER_UUID=&amp;quot;fc617580-8cf0-4ac3-93dd-93604603aef0&amp;quot;

  local feed_name
  local create_feed_req
  local feed_uuid
  local feed_doc

  for i in {1..2}; do
    # Use date to make a unique name for the test
    feed_name=&amp;quot;MY_FEED_$(date +%s)_${i}&amp;quot;

    # Set the feed name and its destination
    create_feed_req=$(cat &amp;lt;&amp;lt;-END
      {
        &amp;quot;docType&amp;quot;: &amp;quot;Feed&amp;quot;,
        &amp;quot;docName&amp;quot;: &amp;quot;${feed_name}&amp;quot;,
        &amp;quot;destinationFolder&amp;quot;: {
          &amp;quot;type&amp;quot;: &amp;quot;Folder&amp;quot;,
          &amp;quot;uuid&amp;quot;: &amp;quot;${FOLDER_UUID}&amp;quot;,
          &amp;quot;rootNodeUuid&amp;quot;: &amp;quot;0&amp;quot;
        },
        &amp;quot;permissionInheritance&amp;quot;: &amp;quot;DESTINATION&amp;quot;
      }
END
    )

    # Create the skeleton feed and extract its new UUID from the response
    feed_uuid=$( \
      curl \
        -s \
        -X POST \
        -H &amp;quot;Authorization:Bearer ${TOKEN}&amp;quot; \
        -H &#39;Content-Type: application/json&#39; \
        --data &amp;quot;${create_feed_req}&amp;quot; \
        http://localhost:8080/api/explorer/v2/create/ \
      | jq -r &#39;.uuid&#39;
    )

    echo &amp;quot;Created feed $i with name &#39;${feed_name}&#39; and UUID &#39;${feed_uuid}&#39;&amp;quot;

    # Fetch the created feed
    feed_doc=$( \
      curl \
        -s \
        -H &amp;quot;Authorization:Bearer ${TOKEN}&amp;quot; \
        &amp;quot;http://localhost:8080/api/feed/v1/${feed_uuid}&amp;quot; \
      )

    echo -e &amp;quot;Skeleton Feed doc for &#39;${feed_name}&#39;\n$(jq &#39;.&#39; &amp;lt;&amp;lt;&amp;lt; &amp;quot;${feed_doc}&amp;quot;)&amp;quot;

    # Add/modify properties on the feed doc
    feed_doc=$(jq &#39;
      .classification=&amp;quot;HUSH HUSH&amp;quot; 
      | .encoding=&amp;quot;UTF8&amp;quot; 
      | .contextEncoding=&amp;quot;ASCII&amp;quot; 
      | .streamType=&amp;quot;Events&amp;quot;
      | .volumeGroup=&amp;quot;Default Volume Group&amp;quot;&#39; &amp;lt;&amp;lt;&amp;lt; &amp;quot;${feed_doc}&amp;quot;)

    #echo -e &amp;quot;Updated feed doc for &#39;${feed_name}&#39;\n$(jq &#39;.&#39; &amp;lt;&amp;lt;&amp;lt; &amp;quot;${feed_doc}&amp;quot;)&amp;quot;

    # Update the feed with the new properties
    curl \
      -s \
      -X PUT \
      -H &amp;quot;Authorization:Bearer ${TOKEN}&amp;quot; \
      -H &#39;Content-Type: application/json&#39; \
      --data &amp;quot;${feed_doc}&amp;quot; \
      &amp;quot;http://localhost:8080/api/feed/v1/${feed_uuid}&amp;quot; \
    &amp;gt; /dev/null

    # Fetch the created feed
    feed_doc=$( \
      curl \
        -s \
        -H &amp;quot;Authorization:Bearer ${TOKEN}&amp;quot; \
        &amp;quot;http://localhost:8080/api/feed/v1/${feed_uuid}&amp;quot; \
      )

    echo -e &amp;quot;Updated Feed doc for &#39;${feed_name}&#39;\n$(jq &#39;.&#39; &amp;lt;&amp;lt;&amp;lt; &amp;quot;${feed_doc}&amp;quot;)&amp;quot;
    echo
  done
}

main &amp;quot;$@&amp;quot;
&lt;/code&gt;&lt;/pre&gt;

      </description>
    </item>
    
  </channel>
</rss>
