<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Operations and Recovery APIs Archives - SearchStax Docs</title>
	<atom:link href="https://www.searchstax.com/docs/category/managed-solr/mloud-manager/searchstax-api/operations-and-recovery-apis/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Documentation</description>
	<lastBuildDate>Fri, 10 Jul 2026 15:40:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://www.searchstax.com/docs/wp-content/uploads/2023/10/cropped-favicon-32x32.png</url>
	<title>Operations and Recovery APIs Archives - SearchStax Docs</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Solr Backup/Restore API</title>
		<link>https://www.searchstax.com/docs/searchstax-cloud-backup-restore-api/</link>
					<comments>https://www.searchstax.com/docs/searchstax-cloud-backup-restore-api/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 07:56:22 +0000</pubDate>
				<category><![CDATA[Operations and Recovery APIs]]></category>
		<category><![CDATA[Cloud]]></category>
		<guid isPermaLink="false">https://www.searchstax.com/docs/?p=7603</guid>

					<description><![CDATA[<p>Provisioning API &#8211; Backup/Restore Overview The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr Cloud deployments. Core and Enterprise Clients Only! The&#8230; <a class="more-link" href="https://www.searchstax.com/docs/searchstax-cloud-backup-restore-api/">Continue reading <span class="screen-reader-text">Solr Backup/Restore API</span></a></p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-backup-restore-api/">Solr Backup/Restore API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="h-provisioning-api-backup-restore">Provisioning API &#8211; Backup/Restore</h1>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">Overview</h2>



<p class="wp-block-paragraph">The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr Cloud deployments.</p>



<div class="alert alert-info">
<h3>Core and Enterprise Clients Only!</h3>
<p>The SearchStax API suite is available to our Core and Enterprise
clients only, as noted on our <a href="https://www.searchstax.com/pricing/cloud/">Pricing</a> page. </p>
</div>



<p class="wp-block-paragraph">This page describes how to perform backup and restore operations through API methods.</p>



<p class="wp-block-paragraph">The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python <a href="https://pypi.org/project/coreapi/" target="_blank" rel="noreferrer noopener">coreapi</a> package, the <a href="https://www.postman.com/" target="_blank" rel="noreferrer noopener">Postman</a> tool, and <a href="https://curl.se" target="_blank" rel="noreferrer noopener">cURL</a>. For Windows, use <a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.1" target="_blank" rel="noreferrer noopener">PowerShell 7+</a>.</p>



<div class="alert alert-warning">
<h4>Account Owner, Admin, or Technical Contact</h4>
<p>To run the SearchStax Provisioning API, you must be the account Owner,
an account Admin, or a Technical Contact. See <a href="/docs/searchstax-cloud-user-roles/#userroles">SearchStax User Roles</a>.</p>
</div>



<p class="wp-block-paragraph">Symbols enclosed in carets (&lt; and &gt;) such as <strong>&lt;username&gt;</strong> are metavariables. Substitute your local values when you encounter them in the examples.</p>



<p class="wp-block-paragraph">Contents:</p>



<ul class="wp-block-list">
<li><a href="#h-account-level-methods">Account-Level Methods</a>
<ul class="wp-block-list">
<li><a href="#accountbackuplist">account &gt; backup &gt; list</a></li>



<li><a href="#h-account-gt-backup-gt-delete">account &gt; backup &gt; delete</a></li>



<li><a href="#h-account-gt-restore-gt-create">account &gt; restore &gt; create</a></li>
</ul>
</li>



<li><a href="#deploymentmethods">Deployment-Level Methods</a>
<ul class="wp-block-list">
<li><a href="#backuplist">account &gt; deployment &gt; backup &gt; list</a></li>



<li><a href="#backupcreate">account &gt; deployment &gt; backup &gt; create</a></li>



<li><a href="#backupdelete">account &gt; deployment &gt; backup &gt; delete</a></li>



<li><a href="#schedulelist">account &gt; deployment &gt; backup &gt; schedule &gt; list</a></li>



<li><a href="#schedulecreate">account &gt; deployment &gt; backup &gt; schedule &gt; create</a></li>



<li><a href="#scheduledelete">account &gt; deployment &gt; backup &gt; schedule &gt; delete</a></li>



<li><a href="#restorecreate">account &gt; deployment &gt; restore &gt; create</a></li>



<li><a href="#restorestatus">account &gt; deployment &gt; restore &gt; status</a></li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Related Pages:</p>



<ul class="wp-block-list">
<li><a href="/docs/searchstax-cloud-authentication-api/">Authentication API</a></li>



<li><a href="/docs/searchstax-cloud-users-api/">Users API</a></li>



<li><a href="/docs/searchstax-cloud-basic-auth-api/">Basic Auth API</a></li>



<li><a href="/docs/searchstax-cloud-ipfilter-api/">IP Filtering API</a></li>



<li><a href="/docs/searchstax-cloud-deployment-api/">Deployment API</a></li>



<li><a href="/docs/searchstax-cloud-private-vpc-api/">Private VPC API</a></li>



<li><a href="/docs/searchstax-cloud-dns-alias-api/">DNS Alias API</a></li>



<li><a href="/docs/searchstax-cloud-custom-jars-api/">Custom JARs API</a></li>



<li><a href="/docs/searchstax-cloud-tags-api/">Tags API</a></li>



<li><a href="/docs/searchstax-cloud-alerts-api/">Alerts API</a></li>



<li><a href="/docs/searchstax-cloud-webhooks-api/">Webhooks API</a></li>



<li><a href="/docs/searchstax-cloud-zookeeper-api/">Zookeeper API</a></li>
</ul>



<h2 class="wp-block-heading" id="h-account-level-methods">Account-Level Methods</h2>



<p class="wp-block-paragraph">Backup files do not disappear when you delete the associated  deployment. However, the deployment&#8217;s ssID (ss123456) becomes invalid, making it impossible to use the <a href="#deploymentmethods">deployment-level methods</a> to restore or delete the orphaned backup files. </p>



<p class="wp-block-paragraph">The following three methods let us list, restore, and delete orphaned backup files from the API.</p>



<h3 class="wp-block-heading" id="accountbackuplist">account &gt; backup &gt; list </h3>



<p class="wp-block-paragraph">This method lists all backups of an account, including deleted backup files.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>GET /api/rest/v2/account/&lt;account_name>/backup/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/backup/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request GET "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/backup/" 
  --header "Authorization: Token &lt;token>"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/backup/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountbackuplist.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"

$BACKUPS = Invoke-RestMethod -Method Get -ContentType 'application/json' -Headers $headers `
              -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/backup/"
$BACKUPS = $BACKUPS | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">              </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/backup/&quot;</span></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $BACKUPS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">A successful response contains a JSON object containing a list of backups:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>[
    {
      "id": 57198,
      "backup_type": "One time",
      "created": "2020-06-19 04:49:42 PM (2020-06-19 16:49:42 UTC)",
      "status": "Done",
      "size": 223608,
      "region": "US West (N. California)",
      "collections": null,
      "deployment_uid": "ss305854",
      "deployment_name": "QuickStart",
      "version": "8.3.1",
      "cloud": "aws",
      "size_display": "223.61 KB",
      "replication_region": "-",
      "error_message": []
    }
]
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">[</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">57198</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;backup_type&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;One time&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;created&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;2020-06-19 04:49:42 PM (2020-06-19 16:49:42 UTC)&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Done&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;size&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">223608</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;region&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;US West (N. California)&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;collections&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">null</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;deployment_uid&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss305854&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;deployment_name&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;QuickStart&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;version&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;8.3.1&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;cloud&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;aws&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;size_display&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;223.61 KB&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;replication_region&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;-&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;error_message&quot;</span><span style="color: #24292E">: []</span></span>
<span class="line"><span style="color: #24292E">    }</span></span>
<span class="line"><span style="color: #24292E">]</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="h-account-gt-backup-gt-delete">account &gt; backup &gt; delete</h3>



<p class="wp-block-paragraph">This method deletes a backup from a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>DELETE /api/rest/v2/account/&lt;account_name>/backup/&lt;buid>/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">DELETE</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/backup/&lt;buid&gt;/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;buid&gt;</strong> is the ID of the backup.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request DELETE "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/backup/&lt;buid>/" 
  --header "Authorization: Token &lt;token>"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">DELETE</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/backup/&lt;buid&gt;/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountbackupdelete.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$BUID = "27004"

$BACKUPS = Invoke-RestMethod -Method Delete -ContentType 'application/json' -Headers $headers `
              -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/backup/$BUID/"
$BACKUPS = $BACKUPS | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$BUID </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;27004&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Delete </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">              </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/backup/</span><span style="color: #24292E">$BUID</span><span style="color: #032F62">/&quot;</span></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $BACKUPS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">A successful response returns a 204 code and an empty string. </p>





<h3 class="wp-block-heading" id="h-account-gt-restore-gt-create">account &gt; restore &gt; create</h3>



<p class="wp-block-paragraph">This method restores an orphaned backup file to a deployment. For more versatile restore options, see <a href="#restorecreate">account &gt; deployment &gt; restore &gt; create</a>.</p>



<div class="alert alert-warning">
<h4>Parallel Restoration</h4>
<p>Note that restoring a backup takes all collections offline until the restore is complete. </p>
<p>The <strong>parallel_restore</strong> parameter reduces restore time by rebuilding each collection in a separate thread.</p>
<p>Downtime due to a restore is difficult to estimate, ranging from minutes to hours for very large backup files. Experience must be your guide.</p>
</div>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/restore/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/restore/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    id="27004"
    target_deployment_id="ss123456"
    parallel_restore="true"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">id=</span><span style="color: #005CC5">&quot;27004&quot;</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">target_deployment_id=</span><span style="color: #005CC5">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">parallel_restore=</span><span style="color: #005CC5">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped">
   <table>
      <thead>
         <tr>
            <th><strong>Parameter</strong></th>
            <th><strong>Description</strong></th>
            <th><strong>Example</strong></th>
         </tr>
      </thead>
       <tbody>
          <tr>
             <td><strong>id</strong><br>
                     <span style="color:#ff0000" class="has-inline-color">required</span><br>
                     string</td>
            <td>The backup id number, from the List Backups method.</td>
            <td>&#8220;27004&#8221;</td>
        </tr>
        <tr>
            <td><strong>target_deployment_uid</strong><br>
                    <span style="color:#32cd32" class="has-inline-color">optional</span><br>
                    string</td>
           <td>The target deployment ID number.</td>
           <td>&#8220;ss123456&#8221;</td>
        </tr>
        <tr>
            <td><strong>parallel_restore</strong><br>
                    <span style="color:#32cd32" class="has-inline-color">optional</span><br>
                    string</td>
           <td>Optional ability to restore collections in parallel (multiple threads). Default is &#8220;false.&#8221;</td>
           <td>&#8220;true&#8221;</td>
        </tr>        
     </tbody>
  </table>
</figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request POST "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/restore/" 
  --header "Content-Type: application/json" 
  --header "Authorization: Token &lt;token>" 
  --data '{"id":"27004","target_deployment_uid":"ss123456"}'
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/restore/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;{&quot;id&quot;:&quot;27004&quot;,&quot;target_deployment_uid&quot;:&quot;ss123456&quot;}&#39;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountrestorecreate.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"

$body = @{
    id='27004'
    target_deployment_uid='ss123456'
}

$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType 'application/json' -Headers $headers `
         -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/restore/" 
$RESULT = $RESULT | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    id</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;27004&#39;</span></span>
<span class="line"><span style="color: #24292E">    target_deployment_uid</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;ss123456&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/restore/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document confirming that the restore has been scheduled.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "message": "restore begun"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;restore begun&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h2 class="wp-block-heading" id="deploymentmethods">Deployment-Level Methods</h2>



<p class="wp-block-paragraph">The SearchStax Provisioning API includes methods for performing backup and restore operations. If the backup file has been &#8220;orphaned&#8221; by deleting the source deployment, use the <a href="#h-account-level-methods">account-level methods</a> instead. </p>



<h3 class="wp-block-heading" id="backuplist">account &gt; deployment &gt; backup &gt; list</h3>



<p class="wp-block-paragraph">This method lists the existing backups of a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>GET /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request GET "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/" 
  --header "Authorization: Token &lt;token>"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentbackuplist.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"

$BACKUPS = Invoke-RestMethod -Method Get -ContentType 'application/json' -Headers $headers `
              -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/backup/"
$BACKUPS = $BACKUPS | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">              </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/backup/&quot;</span></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $BACKUPS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">A successful response contains a JSON object containing a list of backups:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>[
    {
        "id":  2318045,
        "backup_type":  "scheduled",
        "created":  "2026-04-21T06:00:06Z",
        "status":  "done",
        "size":  2141854,
        "region":  "Amazon Web Services - us-west-2",
        "collections":  &#91;
                            "filmcollection"
                        &#93;
    },
        {
        "id":  2317534,
        "backup_type":  "onetime",
        "created":  "2026-04-20T17:05:01Z",
        "status":  "done",
        "size":  2141854,
        "region":  "Amazon Web Services - us-west-2",
        "collections":  &#91;

                        &#93;
    },
]
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">[</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">:  </span><span style="color: #005CC5">2318045</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;backup_type&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;scheduled&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;created&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;2026-04-21T06:00:06Z&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;done&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;size&quot;</span><span style="color: #24292E">:  </span><span style="color: #005CC5">2141854</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;region&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Amazon Web Services - us-west-2&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;collections&quot;</span><span style="color: #24292E">:  &#91;</span></span>
<span class="line"><span style="color: #24292E">                            </span><span style="color: #032F62">&quot;filmcollection&quot;</span></span>
<span class="line"><span style="color: #24292E">                        &#93;</span></span>
<span class="line"><span style="color: #24292E">    },</span></span>
<span class="line"><span style="color: #24292E">        {</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">:  </span><span style="color: #005CC5">2317534</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;backup_type&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;onetime&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;created&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;2026-04-20T17:05:01Z&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;done&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;size&quot;</span><span style="color: #24292E">:  </span><span style="color: #005CC5">2141854</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;region&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Amazon Web Services - us-west-2&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;collections&quot;</span><span style="color: #24292E">:  &#91;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">                        &#93;</span></span>
<span class="line"><span style="color: #24292E">    },</span></span>
<span class="line"><span style="color: #24292E">]</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">Note that the collections list is empty when all collections were backed up, but contains collection names when for a partial backup.</p>



<h3 class="wp-block-heading" id="backupcreate">account &gt; deployment &gt; backup &gt; create</h3>



<p class="wp-block-paragraph">This method makes a one-time backup of a deployment. </p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    region: "us-west-1",
    collections: "&#91;filmcollection&#93;"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">region</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;us-west-1&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">collections</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;&#91;filmcollection&#93;&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>region</strong><br><span style="color:#32cd32" class="has-inline-color">optional</span><br>string</td><td>The region ID of the region where the backup should be created. Defaults to the deployment&#8217;s region. Region codes can be obtained using the <a href="https://www.searchstax.com/docs/searchstax-cloud-deployment-api/#listplans">List Plans</a> method or from the deployment&#8217;s description in the SearchStax dashboard. </td><td>&#8220;us-west-2&#8221;</td></tr><tr><td><strong>collections</strong><br><span style="color:#34a300" class="has-inline-color"><meta charset="utf-8"><span style="color:#32cd32" class="has-inline-color">optional</span></span><br>list</td><td>List of collections to back up &#8211; [] to back up all collections</td><td>Bash: [&#8220;collection1&#8221;, &#8220;collection2&#8221;]<br><br>PowerShell: @(&#8216;collection1&#8217;, &#8216;collection2&#8217;)</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request POST "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/" 
  --header "Content-Type: application/json" 
  --header "Authorization: Token &lt;token>" 
  --data '{"region":"us-west-1","collection":"&#91;filmcollection&#93;"}'
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;{&quot;region&quot;:&quot;us-west-1&quot;,&quot;collection&quot;:&quot;&#91;filmcollection&#93;&quot;}&#39;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentbackupcreate.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"

$body = @{
    region='us-west-1'
    collections=@('filmcollection')
}

$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType 'application/json' -Headers $headers `
         -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/backup/" 
$RESULT = $RESULT | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    region</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;us-west-1&#39;</span></span>
<span class="line"><span style="color: #24292E">    collections</span><span style="color: #D73A49">=@</span><span style="color: #24292E">(</span><span style="color: #032F62">&#39;filmcollection&#39;</span><span style="color: #24292E">)</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/backup/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing the description of the new backup.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "id": 123456,
  "created": "2019-11-14T19:20:45.903037Z",
  "status": "pending",
  "size": 0,
  "region": "Amazon Web Services - us-west-1"
  "collections": &#91;
     "filmcollection"
     &#93;
}

</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">123456</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;created&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;2019-11-14T19:20:45.903037Z&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;pending&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;size&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">0</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;region&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Amazon Web Services - us-west-1&quot;</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #032F62">&quot;collections&quot;</span><span style="color: #B31D28; font-style: italic">:</span><span style="color: #24292E"> &#91;</span></span>
<span class="line"><span style="color: #24292E">     </span><span style="color: #032F62">&quot;filmcollection&quot;</span></span>
<span class="line"><span style="color: #24292E">     &#93;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="backupdelete">account &gt; deployment &gt; backup &gt; delete</h3>



<p class="wp-block-paragraph">This method deletes a backup from a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>DELETE /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/&lt;buid>/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">DELETE</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/&lt;buid&gt;/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, <strong>&lt;uid&gt;</strong> is the ID of the deployment, and <strong>&lt;buid&gt;</strong> is the ID of the backup.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request DELETE "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/&lt;buid>/" 
  --header "Authorization: Token &lt;token>"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">DELETE</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/&lt;buid&gt;/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentbackupdelete.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"
$BUID = "27004"

$BACKUPS = Invoke-RestMethod -Method Delete -ContentType 'application/json' -Headers $headers `
              -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/backup/$BUID/"
$BACKUPS = $BACKUPS | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">$BUID </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;27004&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Delete </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">              </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/backup/</span><span style="color: #24292E">$BUID</span><span style="color: #032F62">/&quot;</span></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $BACKUPS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">A successful response is a JSON document containing a confirmation message:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "message": "Successfully deleted backup 27004",
  "success": "true"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Successfully deleted backup 27004&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="schedulelist">account &gt; deployment &gt; backup &gt; schedule &gt; list</h3>



<p class="wp-block-paragraph">This method lists the existing backup schedules of a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>GET /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/schedule/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/schedule/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request GET "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/schedule/" 
  --header "Authorization: Token &lt;token>"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/schedule/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentbackupschedulelist.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"

$BACKUPS = Invoke-RestMethod -Method Get -ContentType 'application/json' -Headers $headers `
              -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/backup/schedule/"

$BACKUPS = $BACKUPS | ConvertTo-Json</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">              </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/backup/schedule/&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $BACKUPS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span></code></pre></div>



<p class="wp-block-paragraph">A successful response contains a JSON object containing a list of backups:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>[
  {
    "id": 1234,
    "days": &#91;
      "mon",
      "tue",
      "wed",
      "thu",
      "fri",
      "sat",
      "sun"
    &#93;,
    "time": "00:00:00",
    "retention": 1,
    "collections": []
  }
]</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">[</span></span>
<span class="line"><span style="color: #24292E">  {</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">1234</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;days&quot;</span><span style="color: #24292E">: &#91;</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;mon&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;tue&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;wed&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;thu&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;fri&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;sat&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;sun&quot;</span></span>
<span class="line"><span style="color: #24292E">    &#93;,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;time&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;00:00:00&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;retention&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">1</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;collections&quot;</span><span style="color: #24292E">: []</span></span>
<span class="line"><span style="color: #24292E">  }</span></span>
<span class="line"><span style="color: #24292E">]</span></span></code></pre></div>



<h3 class="wp-block-heading" id="schedulecreate">account &gt; deployment &gt; backup &gt; schedule &gt; create</h3>



<p class="wp-block-paragraph">This method creates a backup schedule for a deployment. </p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/schedule/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/schedule/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    "retention":  7,
    "days":  &#91;
                 "mon",
                 "wed",
                 "fri"
             &#93;,
    "region_id":  "us-west-1",
    "frequency":  6,
    "collections":  &#91;
                        "filmcollection"
                    &#93;,
    "time":  "07:00"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;retention&quot;</span><span style="color: #24292E">:  </span><span style="color: #005CC5">7</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;days&quot;</span><span style="color: #24292E">:  &#91;</span></span>
<span class="line"><span style="color: #24292E">                 </span><span style="color: #032F62">&quot;mon&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">                 </span><span style="color: #032F62">&quot;wed&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">                 </span><span style="color: #032F62">&quot;fri&quot;</span></span>
<span class="line"><span style="color: #24292E">             &#93;,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;region_id&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;us-west-1&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;frequency&quot;</span><span style="color: #24292E">:  </span><span style="color: #005CC5">6</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;collections&quot;</span><span style="color: #24292E">:  &#91;</span></span>
<span class="line"><span style="color: #24292E">                        </span><span style="color: #032F62">&quot;filmcollection&quot;</span></span>
<span class="line"><span style="color: #24292E">                    &#93;,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;time&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;07:00&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>time</strong><br><mark style="background-color:rgba(0, 0, 0, 0);color:#32cd32" class="has-inline-color">optional</mark><br>string</td><td>Time (UTC) the backup should run. (Format: HH:MM)<br>Either time or frequency must be provided. </td><td>&#8220;07:00&#8221;</td></tr><tr><td>days<br><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">required</mark> list<br></td><td>List of days on which backup should run relative to UTC time. </td><td>[&#8220;mon&#8221;, &#8220;tue&#8221;, &#8220;wed&#8221;, &#8220;thu&#8221;, &#8220;fri&#8221;, &#8220;sat&#8221;, &#8220;sun&#8221;]<br><br>[&#8220;everyday&#8221;]</td></tr><tr><td>retention<br><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">required</mark> number</td><td>Number of days to retain the backup.</td><td>7</td></tr><tr><td>frequency<br><mark style="background-color:rgba(0, 0, 0, 0);color:#32cd32" class="has-inline-color">optional</mark><br>number<br></td><td>At what interval (hours) the backups should run in the day.<br>Either time or frequency must be provided. </td><td>3</td></tr><tr><td><strong>region</strong>_id<br><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">required</mark> <br>string</td><td>The region ID of the region where the backup should be created. Defaults to the deployment&#8217;s region. <br>Region codes can be obtained using the <a href="https://www.searchstax.com/docs/searchstax-cloud-deployment-api/#listplans">List Plans</a> method or from the deployment&#8217;s description in the SearchStax dashboard. </td><td>&#8220;us-west-1&#8221;</td></tr><tr><td><strong>collections</strong><br><span style="color:#34a300" class="has-inline-color"><span style="color:#32cd32" class="has-inline-color">optional</span></span><br>list</td><td>List of collections to back up. Defaults to [] to back up all collections</td><td>Bash: [&#8220;collection1&#8221;, &#8220;collection2&#8221;]<br><br>PowerShell: @(&#8216;collection1&#8217;, &#8216;collection2&#8217;)</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request POST "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/schedule/" 
  --header "Content-Type: application/json" 
  --header "Authorization: Token &lt;token>" 
  --data '{"time":"08:30","collections":&#91;"filmcollection"&#93;,"days":&#91;"everyday"&#93;,"retention":"7","region_id":"us-west-1"}'
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/schedule/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;{&quot;time&quot;:&quot;08:30&quot;,&quot;collections&quot;:&#91;&quot;filmcollection&quot;&#93;,&quot;days&quot;:&#91;&quot;everyday&quot;&#93;,&quot;retention&quot;:&quot;7&quot;,&quot;region_id&quot;:&quot;us-west-1&quot;}&#39;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentbackupschedulecreate.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"

$body = @{
    days=@('mon', 'wed', 'fri')
    time='07:00'
    frequency=6
    retention=7
    region_id='us-west-1'
    collections=@('filmcollection')
}

$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType 'application/json' -Headers $headers `
         -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/backup/schedule/" 
$RESULT = $RESULT | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    days</span><span style="color: #D73A49">=@</span><span style="color: #24292E">(</span><span style="color: #032F62">&#39;mon&#39;</span><span style="color: #D73A49">,</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;wed&#39;</span><span style="color: #D73A49">,</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;fri&#39;</span><span style="color: #24292E">)</span></span>
<span class="line"><span style="color: #24292E">    time</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;07:00&#39;</span></span>
<span class="line"><span style="color: #24292E">    frequency</span><span style="color: #D73A49">=</span><span style="color: #005CC5">6</span></span>
<span class="line"><span style="color: #24292E">    retention</span><span style="color: #D73A49">=</span><span style="color: #005CC5">7</span></span>
<span class="line"><span style="color: #24292E">    region_id</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;us-west-1&#39;</span></span>
<span class="line"><span style="color: #24292E">    collections</span><span style="color: #D73A49">=@</span><span style="color: #24292E">(</span><span style="color: #032F62">&#39;filmcollection&#39;</span><span style="color: #24292E">)</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/backup/schedule/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document confirming success.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "message": "Backup Scheduled Successfully"
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Backup Scheduled Successfully&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span></code></pre></div>



<h3 class="wp-block-heading" id="scheduledelete">account &gt; deployment &gt; backup &gt; schedule &gt; delete</h3>



<p class="wp-block-paragraph">This method deletes a backup schedule from a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>DELETE /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/schedule/&lt;buid>/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">DELETE</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/schedule/&lt;buid&gt;/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, <strong>&lt;uid&gt;</strong> is the ID of the deployment, and <strong>&lt;buid&gt;</strong> is the ID of the backup.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request DELETE "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/backup/schedule/&lt;buid>/" 
  --header "Authorization: Token &lt;token>"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">DELETE</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/backup/schedule/&lt;buid&gt;/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentbackupscheduledelete.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"
$BUID = "27004"

$BACKUPS = Invoke-RestMethod -Method Delete -ContentType 'application/json' -Headers $headers `
              -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/backup/schedule/$BUID/"
$BACKUPS = $BACKUPS | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">$BUID </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;27004&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Delete </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">              </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/backup/schedule/</span><span style="color: #24292E">$BUID</span><span style="color: #032F62">/&quot;</span></span>
<span class="line"><span style="color: #24292E">$BACKUPS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $BACKUPS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">A successful response is a JSON document containing a confirmation message:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "success": "The backup schedule has been deleted!"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;The backup schedule has been deleted!&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading" id="restorecreate">account &gt; deployment &gt; restore &gt; create</h3>



<p class="wp-block-paragraph">This method restores a backup to a deployment. Optionally, it can restore one or more individual collections from a multi-collection backup. </p>



<div class="alert alert-warning">
<h4>Restoring Individual Collections</h4>
<p>This method can be used to restore one or more individual collections from a multi-collection backup to a multi-collection deployment. Note that restoring individual collections takes all collections offline until the restore is complete. </p>
<p>The <strong>parallel_restore</strong> parameter reduces restore time by rebuilding each collection in a separate thread.</p>
<p>Downtime due to a restore is difficult to estimate, ranging from minutes to hours for very large backup files. Experience must be your guide.</p>
</div>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/restore/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/restore/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    backup_id="27004"
    replication_factor="3"
    collection_name="quickstart"
    collections=&#91;"Col1", "Col2", "Col3"&#93;
    parallel_restore="true"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">backup_id=</span><span style="color: #005CC5">&quot;27004&quot;</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">replication_factor=</span><span style="color: #005CC5">&quot;3&quot;</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">collection_name=</span><span style="color: #005CC5">&quot;quickstart&quot;</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">collections=&#91;</span><span style="color: #005CC5">&quot;Col1&quot;</span><span style="color: #B31D28; font-style: italic">,</span><span style="color: #24292E"> </span><span style="color: #005CC5">&quot;Col2&quot;</span><span style="color: #B31D28; font-style: italic">,</span><span style="color: #24292E"> </span><span style="color: #005CC5">&quot;Col3&quot;</span><span style="color: #B31D28; font-style: italic">&#93;</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">parallel_restore=</span><span style="color: #005CC5">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped">
   <table>
      <thead>
         <tr>
            <th><strong>Parameter</strong></th>
            <th><strong>Description</strong></th>
            <th><strong>Example</strong></th>
         </tr>
      </thead>
       <tbody>
          <tr>
             <td><strong>backup_id</strong><br>
                     <span style="color:#ff0000" class="has-inline-color">required</span><br>
                     string</td>
            <td>The backup id number, from the List Backups method.</td>
            <td>&#8220;27004&#8221;</td>
        </tr>
        <tr>
            <td><strong>replication_factor</strong><br>
                    <span style="color:#32cd32" class="has-inline-color">optional</span><br>
                    string</td>
           <td>Defaults to the number of nodes in the target cluster. You may ask for fewer replicas, but not for more.</td>
           <td>&#8220;2&#8221;</td>
        </tr>
        <tr>
            <td><strong>collection_name</strong><br>
                    <span style="color:#32cd32" class="has-inline-color">optional</span><br>
                    string</td>
           <td>[Deprecated.] Optional name of a single collection to restore.</td>
           <td>&#8220;quickstart&#8221;</td>
        </tr>
        <tr>
            <td><strong>collections</strong><br>
                    <span style="color:#32cd32" class="has-inline-color">optional</span><br>
                    list</td>
           <td>[Preferred.] Optional list of collection names to restore.</td>
           <td>[&#8220;Col1&#8221;, &#8220;Col2&#8221;, &#8220;Col3&#8221;]</td>
        </tr>
        <tr>
            <td><strong>parallel_restore</strong><br>
                    <span style="color:#32cd32" class="has-inline-color">optional</span><br>
                    string</td>
           <td>Optional ability to restore collections in parallel (multiple threads). Default is &#8220;false.&#8221;</td>
           <td>&#8220;true&#8221;</td>
        </tr>
     </tbody>
  </table>
</figure>



<p class="wp-block-paragraph">If <strong>collection_name</strong> and <strong>collections</strong> are both present, the method will restore all of the listed collections. </p>



<p class="wp-block-paragraph">If <strong>collection_name</strong> and <strong>collections</strong> are both absent<strong>, </strong>the method will restore all the collections in the backup file, overwriting all previous data on the deployment.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request POST "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/restore/" 
  --header "Content-Type: application/json" 
  --header "Authorization: Token &lt;Token>" 
  --data '{"backup_id":"12345678","collections":&#91;"collection1","collection3"&#93;}'
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/restore/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;Token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;{&quot;backup_id&quot;:&quot;12345678&quot;,&quot;collections&quot;:&#91;&quot;collection1&quot;,&quot;collection3&quot;&#93;}&#39;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentrestorecreate.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"

$list = @("collection1","collection3")

$body = @{
    backup_id='12345678'
    collections=$list
}

$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType 'application/json' -Headers $headers `
         -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/restore/" 
$RESULT = $RESULT | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$list </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">(</span><span style="color: #032F62">&quot;collection1&quot;</span><span style="color: #D73A49">,</span><span style="color: #032F62">&quot;collection3&quot;</span><span style="color: #24292E">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    backup_id</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;12345678&#39;</span></span>
<span class="line"><span style="color: #24292E">    collections</span><span style="color: #D73A49">=</span><span style="color: #24292E">$list</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/restore/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document confirming that the restore has been scheduled.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "message": "The restore request has been successfully placed in the Task queue and will be initiated soon. You can check the status with the restore-status API"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;The restore request has been successfully placed in the Task queue and will be initiated soon. You can check the status with the restore-status API&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When performing a partial restore, SearchStax will overwrite the restored collections while preserving any others that are present.  </p>



<h3 class="wp-block-heading" id="restorestatus">account &gt; deployment &gt; restore &gt; status</h3>



<p class="wp-block-paragraph">This method reports on the status of a restore.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/restore/status/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/restore/status/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request POST "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/restore/status/" 
  --header "Authorization: Token &lt;token>"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/restore/status/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentrestorestatus.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"

$RESULTS = Invoke-RestMethod -Method Post -ContentType 'application/json' -Headers $headers `
              -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/restore/status/"
$RESULTS = $RESULTS | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">              </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/restore/status/&quot;</span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON object containing an appropriate message string:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "message": "Backup Restore in Progress"
}

{
  "message": "No restore Running on this deployment"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Backup Restore in Progress&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;No restore Running on this deployment&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p class="wp-block-paragraph">Do not hesitate to contact the <a href="mailto:support@searchstax.com?subject=SearchStax%20Cloud%20API%20–%20Backup%2FRestore" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-backup-restore-api/">Solr Backup/Restore API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchstax.com/docs/searchstax-cloud-backup-restore-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Solr Tags API</title>
		<link>https://www.searchstax.com/docs/searchstax-cloud-tags-api/</link>
					<comments>https://www.searchstax.com/docs/searchstax-cloud-tags-api/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 07:41:46 +0000</pubDate>
				<category><![CDATA[Operations and Recovery APIs]]></category>
		<category><![CDATA[Cloud]]></category>
		<guid isPermaLink="false">https://www.searchstax.com/docs/?p=7590</guid>

					<description><![CDATA[<p>Provisioning API &#8211; Tags Overview The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr Cloud deployments. Core and Enterprise Clients Only! The&#8230; <a class="more-link" href="https://www.searchstax.com/docs/searchstax-cloud-tags-api/">Continue reading <span class="screen-reader-text">Solr Tags API</span></a></p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-tags-api/">Solr Tags API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="h-provisioning-api-tags">Provisioning API &#8211; Tags</h1>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">Overview</h2>



<p class="wp-block-paragraph">The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr Cloud deployments.</p>



<div class="alert alert-info">
<h3>Core and Enterprise Clients Only!</h3>
<p>The SearchStax API suite is available to our Core and Enterprise
clients only, as noted on our <a href="https://www.searchstax.com/pricing/cloud/">Pricing</a> page. </p>
</div>



<p class="wp-block-paragraph">This page describes how to add and manage tags using API methods.</p>



<p class="wp-block-paragraph">The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python <a href="https://pypi.org/project/coreapi/" target="_blank" rel="noreferrer noopener">coreapi</a> package, the <a href="https://www.postman.com/" target="_blank" rel="noreferrer noopener">Postman</a> tool, and <a href="https://curl.se" target="_blank" rel="noreferrer noopener">cURL</a>. For Windows, use <a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.1" target="_blank" rel="noreferrer noopener">PowerShell 7+</a>.</p>



<div class="alert alert-warning">
<h3>Account Owner, Admin, or Technical Contact</h3>
<p>To run the SearchStax Provisioning API, you must be the account Owner,
an account Admin, or a Technical Contact. See <a href="/docs/searchstax-cloud-user-roles/#userroles">SearchStax User Roles</a>.</p>
</div>



<p class="wp-block-paragraph">Symbols enclosed in carets (&lt; and &gt;) such as <strong>&lt;username&gt;</strong> are metavariables. Substitute your local values when you encounter them in the examples.</p>



<p class="wp-block-paragraph">Contents:</p>



<ul class="wp-block-list">
<li><a href="#tags">Tags</a>
<ul class="wp-block-list">
<li><a href="#creattag">account &gt; deployment &gt; tags &gt; create</a></li>



<li><a href="#deletetag">account &gt; deployment &gt; tags &gt; delete</a></li>



<li><a href="#listtags">account &gt; deployment &gt; tags &gt; list</a></li>



<li><a href="#getbytag">account &gt; deployment &gt; tags &gt; get_deployments</a></li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Related Pages:</p>



<ul class="wp-block-list">
<li><a href="/docs/searchstax-cloud-authentication-api/">Authentication API</a></li>



<li><a href="/docs/searchstax-cloud-users-api/">Users API</a></li>



<li><a href="/docs/searchstax-cloud-basic-auth-api/">Basic Auth API</a></li>



<li><a href="/docs/searchstax-cloud-ipfilter-api/">IP Filtering API</a></li>



<li><a href="/docs/searchstax-cloud-deployment-api/">Deployment API</a></li>



<li><a href="/docs/searchstax-cloud-private-vpc-api/">Private VPC API</a></li>



<li><a href="/docs/searchstax-cloud-dns-alias-api/">DNS Alias API</a></li>



<li><a href="/docs/searchstax-cloud-backup-restore-api/">Backup/Restore API</a></li>



<li><a href="/docs/searchstax-cloud-custom-jars-api/">Custom JARs API</a></li>



<li><a href="/docs/searchstax-cloud-alerts-api/">Alerts API</a></li>



<li><a href="/docs/searchstax-cloud-webhooks-api/">Webhooks API</a></li>



<li><a href="/docs/searchstax-cloud-zookeeper-api/">Zookeeper API</a></li>
</ul>



<h2 class="wp-block-heading" id="tags">Tags</h2>



<h3 class="wp-block-heading" id="creattag">account &gt; deployment &gt; tags &gt; create</h3>



<p class="wp-block-paragraph">This method adds one or more tags to a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/tags/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/tags/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    "tags": &#91;"demo","test"&#93;
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;tags&quot;</span><span style="color: #24292E">: &#91;</span><span style="color: #032F62">&quot;demo&quot;</span><span style="color: #24292E">,</span><span style="color: #032F62">&quot;test&quot;</span><span style="color: #24292E">&#93;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>tags</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>list of strings</td><td>A list of tags to add to the deployment.</td><td>[&#8220;demo&#8221;, &#8220;test&#8221;]</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request POST "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/tags/" \
  --header "Content-Type: application/json" \
  --header "Authorization: Token &lt;token>" \
  --data "{
    \"tags\": &#91;\"demo\",\"test\"&#93;
}"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/tags/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">tags</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">: &#91;</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">demo</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">,</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">test</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">&#93;</span></span>
<span class="line"><span style="color: #032F62">}&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymenttagscreate.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$body = @{
    tags=&#8217;demo&#8217;,&#8217;test&#8217;
}
$body = $body | ConvertTo-Json
$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/tags/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    tags</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;demo&#39;</span><span style="color: #D73A49">,</span><span style="color: #032F62">&#39;test&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/tags/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a list of JSON documents containing the deployment UID and the deployment&#8217;s current set of tags.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;deployment&#8221;: &#8220;ss123456&#8221;,
  &#8220;tags&#8221;: [
    &#8220;test&#8221;,
    &#8220;demo&#8221;
  ]
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;tags&quot;</span><span style="color: #24292E">: [</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #032F62">&quot;test&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #032F62">&quot;demo&quot;</span></span>
<span class="line"><span style="color: #24292E">  ]</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">An invalid UID will throw a <strong>404 &#8211; Not Found</strong> error.</p>



<h3 class="wp-block-heading" id="deletetag">account &gt; deployment &gt; tags &gt; delete</h3>



<p class="wp-block-paragraph">This method deletes one or more tags from a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/tags/delete/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/tags/delete/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;tags&#8221;:[&#8220;test&#8221;]
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;tags&quot;</span><span style="color: #24292E">:[</span><span style="color: #032F62">&quot;test&quot;</span><span style="color: #24292E">]</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>tags</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>list of strings</td><td>A list of tags to delete.</td><td>[&#8220;test&#8221;]</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/tags/delete/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data &#8220;{
    \&#8221;tags\&#8221;:[\&#8221;test\&#8221;]
}&#8221;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/tags/delete/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">tags</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">:[</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">test</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">]</span></span>
<span class="line"><span style="color: #032F62">}&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymenttagsdelete.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$body = @{
    tags=&#8217;test&#8217;
}
$body = $body | ConvertTo-Json
$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/tags/delete/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    tags</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;test&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/tags/delete/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a list of JSON documents identifying the deployment and its current set of tags:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;deployment&#8221;: &#8220;ss123456&#8221;,
  &#8220;tags&#8221;: []
} 
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;tags&quot;</span><span style="color: #24292E">: []</span></span>
<span class="line"><span style="color: #24292E">} </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">An invalid UID will throw a <strong>404 &#8211; Not Found</strong> error.</p>



<h3 class="wp-block-heading" id="listtags">account &gt; deployment &gt; tags &gt; list</h3>



<p class="wp-block-paragraph">This method list a deployment&#8217;s current set of tags.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; auto-links: false; title: ; quick-code: false; notranslate">
GET https://app.searchstax.com/api/rest/v2/account/&amp;lt;account_name&gt;/deployment/&amp;lt;uid&gt;/tags/

</pre></div>


<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/tags/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/tags/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymenttagslist.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$RESULT = Invoke-RestMethod -Method Get -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/tags/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/tags/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a list of JSON documents identifying the deployment and its current set of tags:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;deployment&#8221;: &#8220;ss123456&#8221;,
  &#8220;tags&#8221;: [
    &#8220;test&#8221;,
    &#8220;demo&#8221;
  ]
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;tags&quot;</span><span style="color: #24292E">: [</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #032F62">&quot;test&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #032F62">&quot;demo&quot;</span></span>
<span class="line"><span style="color: #24292E">  ]</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="getbytag">account &gt; deployment &gt; tags &gt; get_deployments</h3>



<p class="wp-block-paragraph">This method retrieves all of the deployments that have a specific tag.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/tags/get-deployments/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/tags/get-deployments/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;tags&#8221;:[&#8220;test&#8221;,&#8221;demo&#8221;],
    &#8220;operator&#8221;:&#8221;OR&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;tags&quot;</span><span style="color: #24292E">:[</span><span style="color: #032F62">&quot;test&quot;</span><span style="color: #24292E">,</span><span style="color: #032F62">&quot;demo&quot;</span><span style="color: #24292E">],</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;operator&quot;</span><span style="color: #24292E">:</span><span style="color: #032F62">&quot;OR&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>tags</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>list of strings</td><td>A list of tags to match.</td><td>[&#8220;demo&#8221;, &#8220;test&#8221;]</td></tr><tr><td><strong>operator</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>Operator to apply to the matches.</td><td>&#8220;AND&#8221;/&#8221;OR&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/tags/get-deployments/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data &#8220;{
    \&#8221;tags\&#8221;:[\&#8221;test\&#8221;,\&#8221;demo\&#8221;],
    \&#8221;operator\&#8221;:\&#8221;OR\&#8221;
}&#8221;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/tags/get-deployments/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">tags</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">:[</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">test</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">,</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">demo</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">],</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">operator</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">:</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">OR</span><span style="color: #005CC5">\&quot;</span></span>
<span class="line"><span style="color: #032F62">}&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymenttagsgetdeployments.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$body = @{
    tags=&#8217;demo&#8217;,&#8217;test&#8217;
    operator=&#8217;OR&#8217;
}
$body = $body | ConvertTo-Json
$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/tags/get-deployments/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    tags</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;demo&#39;</span><span style="color: #D73A49">,</span><span style="color: #032F62">&#39;test&#39;</span></span>
<span class="line"><span style="color: #24292E">    operator</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;OR&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/tags/get-deployments/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a list of JSON objects pairing tag matches with specific deployment UIDs.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>[
  {
    "tags": &#91;
      "demo"
    &#93;,
    "deployment": "ss123456"
  },
  {
    "tags": &#91;
      "test",
      "demo"
    &#93;,
    "deployment": "ss123456"
  }
]
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">[</span></span>
<span class="line"><span style="color: #24292E">  {</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;tags&quot;</span><span style="color: #24292E">: &#91;</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;demo&quot;</span></span>
<span class="line"><span style="color: #24292E">    &#93;,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">  },</span></span>
<span class="line"><span style="color: #24292E">  {</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;tags&quot;</span><span style="color: #24292E">: &#91;</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;test&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;demo&quot;</span></span>
<span class="line"><span style="color: #24292E">    &#93;,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">  }</span></span>
<span class="line"><span style="color: #24292E">]</span></span>
<span class="line"></span></code></pre></div>



<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p class="wp-block-paragraph">Do not hesitate to contact the <a href="mailto:support@searchstax.com?subject=SearchStax%20Cloud%20API%20–%20Tags" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-tags-api/">Solr Tags API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchstax.com/docs/searchstax-cloud-tags-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Solr Alerts API</title>
		<link>https://www.searchstax.com/docs/searchstax-cloud-alerts-api/</link>
					<comments>https://www.searchstax.com/docs/searchstax-cloud-alerts-api/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 07:25:39 +0000</pubDate>
				<category><![CDATA[Operations and Recovery APIs]]></category>
		<category><![CDATA[Cloud]]></category>
		<guid isPermaLink="false">https://www.searchstax.com/docs/?p=7575</guid>

					<description><![CDATA[<p>Provisioning API &#8211; Alerts Overview The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr Cloud deployments. Core and Enterprise Clients Only! The&#8230; <a class="more-link" href="https://www.searchstax.com/docs/searchstax-cloud-alerts-api/">Continue reading <span class="screen-reader-text">Solr Alerts API</span></a></p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-alerts-api/">Solr Alerts API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="h-provisioning-api-alerts">Provisioning API &#8211; Alerts</h1>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">Overview</h2>



<p class="wp-block-paragraph">The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr Cloud deployments.</p>



<div class="alert alert-info">
<h3>Core and Enterprise Clients Only!</h3>
<p>The SearchStax API suite is available to our Core and Enterprise
clients only, as noted on our <a href="https://www.searchstax.com/pricing/cloud/">Pricing</a> page. </p>
</div>



<p class="wp-block-paragraph">This page describes how to set up and manage alerts through API methods.</p>



<p class="wp-block-paragraph">The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python <a href="https://pypi.org/project/coreapi/" target="_blank" rel="noreferrer noopener">coreapi</a> package, the <a href="https://www.postman.com/" target="_blank" rel="noreferrer noopener">Postman</a> tool, and <a href="https://curl.se/" target="_blank" rel="noreferrer noopener">cURL</a>. For Windows, use <a href="https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.2&amp;viewFallbackFrom=powershell-7.1" target="_blank" rel="noreferrer noopener">PowerShell 7+</a>.</p>



<div class="alert alert-warning">
<h3>Account Owner, Admin, or Technical Contact</h3>
<p>To run the SearchStax Provisioning API, you must be the account Owner, an account Admin, or a Technical Contact. See <a href="../userroles/#userroles">SearchStax User Roles</a>.</p>
</div>



<p class="wp-block-paragraph">Symbols enclosed in carets (&lt; and &gt;) such as <strong>&lt;username&gt;</strong> are metavariables. Substitute your local values when you encounter them in the examples.</p>



<p class="wp-block-paragraph">Contents:</p>



<ul class="wp-block-list">
<li><a href="#alerts">Alerts</a>
<ul class="wp-block-list">
<li><a href="#alertsmetrics">account &gt; alerts &gt; metrics</a></li>



<li><a href="#incidents">account &gt; deployment &gt; incidents</a></li>



<li><a href="#deploymentalertsread">account &gt; deployment &gt; alerts &gt; read</a></li>



<li><a href="#deploymentalertcreate">account &gt; deployment &gt; alerts &gt; create</a></li>



<li><a href="#deploymentalertupdate">account &gt; deployment &gt; alerts &gt; update</a></li>



<li><a href="#deploymentsalertdelete">account &gt; deployment &gt; alerts &gt; delete</a></li>



<li><a href="#heartbeatlist">account &gt; deployment &gt; alerts &gt; heartbeat &gt; list</a></li>



<li><a href="#heartbeatcreate">account &gt; deployment &gt; alerts &gt; heartbeat &gt; create</a></li>



<li><a href="#heartbeatread">account &gt; deployment &gt; alerts &gt; heartbeat &gt; read</a></li>



<li><a href="#heartbeatupdate">account &gt; deployment &gt; alerts &gt; heartbeat &gt; update</a></li>



<li><a href="#heartbeatdelete">account &gt; deployment &gt; alerts &gt; heartbeat &gt; delete</a></li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Related Pages:</p>



<ul class="wp-block-list">
<li><a href="/docs/searchstax-cloud-authentication-api/">Authentication API</a></li>



<li><a href="/docs/searchstax-cloud-users-api/">Users API</a></li>



<li><a href="/docs/searchstax-cloud-basic-auth-api/">Basic Auth API</a></li>



<li><a href="/docs/searchstax-cloud-ipfilter-api/">IP Filtering API</a></li>



<li><a href="/docs/searchstax-cloud-deployment-api/">Deployment API</a></li>



<li><a href="/docs/searchstax-cloud-private-vpc-api/">Private VPC API</a></li>



<li><a href="/docs/searchstax-cloud-dns-alias-api/">DNS Alias API</a></li>



<li><a href="/docs/searchstax-cloud-backup-restore-api/">Backup/Restore API</a></li>



<li><a href="/docs/searchstax-cloud-custom-jars-api/">Custom JARs API</a></li>



<li><a href="/docs/searchstax-cloud-tags-api/">Tags API</a></li>



<li><a href="/docs/searchstax-cloud-webhooks-api/">Webhooks API</a></li>



<li><a href="/docs/searchstax-cloud-zookeeper-api/">Zookeeper API</a></li>
</ul>



<h2 class="wp-block-heading" id="alerts">Alerts</h2>



<p class="wp-block-paragraph">The Provisioning API provides methods for remotely managing <a href="/docs/searchstax-cloud-email-alerts/">alerts and incidents</a>.</p>



<h3 class="wp-block-heading" id="alertsmetrics">account &gt; alerts &gt; metrics</h3>



<p class="wp-block-paragraph">This method generates a list of the metrics that are available for setting alerts.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/alerts/metrics/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/alerts/metrics/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/alerts/metrics/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; 
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/alerts/metrics/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountalertsmetrics.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;

$RESULTS = Invoke-RestMethod -Method Get -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/alerts/metrics/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json | Out-File C:\metrics.txt
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/alerts/metrics/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span><span style="color: #24292E"> </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">Out-File</span><span style="color: #24292E"> C:\metrics.txt</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a list of JSON objects describing individual metrics.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>[
    {
        &#8220;name&#8221;:  &#8220;system_cpu_usage&#8221;,
        &#8220;unit&#8221;:  [
                     &#8220;percentage&#8221;
                 ],
        &#8220;description&#8221;:  &#8220;Metrics for CPU usage in percentage.&#8221;
    },
    {
        &#8220;name&#8221;:  &#8220;system_disk_space_used&#8221;,
        &#8220;unit&#8221;:  [
                     &#8220;KB&#8221;,
                     &#8220;MB&#8221;,
                     &#8220;GB&#8221;
                 ],
        &#8220;description&#8221;:  &#8220;Used disk space on this device.&#8221;
    },
    {
        &#8220;name&#8221;:  &#8220;system_disk_space_free&#8221;,
        &#8220;unit&#8221;:  [
                     &#8220;KB&#8221;,
                     &#8220;MB&#8221;,
                     &#8220;GB&#8221;
                 ],
        &#8220;description&#8221;:  &#8220;Free Disk space left on the device.&#8221;
    },
    {
        &#8220;name&#8221;:  &#8220;search_timeouts&#8221;,
        &#8220;unit&#8221;:  [
                     &#8220;number&#8221;
                 ],
        &#8220;description&#8221;:  &#8220;Timeouts reported while performing a search in Solr.&#8221;
    }
]
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">[</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;system_cpu_usage&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;unit&quot;</span><span style="color: #24292E">:  [</span></span>
<span class="line"><span style="color: #24292E">                     </span><span style="color: #032F62">&quot;percentage&quot;</span></span>
<span class="line"><span style="color: #24292E">                 ],</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;description&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Metrics for CPU usage in percentage.&quot;</span></span>
<span class="line"><span style="color: #24292E">    },</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;system_disk_space_used&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;unit&quot;</span><span style="color: #24292E">:  [</span></span>
<span class="line"><span style="color: #24292E">                     </span><span style="color: #032F62">&quot;KB&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">                     </span><span style="color: #032F62">&quot;MB&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">                     </span><span style="color: #032F62">&quot;GB&quot;</span></span>
<span class="line"><span style="color: #24292E">                 ],</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;description&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Used disk space on this device.&quot;</span></span>
<span class="line"><span style="color: #24292E">    },</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;system_disk_space_free&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;unit&quot;</span><span style="color: #24292E">:  [</span></span>
<span class="line"><span style="color: #24292E">                     </span><span style="color: #032F62">&quot;KB&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">                     </span><span style="color: #032F62">&quot;MB&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">                     </span><span style="color: #032F62">&quot;GB&quot;</span></span>
<span class="line"><span style="color: #24292E">                 ],</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;description&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Free Disk space left on the device.&quot;</span></span>
<span class="line"><span style="color: #24292E">    },</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;search_timeouts&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;unit&quot;</span><span style="color: #24292E">:  [</span></span>
<span class="line"><span style="color: #24292E">                     </span><span style="color: #032F62">&quot;number&quot;</span></span>
<span class="line"><span style="color: #24292E">                 ],</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;description&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Timeouts reported while performing a search in Solr.&quot;</span></span>
<span class="line"><span style="color: #24292E">    }</span></span>
<span class="line"><span style="color: #24292E">]</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="incidents">account &gt; deployment &gt; incidents</h3>



<p class="wp-block-paragraph">This method lists the incidents for a deployment. (Incidents are created by alerts.)</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET https://app.searchstax.com/api/rest/v2/account/{account_name}/deployment/{uid}/incidents/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/{account_name}/deployment/{uid}/incidents/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/incidents/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; 
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/incidents/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentincidents.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;

$RESULTS = Invoke-RestMethod -Method Get -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/incidents/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/incidents/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON object containing a list of individual incidents. <strong>Name</strong> is the name of the alert that created the incident.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;incidents&#8221;: [
    {
      &#8220;status&#8221;: &#8220;close&#8221;,
      &#8220;name&#8221;: &#8220;ZK-1 heartbeat&#8221;,
      &#8220;timestamp&#8221;: &#8220;2019-05-23T16:42:24Z&#8221;,
      &#8220;resolution_time&#8221;: &#8220;2019-05-23T17:00:28Z&#8221;,
      &#8220;alert_id&#8221;: 4823,
      &#8220;condition&#8221;: &#8220;Heartbeat: DOWN&#8221;
    }
  ],
  &#8220;deployment&#8221;: &#8220;ss123456&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;incidents&quot;</span><span style="color: #24292E">: [</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;close&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ZK-1 heartbeat&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;timestamp&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;2019-05-23T16:42:24Z&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;resolution_time&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;2019-05-23T17:00:28Z&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;alert_id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">4823</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;condition&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Heartbeat: DOWN&quot;</span></span>
<span class="line"><span style="color: #24292E">    }</span></span>
<span class="line"><span style="color: #24292E">  ],</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="deploymentalertsread">account &gt; deployment &gt; alerts &gt; read</h3>



<p class="wp-block-paragraph">This method lists the threshold alerts for a deployment. (Alerts are threshold triggers that create incidents.)</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET https://app.searchstax.com/api/rest/v2/account/{account_name}/deployment/{uid}/alerts/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/{account_name}/deployment/{uid}/alerts/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; 
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentalertsread.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;

$RESULTS = Invoke-RestMethod -Method Get -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/alerts/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/alerts/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON object containing a list of alerts and their properties.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;alerts&#8221;: [
    {
      &#8220;status&#8221;: &#8220;enabled&#8221;,
      &#8220;metric&#8221;: &#8220;system_cpu_usage&#8221;,
      &#8220;max_alerts&#8221;: 1,
      &#8220;threshold&#8221;: 80.0,
      &#8220;host&#8221;: &#8220;ss123456-4&#8221;,
      &#8220;delay_mins&#8221;: 1,
      &#8220;operator&#8221;: &#8220;>&#8221;,
      &#8220;id&#8221;: 2426,
      &#8220;unit&#8221;: &#8220;percentage&#8221;,
      &#8220;name&#8221;: &#8220;High Solr CPU Usage&#8221;,
      &#8220;repeat_every&#8221;: 1,
      &#8220;email&#8221;: &#8220;user@company.com&#8221;
    }
  ],
  &#8220;deployment&#8221;: &#8220;ss123456&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;alerts&quot;</span><span style="color: #24292E">: [</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;enabled&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;metric&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;system_cpu_usage&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;max_alerts&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">1</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;threshold&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">80.0</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;host&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456-4&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;delay_mins&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">1</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;operator&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;&gt;&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">2426</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;unit&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;percentage&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;High Solr CPU Usage&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;repeat_every&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">1</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;email&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;user@company.com&quot;</span></span>
<span class="line"><span style="color: #24292E">    }</span></span>
<span class="line"><span style="color: #24292E">  ],</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="deploymentalertcreate">account &gt; deployment &gt; alerts &gt; create</h3>



<p class="wp-block-paragraph">This method creates a new alert in a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/{account_name}/deployment/{uid}/alerts/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/{account_name}/deployment/{uid}/alerts/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;email&#8221;:  [
                  &#8220;user@company.com&#8221;
              ],
    &#8220;webhook_trigger&#8221;: 2,
    &#8220;webhook_resolve&#8221;: 5,
    &#8220;max_alerts&#8221;:  &#8220;2&#8221;,
    &#8220;metric&#8221;:  &#8220;system_cpu_usage&#8221;,
    &#8220;delay_mins&#8221;:  &#8220;1&#8221;,
    &#8220;name&#8221;:  &#8220;high cpu load&#8221;,
    &#8220;threshold&#8221;:  &#8220;90&#8221;,
    &#8220;operator&#8221;:  &#8220;>&#8221;,
    &#8220;repeat_every&#8221;:  &#8220;5&#8221;,
    &#8220;host&#8221;:  &#8220;*&#8221;,
    &#8220;unit&#8221;:  &#8220;percentage&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;email&quot;</span><span style="color: #24292E">:  [</span></span>
<span class="line"><span style="color: #24292E">                  </span><span style="color: #032F62">&quot;user@company.com&quot;</span></span>
<span class="line"><span style="color: #24292E">              ],</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;webhook_trigger&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">2</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;webhook_resolve&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">5</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;max_alerts&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;2&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;metric&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;system_cpu_usage&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;delay_mins&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;1&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;high cpu load&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;threshold&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;90&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;operator&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;&gt;&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;repeat_every&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;5&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;host&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;*&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;unit&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;percentage&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>


<figure class="wp-block-table table table-bordered table-striped">
<table>
<thead>
<tr>
<th><strong>Parameter</strong></th>
<th><strong>Description</strong></th>
<th><strong>Example</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>name</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>Name of the alert.</td>
<td>&#8220;high cpu load&#8221;</td>
</tr>
<tr>
<td><strong>metric</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>The metric you wish to monitor. For available metrics, check the <a href="/docs/searchstax-cloud-alerts-api/#alertsmetrics">Account Alerts Metrics</a> method.</td>
<td>&#8220;system_cpu_usage&#8221;</td>
</tr>
<tr>
<td><strong>threshold</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>Alert triggers when it sees <strong>threshold</strong> events within <strong>delay_mins</strong> minutes.</td>
<td>&#8220;90&#8221;</td>
</tr>
<tr>
<td><strong>unit</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>One of number/percentage/KB/MB/GB</td>
<td>percentage</td>
</tr>
<tr>
<td><strong>operator</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>One of &lt;,&gt;,&gt;=,&lt;=,=</td>
<td>&#8220;&gt;&#8221;</td>
</tr>
<tr>
<td><strong>email</strong><br /><span class="has-inline-color" style="color: #32cd32;">optional</span><br />list of strings</td>
<td>List of email addresses. Either an email or <em>both</em> webhook parameters are required.</td>
<td>[&#8220;user@company.com&#8221;]</td>
</tr>
<tr>
<td><strong>webhook_trigger</strong><br /><span class="has-inline-color" style="color: #32cd32;">optional</span><br />integer</td>
<td>The ID of the webhook to call when the alert is triggered. Either an email or <em>both</em> webhook parameters are required.</td>
<td>88</td>
</tr>
<tr>
<td><strong>webhook_resolve</strong><br /><span class="has-inline-color" style="color: #32cd32;">optional</span><br />integer</td>
<td>The ID of the webhook to call when the alert is resolved. Either an email or <em>both</em> webhook parameters are required.</td>
<td>99</td>
</tr>
<tr>
<td><strong>host</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>Name of the server. Use * to create alerts for all hosts in the cluster. For the <strong>Total Requests</strong> metric, use the UID of the load balancer.</td>
<td>&#8220;ss123456-1&#8221;<br />&#8220;*&#8221;<br />&#8220;ss123456-lb&#8221;</td>
</tr>
<tr>
<td><strong>delay_mins</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>Alert triggers when it sees <strong>threshold</strong> events within <strong>delay_mins</strong> minutes.</td>
<td>&#8220;5&#8221;</td>
</tr>
<tr>
<td><strong>max_alerts</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>Maximum number of alerts for this metric.</td>
<td>&#8220;2&#8221;</td>
</tr>
<tr>
<td><strong>repeat_every</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>Time interval in mins after which the alert should reset.</td>
<td>&#8220;10&#8221;</td>
</tr>
</tbody>
</table>
</figure>


<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data {
    \&#8221;email\&#8221;: [ \&#8221;user@company.com\&#8221; ],
    \&#8221;max_alerts\&#8221;:  \&#8221;2\&#8221;,
    \&#8221;metric\&#8221;:  \&#8221;system_cpu_usage\&#8221;,
    \&#8221;delay_mins\&#8221;:  \&#8221;1\&#8221;,
    \&#8221;name\&#8221;:  \&#8221;high cpu load\&#8221;,
    \&#8221;threshold\&#8221;:  \&#8221;90\&#8221;,
    \&#8221;operator\&#8221;:  \&#8221;>\&#8221;,
    \&#8221;repeat_every\&#8221;:  \&#8221;5\&#8221;,
    \&#8221;host\&#8221;:  \&#8221;*\&#8221;,
    \&#8221;unit\&#8221;:  \&#8221;percentage\&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #6F42C1">\</span><span style="color: #6F42C1">&quot;email</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">: [ </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">user@company.com</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1"> ],</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">max_alerts</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">2</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">metric</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">system_cpu_usage</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">delay_mins</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">1</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">name</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">high cpu load</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">threshold</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">90</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">operator</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">&gt;</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">repeat_every</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">5</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">host</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">*</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">unit</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">percentage</span><span style="color: #005CC5">\&quot;</span></span>
<span class="line"><span style="color: #6F42C1">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentalertscreate.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;

$body = @{
    name=&#8217;High Disk Usage&#8217;
    metric=&#8217;system_disk_space_used&#8217;
    threshold=&#8217;50&#8217;
    unit=&#8217;GB&#8217;
    operator=&#8217;>&#8217;
    host=&#8217;*&#8217;
    delay_mins=&#8217;1&#8242;
    max_alerts=&#8217;2&#8242;
    repeat_every=&#8217;5&#8242;
    email=@(&#8216;user@company.com&#8217;)
    webhook_trigger=2
    webhook_resolve=5
}

$body = $body | ConvertTo-Json

$RESULTS = Invoke-RestMethod -Method Post -Body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/alerts/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    name</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;High Disk Usage&#39;</span></span>
<span class="line"><span style="color: #24292E">    metric</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;system_disk_space_used&#39;</span></span>
<span class="line"><span style="color: #24292E">    threshold</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;50&#39;</span></span>
<span class="line"><span style="color: #24292E">    unit</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;GB&#39;</span></span>
<span class="line"><span style="color: #24292E">    operator</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;&gt;&#39;</span></span>
<span class="line"><span style="color: #24292E">    host</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;*&#39;</span></span>
<span class="line"><span style="color: #24292E">    delay_mins</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;1&#39;</span></span>
<span class="line"><span style="color: #24292E">    max_alerts</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;2&#39;</span></span>
<span class="line"><span style="color: #24292E">    repeat_every</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;5&#39;</span></span>
<span class="line"><span style="color: #24292E">    email</span><span style="color: #D73A49">=@</span><span style="color: #24292E">(</span><span style="color: #032F62">&#39;user@company.com&#39;</span><span style="color: #24292E">)</span></span>
<span class="line"><span style="color: #24292E">    webhook_trigger</span><span style="color: #D73A49">=</span><span style="color: #005CC5">2</span></span>
<span class="line"><span style="color: #24292E">    webhook_resolve</span><span style="color: #D73A49">=</span><span style="color: #005CC5">5</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">Body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/alerts/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON object containing a simple message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;message&#8221;:  &#8220;Success!&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Success!&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="deploymentalertupdate">account &gt; deployment &gt; alerts &gt; update</h3>



<p class="wp-block-paragraph">This method enables or disables an alert (or all alerts) by updating the <strong>status</strong> property.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>PUT /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/&lt;id>|all/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">PUT</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/&lt;id&gt;|all/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, <strong>&lt;uid&gt;</strong> is the ID of the deployment, and <strong>&lt;id&gt;</strong> is the ID number of the alert or &#8220;all&#8221; to update all deployment alerts simultaneously.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;status&#8221;:  &#8220;enable&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;enable&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>


<figure class="wp-block-table table table-bordered table-striped">
<table>
<thead>
<tr>
<th><strong>Parameter</strong></th>
<th><strong>Description</strong></th>
<th><strong>Example</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>status</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>enable/disable</td>
<td>&#8220;enable&#8221;</td>
</tr>
</tbody>
</table>
</figure>


<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request PUT &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/&lt;id>/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data {
    \&#8221;status\&#8221;:  \&#8221;enable\&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">PUT</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/&lt;id&gt;/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #6F42C1">\</span><span style="color: #6F42C1">&quot;status</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">enable</span><span style="color: #005CC5">\&quot;</span></span>
<span class="line"><span style="color: #6F42C1">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentalertsupdate.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$ALERTID = &#8220;2431&#8221;

$body = @{
    status=&#8217;disable&#8217;
}

$body = $body | ConvertTo-Json

$RESULTS = Invoke-RestMethod -Method Put -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/alerts/$ALERTID/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">$ALERTID </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;2431&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    status</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;disable&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Put </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/alerts/</span><span style="color: #24292E">$ALERTID</span><span style="color: #032F62">/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON object containing a simple message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;message&#8221;: &#8220;Disabled alert High Disk Usage&#8221;,
  &#8220;success&#8221;: &#8220;true&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Disabled alert High Disk Usage&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="deploymentsalertdelete">account &gt; deployment &gt; alerts &gt; delete</h3>



<p class="wp-block-paragraph">This method deletes an alert (or all alerts) from a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>DELETE /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/&lt;id>|all/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">DELETE</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/&lt;id&gt;|all/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, <strong>&lt;uid&gt;</strong> is the ID of the deployment, and <strong>&lt;id&gt;</strong> is the ID number of the alert or &#8220;all&#8221; to delete all alerts from the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request DELETE &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/&lt;id>/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221;  
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">DELETE</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/&lt;id&gt;/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E">  </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentalertsdelete.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$ALERTID = &#8220;2431&#8221;

$RESULTS = Invoke-RestMethod -Method Delete -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/alerts/$ALERTID/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">$ALERTID </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;2431&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Delete </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/alerts/</span><span style="color: #24292E">$ALERTID</span><span style="color: #032F62">/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON object containing a simple message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;message&#8221;:  &#8220;Successfully deleted alert Idle System&#8221;,
    &#8220;success&#8221;:  &#8220;true&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Successfully deleted alert Idle System&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="heartbeatlist">account &gt; deployment &gt; alerts &gt; heartbeat &gt; list</h3>



<p class="wp-block-paragraph">This method lists all of the heartbeat alerts for a deployment, along with their properties.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/heartbeat/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/heartbeat/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/heartbeat/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; 
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/heartbeat/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentalertsheartbeatlist.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;

$RESULTS = Invoke-RestMethod -Method Get -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/alerts/heartbeat/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/alerts/heartbeat/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing a list of heartbeat alerts and their properties.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;alerts&#8221;: [
    {
      &#8220;status&#8221;: &#8220;enabled&#8221;,
      &#8220;host&#8221;: &#8220;ss123456-1&#8221;,
      &#8220;name&#8221;: &#8220;ZK-1 Heartbeat&#8221;,
      &#8220;interval&#8221;: 5,
      &#8220;id&#8221;: 341,
      &#8220;max_alerts&#8221;: 1,
      &#8220;email&#8221;: &#8220;user@company.com&#8221;
    }
  ],
  &#8220;deployment&#8221;: &#8220;ss123456&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;alerts&quot;</span><span style="color: #24292E">: [</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;enabled&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;host&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456-1&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ZK-1 Heartbeat&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;interval&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">5</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">341</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;max_alerts&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">1</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;email&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;user@company.com&quot;</span></span>
<span class="line"><span style="color: #24292E">    }</span></span>
<span class="line"><span style="color: #24292E">  ],</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="heartbeatcreate">account &gt; deployment &gt; alerts &gt; heartbeat &gt; create</h3>



<p class="wp-block-paragraph">This method creates a heartbeat alert in a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/heartbeat/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/heartbeat/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, and <strong>&lt;uid&gt;</strong> is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;email&#8221;:  [ &#8220;user@company.com&#8221; ],
    &#8220;name&#8221;:  &#8220;Heartbeat from API&#8221;,
    &#8220;host&#8221;:  &#8220;*&#8221;,
    &#8220;max_alerts&#8221;:  &#8220;5&#8221;,
    &#8220;interval&#8221;:  &#8220;5&#8221;,
    &#8220;webhook_trigger&#8221;: 2,
    &#8220;webhook_resolve&#8221;: 5
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;email&quot;</span><span style="color: #24292E">:  [ </span><span style="color: #032F62">&quot;user@company.com&quot;</span><span style="color: #24292E"> ],</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Heartbeat from API&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;host&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;*&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;max_alerts&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;5&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;interval&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;5&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;webhook_trigger&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">2</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;webhook_resolve&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">5</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>


<figure class="wp-block-table table table-bordered table-striped">
<table>
<thead>
<tr>
<th><strong>Parameter</strong></th>
<th><strong>Description</strong></th>
<th><strong>Example</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>name</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>This is the name of the heartbeat alert.</td>
<td>&#8220;Test Heartbeat&#8221;</td>
</tr>
<tr>
<td><strong>host</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>This is the host ID, identifying one of the servers of the cluster. Use &#8220;*&#8221; to place the same alert on all of the cluster&#8217;s servers.</td>
<td>&#8220;ss123456-1&#8221; or &#8220;*&#8221;</td>
</tr>
<tr>
<td><strong>interval</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>The number of minutes in the sampling window. The alert will be triggered when SearchStax sees X failures within an Interval of X minutes. Accepts only multiples of 5 minutes up to 30.</td>
<td>&#8220;5&#8221;</td>
</tr>
<tr>
<td><strong>max_alerts</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>The maximum number of emails to send about an incident.</td>
<td>&#8220;5&#8221;</td>
</tr>
<tr>
<td><strong>email</strong><br /><span class="has-inline-color" style="color: #32cd32;">optional</span><br />list of strings</td>
<td>List of email addresses. Either an email or <em>both</em> webhook parameters are required.</td>
<td>[&#8220;user@company.com&#8221;]</td>
</tr>
<tr>
<td><strong>webhook_trigger</strong><br /><span class="has-inline-color" style="color: #32cd32;">optional</span><br />integer</td>
<td>The ID of the webhook to call when the alert is triggered. Either an email or <em>both</em> webhook parameters are required.</td>
<td>88</td>
</tr>
<tr>
<td><strong>webhook_resolve</strong><br /><span class="has-inline-color" style="color: #32cd32;">optional</span><br />integer</td>
<td>The ID of the webhook to call when the alert is resolved. Either an email or <em>both</em> webhook parameters are required.</td>
<td>99</td>
</tr>
</tbody>
</table>
</figure>


<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data {
    \&#8221;email\&#8221;: [ \&#8221;user@company.com\&#8221; ],
    \&#8221;max_alerts\&#8221;:  \&#8221;5\&#8221;,
    \&#8221;interval\&#8221;:  \&#8221;5\&#8221;,
    \&#8221;name\&#8221;:  \&#8221;Heartbeat from API\&#8221;,
    \&#8221;host\&#8221;:  \&#8221;*\&#8221;,
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #6F42C1">\</span><span style="color: #6F42C1">&quot;email</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">: [ </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">user@company.com</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1"> ],</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">max_alerts</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">5</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">interval</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">5</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">name</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">Heartbeat from API</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">host</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">*</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">,</span></span>
<span class="line"><span style="color: #6F42C1">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentalertsheartbeatcreate.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;

$body = @{
    name=&#8217;Heartbeat from API&#8217;
    host=&#8217;*&#8217;
    interval=&#8217;5&#8242;
    max_alerts=&#8217;5&#8242;
    email=@(&#8216;user@company.com&#8217;)
    webhook_trigger=2
    webhook_resolve=5
}

$body = $body | ConvertTo-Json

$RESULTS = Invoke-RestMethod -Method Post -Body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/alerts/heartbeat/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    name</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;Heartbeat from API&#39;</span></span>
<span class="line"><span style="color: #24292E">    host</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;*&#39;</span></span>
<span class="line"><span style="color: #24292E">    interval</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;5&#39;</span></span>
<span class="line"><span style="color: #24292E">    max_alerts</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;5&#39;</span></span>
<span class="line"><span style="color: #24292E">    email</span><span style="color: #D73A49">=@</span><span style="color: #24292E">(</span><span style="color: #032F62">&#39;user@company.com&#39;</span><span style="color: #24292E">)</span></span>
<span class="line"><span style="color: #24292E">    webhook_trigger</span><span style="color: #D73A49">=</span><span style="color: #005CC5">2</span></span>
<span class="line"><span style="color: #24292E">    webhook_resolve</span><span style="color: #D73A49">=</span><span style="color: #005CC5">5</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">Body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/alerts/heartbeat/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing a simple success/failure message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;message&#8221;:  &#8220;Success!&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Success!&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="heartbeatread">account &gt; deployment &gt; alerts &gt; heartbeat &gt; read</h3>



<p class="wp-block-paragraph">This method retrieves the properties of a heartbeat alert from its ID number.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/heartbeat/&lt;id>/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/heartbeat/&lt;id&gt;/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, <strong>&lt;uid&gt;</strong> is the ID of the deployment, and <strong>&lt;id&gt;</strong> is the ID of the alert. You can obtain the ID from the <a href="/docs/searchstax-cloud-alerts-api/#heartbeatlist/">heartbeat list</a> method.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/heartbeat/&lt;id>/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; 
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/heartbeat/&lt;id&gt;/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentalertsheartbeatread.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$ALERTID = &#8220;2431&#8221;

$RESULTS = Invoke-RestMethod -Method Get -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/alerts/heartbeat/$ALERTID/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">$ALERTID </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;2431&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/alerts/heartbeat/</span><span style="color: #24292E">$ALERTID</span><span style="color: #032F62">/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing the properties of a single heartbeat alert:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;status&#8221;: &#8220;enabled&#8221;,
  &#8220;host&#8221;: &#8220;ss123456-1&#8221;,
  &#8220;name&#8221;: &#8220;ZK-1 Heartbeat&#8221;,
  &#8220;interval&#8221;: 5,
  &#8220;id&#8221;: 341,
  &#8220;max_alerts&#8221;: 1,
  &#8220;email&#8221;: [
    &#8220;user@company.com&#8221;
  ]
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;enabled&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;host&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456-1&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ZK-1 Heartbeat&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;interval&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">5</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">341</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;max_alerts&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">1</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;email&quot;</span><span style="color: #24292E">: [</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #032F62">&quot;user@company.com&quot;</span></span>
<span class="line"><span style="color: #24292E">  ]</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="heartbeatupdate">account &gt; deployment &gt; alerts &gt; heartbeat &gt; update</h3>



<p class="wp-block-paragraph">This method enables/disables heartbeat alerts.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>PUT /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/heartbeat/&lt;id>/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">PUT</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/heartbeat/&lt;id&gt;/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, <strong>&lt;uid&gt;</strong> is the ID of the deployment, and <strong>&lt;id&gt;</strong> is the ID of the alert or &#8220;all&#8221;. You can obtain the ID from the <a href="/docs/searchstax-cloud-alerts-api/#heartbeatlist/">heartbeat list</a> method.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;status&#8221;:  &#8220;disable&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;disable&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>


<figure class="wp-block-table table table-bordered table-striped">
<table>
<thead>
<tr>
<th><strong>Parameter</strong></th>
<th><strong>Description</strong></th>
<th><strong>Example</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>status</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>enable/disable</td>
<td>&#8220;enable&#8221;</td>
</tr>
</tbody>
</table>
</figure>


<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request PUT &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/heartbeat/&lt;id>/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data {
    \&#8221;status\&#8221;:  \&#8221;enable\&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">PUT</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/heartbeat/&lt;id&gt;/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #6F42C1">\</span><span style="color: #6F42C1">&quot;status</span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">:  </span><span style="color: #005CC5">\&quot;</span><span style="color: #6F42C1">enable</span><span style="color: #005CC5">\&quot;</span></span>
<span class="line"><span style="color: #6F42C1">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentalertsheartbeatupdate.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$ALERTID = &#8220;2431&#8221;

$body = @{
    status=&#8217;disable&#8217;
}

$body = $body | ConvertTo-Json

$RESULTS = Invoke-RestMethod -Method Put -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/alerts/heartbeat/$ALERTID/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json

</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">$ALERTID </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;2431&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    status</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;disable&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Put </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/alerts/heartbeat/</span><span style="color: #24292E">$ALERTID</span><span style="color: #032F62">/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document describing the success of the action.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;message&#8221;: &#8220;Disabled heartbeat alert for ss123456&#8221;,
  &#8220;success&#8221;: &#8220;true&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Disabled heartbeat alert for ss123456&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="heartbeatdelete">account &gt; deployment &gt; alerts &gt; heartbeat &gt; delete</h3>



<p class="wp-block-paragraph">This method deletes one or all heartbeat alerts from a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>DELETE /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/heartbeat/&lt;id>/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">DELETE</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/heartbeat/&lt;id&gt;/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account, <strong>&lt;uid&gt;</strong> is the ID of the deployment, and <strong>&lt;id&gt;</strong> is the ID of the alert or &#8220;all&#8221;. You can obtain the ID from the <a href="/docs/searchstax-cloud-alerts-api/#heartbeatlist/">heartbeat list</a> method.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request DELETE &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/alerts/heartbeat/&lt;id>/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; 
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">DELETE</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/alerts/heartbeat/&lt;id&gt;/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentalertsheartbeatdelete.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$ALERTID = &#8220;2431&#8221;

$RESULTS = Invoke-RestMethod -Method Delete -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/alerts/heartbeat/$ALERTID/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">$ALERTID </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;2431&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Delete </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/alerts/heartbeat/</span><span style="color: #24292E">$ALERTID</span><span style="color: #032F62">/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document confirming the success of the deletion.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;message&#8221;:  &#8220;Successfully deleted all heartbeat alerts for ss123456&#8221;,
    &#8220;success&#8221;:  &#8220;true&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Successfully deleted all heartbeat alerts for ss123456&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p class="wp-block-paragraph">Do not hesitate to contact the <a href="mailto:support@searchstax.com?subject=SearchStax%20Cloud%20API%20–%20Alerts" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-alerts-api/">Solr Alerts API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchstax.com/docs/searchstax-cloud-alerts-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Solr Webhooks API</title>
		<link>https://www.searchstax.com/docs/searchstax-cloud-webhooks-api/</link>
					<comments>https://www.searchstax.com/docs/searchstax-cloud-webhooks-api/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 07:20:29 +0000</pubDate>
				<category><![CDATA[Operations and Recovery APIs]]></category>
		<category><![CDATA[Cloud]]></category>
		<guid isPermaLink="false">https://www.searchstax.com/docs/?p=7564</guid>

					<description><![CDATA[<p>Provisioning API &#8211; Webhooks Overview The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Managed Search deployments. Core and Enterprise Clients Only! The&#8230; <a class="more-link" href="https://www.searchstax.com/docs/searchstax-cloud-webhooks-api/">Continue reading <span class="screen-reader-text">Solr Webhooks API</span></a></p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-webhooks-api/">Solr Webhooks API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="h-provisioning-api-webhooks">Provisioning API &#8211; Webhooks</h1>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">Overview</h2>



<p class="wp-block-paragraph">The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Managed Search deployments.</p>



<div class="alert alert-info">
<h3>Core and Enterprise Clients Only!</h3>
<p>The SearchStax API suite is available to our Core and Enterprise
clients only, as noted on our <a href="https://www.searchstax.com/pricing/cloud/">Pricing</a> page. </p>
</div>



<p class="wp-block-paragraph">This page describes how to view webhooks using API methods.</p>



<p class="wp-block-paragraph">The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python <a href="https://pypi.org/project/coreapi/" target="_blank" rel="noreferrer noopener">coreapi</a> package, the <a href="https://www.postman.com/" target="_blank" rel="noreferrer noopener">Postman</a> tool, and <a href="https://curl.se" target="_blank" rel="noreferrer noopener">cURL</a>. For Windows, use <a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.1" target="_blank" rel="noreferrer noopener">PowerShell 7+</a>.</p>



<div class="alert alert-warning">
<h3>Account Owner, Admin, or Technical Contact</h3>
<p>To run the SearchStax Provisioning API, you must be the account Owner,
an account Admin, or a Technical Contact. See <a href="/docs/searchstax-cloud-user-roles/#userroles">SearchStax User Roles</a>.</p>
</div>



<p class="wp-block-paragraph">Symbols enclosed in carets (&lt; and &gt;) such as <strong>&lt;username&gt;</strong> are metavariables. Substitute your local values when you encounter them in the examples.</p>



<p class="wp-block-paragraph">Contents:</p>



<ul class="wp-block-list">
<li><a href="#webhooks">Webhooks</a>
<ul class="wp-block-list">
<li><a href="#webhooklist">account &gt; webhook &gt; list</a></li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Related Pages:</p>



<ul class="wp-block-list">
<li><a href="/docs/searchstax-cloud-authentication-api/">Authentication API</a></li>



<li><a href="/docs/searchstax-cloud-users-api/">Users API</a></li>



<li><a href="/docs/searchstax-cloud-basic-auth-api/">Basic Auth API</a></li>



<li><a href="/docs/searchstax-cloud-ipfilter-api/">IP Filtering API</a></li>



<li><a href="/docs/searchstax-cloud-deployment-api/">Deployment API</a></li>



<li><a href="/docs/searchstax-cloud-private-vpc-api/">Private VPC API</a></li>



<li><a href="/docs/searchstax-cloud-dns-alias-api/">DNS Alias API</a></li>



<li><a href="/docs/searchstax-cloud-backup-restore-api/">Backup/Restore API</a></li>



<li><a href="/docs/searchstax-cloud-custom-jars-api/">Custom JARs API</a></li>



<li><a href="/docs/searchstax-cloud-tags-api/">Tags API</a></li>



<li><a href="/docs/searchstax-cloud-alerts-api/">Alerts API</a></li>



<li><a href="/docs/searchstax-cloud-zookeeper-api/">Zookeeper API</a></li>
</ul>



<h2 class="wp-block-heading" id="webhooks">Webhooks</h2>



<p class="wp-block-paragraph">The Provisioning API includes a method for listing the webhooks that have been created through the SearchStax dashboard. This provides the webhook IDs that can be optionally included when creating threshold and heartbeat alerts.</p>



<h3 class="wp-block-heading" id="webhooklist">account &gt; webhook &gt; list</h3>



<p class="wp-block-paragraph">This method lists all of the webhooks for a deployment, along with their properties.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET /api/rest/v2/account/&lt;account_name>/webhook/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/webhook/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where <strong>&lt;account_name&gt;</strong> is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses <a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a> authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/webhook/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; 
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/webhook/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountwebhooklist.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;

$RESULTS = Invoke-RestMethod -Method Get -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/webhook/&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/webhook/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing a list of webhooks and their properties.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;results&#8221;: [
    {
      &#8220;id&#8221;: 7,
      &#8220;account&#8221;: &#8220;AccountName&#8221;,
      &#8220;payload&#8221;: {
        &#8220;alertThresholdValue_ws&#8221;: &#8220;§§$ALERT_THRESHOLD_VALUE§§&#8221;,
        &#8220;alertRuleName_ws&#8221;: &#8220;§§$ALERT_TITLE§§&#8221;,
        &#8220;metric_ws&#8221;: &#8220;§§$ALERT_METRIC§§&#8221;,
        &#8220;alertThresholdOperator_ws&#8221;: &#8220;§§$ALERT_THRESHOLD_OPERATOR§§&#8221;,
        &#8220;alertid_ws&#8221;: &#8220;§§$ALERT_ID§§&#8221;,
        &#8220;deployment_id_ws&#8221;: &#8220;§§$DEPLOYMENT_UID§§&#8221;,
        &#8220;deployment_ws&#8221;: &#8220;§§$DEPLOYMENT_NAME§§&#8221;,
        &#8220;host_ws&#8221;: &#8220;§§$HOSTNAME§§&#8221;,
        &#8220;alert_status_ws&#8221;: &#8220;none&#8221;,
        &#8220;alertTimeInUTC_ws&#8221;: &#8220;§§$DATE§§&#8221;,
        &#8220;value_ws&#8221;: &#8220;§§$ALERT_CURRENT_VALUE§§&#8221;,
        &#8220;alertStatus_ws&#8221;: &#8220;§§$ALERT_STATUS§§&#8221;
      },
      &#8220;custom_headers&#8221;: {},
      &#8220;created&#8221;: &#8220;2020-01-27T18:05:00.516230Z&#8221;,
      &#8220;updated&#8221;: null,
      &#8220;name&#8221;: &#8220;webhookInput&#8221;,
      &#8220;url&#8221;: &#8220;https://ss123456-l70y8miq-eastus-azure.searchstax.co/solr/webhookInput/update&#8221;,
      &#8220;url_ssl_ignore&#8221;: true,
      &#8220;encode_as_form&#8221;: false,
      &#8220;paused&#8221;: true
    }
  ]
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;results&quot;</span><span style="color: #24292E">: [</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">7</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;account&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;AccountName&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;payload&quot;</span><span style="color: #24292E">: {</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;alertThresholdValue_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$ALERT_THRESHOLD_VALUE§§&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;alertRuleName_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$ALERT_TITLE§§&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;metric_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$ALERT_METRIC§§&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;alertThresholdOperator_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$ALERT_THRESHOLD_OPERATOR§§&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;alertid_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$ALERT_ID§§&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;deployment_id_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$DEPLOYMENT_UID§§&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;deployment_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$DEPLOYMENT_NAME§§&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;host_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$HOSTNAME§§&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;alert_status_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;none&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;alertTimeInUTC_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$DATE§§&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;value_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$ALERT_CURRENT_VALUE§§&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;alertStatus_ws&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;§§$ALERT_STATUS§§&quot;</span></span>
<span class="line"><span style="color: #24292E">      },</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;custom_headers&quot;</span><span style="color: #24292E">: {},</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;created&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;2020-01-27T18:05:00.516230Z&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;updated&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">null</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;webhookInput&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;url&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;https://ss123456-l70y8miq-eastus-azure.searchstax.co/solr/webhookInput/update&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;url_ssl_ignore&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">true</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;encode_as_form&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">false</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;paused&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">true</span></span>
<span class="line"><span style="color: #24292E">    }</span></span>
<span class="line"><span style="color: #24292E">  ]</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p class="wp-block-paragraph">Do not hesitate to contact the <a href="mailto:support@searchstax.com?subject=SearchStax%20Cloud%20API%20–%20Webhooks" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-webhooks-api/">Solr Webhooks API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchstax.com/docs/searchstax-cloud-webhooks-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
